Specify the gettext domain in .policy files to load translations at runtime

Bug #663150 reported by David Planella on 2010-10-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sebastian Heinlein
Ubuntu Translations
aptdaemon (Ubuntu)

Bug Description

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>


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

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

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

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


Related branches

David Planella (dpm) on 2010-10-19
Changed in ubuntu-translations:
status: New → Triaged
importance: Undecided → High
description: updated
Sebastian Heinlein (glatzor) wrote :

I will add this in the upstream code. There isn't any need for a distro patch.

Changed in aptdaemon:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Sebastian Heinlein (glatzor)
Changed in aptdaemon (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
Changed in aptdaemon:
status: In Progress → Fix Committed
David Planella (dpm) wrote :

What's the status of this bug, has a package been released including the fix?

It would be great to test if this feature is working.


Sebastian Heinlein (glatzor) wrote :

It is already in Natty.

Changed in aptdaemon:
status: Fix Committed → Fix Released
Changed in aptdaemon (Ubuntu):
status: In Progress → Fix Released
Gabor Kelemen (kelemeng) on 2011-05-18
Changed in ubuntu-translations:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers