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

Bug #663150 reported by David Planella
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Aptdaemon
Fix Released
Medium
Sebastian Heinlein
Ubuntu Translations
Fix Released
High
Unassigned
aptdaemon (Ubuntu)
Fix Released
Medium
Unassigned

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>
...

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 it in the Ubuntu package.

Thanks!

Related branches

David Planella (dpm)
Changed in ubuntu-translations:
status: New → Triaged
importance: Undecided → High
description: updated
Revision history for this message
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
Revision history for this message
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.

Thanks!

Revision history for this message
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)
Changed in ubuntu-translations:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.