Skip to content

add on-demand installation support for translations

Harald Sitter requested to merge work/language-install into master

a translation for plasmashell being available doesn't necessarily mean it'll be available for the rest of the system (e.g. think libreoffice) nor does it mean all relevant packages for proper localization will be installed (e.g. think spell check definitions)

to deal with this, languages now have a new state "incomplete"

an incomplete language can be used, but not all installed software will be localized accordingly without first installing additional software packages. this is a notoriously overloaded use case we've never really managed to support even though John even started crafting API for it way back when.

the basic premise here is simple:

  • the user selects a language
  • the kcm hints to the user that the language support is incomplete
  • the user clicks a button, auths, and ideally the language ends up complete

whether a language is complete or not is checked using a bespoke distro logic class. it's meant to return a list of packages that are missing. currently there's only an impl for ubuntu. in lieu of a class the entire magic becomes noop.

when a user clicks the install button the package names are resolved and installed through packagekit. this doesn't really have any further UI backing than busy indication, in part because it's not entirely clear how much UI we actually need or want here.

for performance reasons this entire dance only happens on languages in the selected model.

CCBUG: 431292

Edited by Harald Sitter

Merge request reports