Comment 0 for bug 663150

Revision history for this message
David Planella (dpm) wrote :

A mechanism was implemented in bug 619632 to load translations from .policy files at runtime from .mo files, in the same way it is done in Ubuntu and OpenSuse for .desktop files. This new functionality has also been forwarded upstream, although there hasn't been a reply for a while.

If support for this is added to the aptdaemon Ubuntu package, this means that it will no longer be necessary to export translations from Launchpad at NonLanguagePackDeadline and include them manually in the package. This will make it possible to rely on language packs solely, making the life of developers and translators easier, and avoiding bugs such as bug 655642.

For the upstream project, this will mean no change, other than having the gettext domain specified in translatable descriptions in the policy.in files.

Note that so far no package has been tested with this, so this should be verified.

On to the practical part. Quoting Robert Ancell:

To take advantage of this you need to modify the .policy files, i.e.:

<description>Install system color profiles</description>
<description xml:lang="cs">Instalovat systémové profily barev</description>
...

becomes:

<description gettext-domain="gnome-color-manager">Install system color
profiles</description>

Guessing you probably want to use a .in file and use intltool like this:

<_description gettext-domain="gnome-color-manager">Install system color
profiles</_description>

Even if it's deemed not necessary to implement it upstream, it would be extremely useful to have in the Ubuntu package.

Thanks!