Add appstream metadata to language packs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
langpack-o-matic |
New
|
Undecided
|
Unassigned |
Bug Description
appstream and GNOME Software has built-in support for language packs. It's worth looking into whether Ubuntu can benefit from this.
This integration is working in Fedora which now uses language packs. In Fedora, there is a category on GNOME Software's front page called Addons with a subcategory named Localization. (Other Addons subcategories are Codecs, Fonts, Input Sources and Shell Extensions [obviously only for GNOME Shell]).
From what I can tell, the way this works in Fedora is each language has a language pack metapackage. The metapackage then depends or recommends (what Fedora calls "weak dependencies") the language-specific packages. The metapackage also contains a very basic appstream metadata file. I'm attaching a file showing some of what this looks like.
However, Ubuntu's system is more complicated. Translations for specific package are only installed if the base package is installed. Maybe the 'extends' field in the localization metadata could do this, but we'd first have to create appstream metapackages for many of those packages which don't have it yet. Because Fedora's system is so much simpler, I don't know how well GNOME Software would handle this.
References
---------
https:/
https:/
/usr/share/
tags: | added: appstream |
The basic idea of AppStream language packs is that you can drop in as many as you want.
E.g. if Firefox has it's l10n data split into different packages, each one of these will get one AppStream metainfo snippet in /usr/share/metainfo describing which language the langpack supports and what software component it is for (in case of KDE, there will be multiple components).
The software center is supposed to check which software is installed and if there are language packs available for the current language, and then install them transparently.
So, what GNOME Software does now is pretty tailored to Fedora's way of doing things, and GS might need to be adjusted for this to work (otherwise the Addons->Langpacks menu will be pretty full of language packs for all kinds of stuff). One thing I could imagine is GS just grouping all language packs together by locale, and then only install the necessary bits if someone hits "Install" on one.
As for the generation of metainfo files, I wanted to add some small helper code to the cli tool, so we can quickly auto-generate them by a script at package build-time and don't need to fiddle with XML much.