Remove inline translations from .desktop files

Bug #348225 reported by Ricardo Pérez López
14
Affects Status Importance Assigned to Milestone
pkgbinarymangler (Ubuntu)
Fix Released
High
Martin Pitt
Jaunty
Fix Released
High
Martin Pitt
synaptic (Ubuntu)
Fix Released
Medium
Martin Pitt
Jaunty
Fix Released
Medium
Martin Pitt
system-config-printer (Ubuntu)
Fix Released
Undecided
Martin Pitt
Jaunty
Fix Released
Undecided
Martin Pitt

Bug Description

Testing the latest Jaunty daily-live CD (20090324) I can see that the .desktop files doesn't honour the X-Ubuntu-Gettext-Domain option, so the applications shows incorrectly translated into Spanish.

For example, take a look at the "Printing" application (inside System->Administration). Its .desktop file is /usr/share/applications/system-config-printer.desktop, which contains (among other lines):

  Name[es]=Imprimiendo
  X-Ubuntu-Gettext-Domain=system-config-printer

("Imprimiendo" is an incorrect translation of "Printing")

and the corresponding .mo file is present:

  /usr/share/locale-langpack/es/LC_MESSAGES/system-config-printer.mo

which contains the correct translation for "Printing" (which is "Impresoras", in Spanish):

  https://translations.launchpad.net/ubuntu/jaunty/+source/system-config-printer/+pots/system-config-printer/es/552/+translate

However, the "Printing" application is shown as "Imprimiendo" instead of "Impresoras". Obviously, GNOME is not using the .mo files when showing an applications menu entry.

Please, take care of this problem, because it invalidates the work of many translators.

Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for your bug report but that's not a bug, the preference order has been reversed on purpose on jaunty, the desktop should be cleaned during the build though

Changed in gnome-desktop:
assignee: nobody → pitti
importance: Undecided → Low
Revision history for this message
Sebastien Bacher (seb128) wrote :

letting the bug open and assigning to pitti for now since he worked on those changes

Revision history for this message
Sebastien Bacher (seb128) wrote :

revelant glib change

" * 01_gettext-desktopfiles.patch: Merge OpenSUSE's and our patch:
    - Now prefers inline translations over gettext translations, which
      fixes a few corner cases (like renaming .desktop files on the
      user's desktop), is more in line with the recent gconf patch,
      and more palatable for upstream inclusion.
    - Use X-GNOME-Gettext-Domain, for preparing upstream inclusion.
    - Forwarded upstream now.
  * Add 02_gettext-desktopfiles-ubuntu.patch: Provide backwards
    compatibility for 01_gettext-desktopfiles.patch for
    X-{Debian,Ubuntu}-Gettext-Domain. The latter was changed to use
    X-GNOME-, so this is necessary until all our .desktop files are
    converted."

Revision history for this message
Martin Pitt (pitti) wrote :

Indeed it's not sufficient any more to clean the translations in cdbs, we need to do it in pkgstriptranslations. I'll move the code there.

Then we need to rebuild a couple of packages which still have their translations in the .desktop.

Changed in pkgbinarymangler (Ubuntu Jaunty):
importance: Low → High
status: New → In Progress
summary: - Jaunty *.desktop files doesn't honour X-Ubuntu-Gettext-Domain option
+ Remove inline translations from .desktop files
Revision history for this message
Martin Pitt (pitti) wrote :

Uploaded, will be accepted after beta release.

To actually fix this for system-config-printer, we'll need a rebuild of the package.

Changed in pkgbinarymangler (Ubuntu Jaunty):
status: In Progress → Fix Committed
Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Martin, thank you for taking care of this issue.

system-config-printer isn't the only package affected. Synaptic is also showing the wrong translation in its menu entry, and maybe there are some others.

Revision history for this message
Martin Pitt (pitti) wrote :

Opening a synaptic task as a placeholder to do the rebuilds once the new pkgstriptranslations is in.

Changed in synaptic (Ubuntu Jaunty):
assignee: nobody → pitti
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pkgbinarymangler - 56

---------------
pkgbinarymangler (56) jaunty; urgency=low

  * pkgstriptranslations: Remove translations from .desktop files if they have
    a gettext domain. Not every package with .desktop files uses cdbs with
    langpack.mk (where this stripping has happened so far), and we are now
    preferring the language pack translations over the static upstream
    translations in .desktop files. (LP: #348225)
  * debian/copyright: Update GPL stanza (previously had old FSF address),
    thanks lintian.
  * debian/control: Bump Standards-Version (no changes required).

 -- Martin Pitt <email address hidden> Wed, 25 Mar 2009 10:28:45 +0100

Changed in pkgbinarymangler:
status: Fix Committed → Fix Released
Martin Pitt (pitti)
Changed in system-config-printer (Ubuntu Jaunty):
assignee: nobody → pitti
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package synaptic - 0.62.5ubuntu2

---------------
synaptic (0.62.5ubuntu2) jaunty; urgency=low

  * No-change upload to strip translations from .desktop files. (LP: #348225)

 -- Martin Pitt <email address hidden> Mon, 30 Mar 2009 12:57:47 +0200

Changed in synaptic:
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-config-printer - 1.1.3+git20090218-0ubuntu15

---------------
system-config-printer (1.1.3+git20090218-0ubuntu15) jaunty; urgency=low

  * No-change upload to strip translations from .desktop files. (LP: #348225)

 -- Martin Pitt <email address hidden> Mon, 30 Mar 2009 12:59:03 +0200

Changed in system-config-printer:
status: In Progress → Fix Released
Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Martin, I have:

$ dpkg -s synaptic | grep Version:
Version: 0.62.5ubuntu2

$ dpkg -s system-config-printer-gnome | grep Version:
Version: 1.1.3+git20090218-0ubuntu15

However, translations are still inside /usr/share/applications/synaptic.desktop and /usr/share/applications/system-config-printer.desktop. The bug is still NOT fixed.

I can help you with any information you could need in order to fix it.

Changed in system-config-printer (Ubuntu Jaunty):
status: Fix Released → Confirmed
Changed in synaptic (Ubuntu Jaunty):
status: Fix Released → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

These work on a local build, so I can only assume that our buildds have an outdated version of pkgbinarymangler (I thought they'd auto-upgrade). Adam, can you please check this, and upgrade them to version 57? Thank you!

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, for some reason pkgbinarymangler moved to universe. I moved it back, and added it to the seeds.

Martin Pitt (pitti)
Changed in synaptic (Ubuntu Jaunty):
status: Confirmed → In Progress
Changed in system-config-printer (Ubuntu Jaunty):
status: Confirmed → In Progress
Martin Pitt (pitti)
Changed in synaptic (Ubuntu Jaunty):
status: In Progress → Fix Committed
Changed in system-config-printer (Ubuntu Jaunty):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-config-printer - 1.1.3+git20090218-0ubuntu16

---------------
system-config-printer (1.1.3+git20090218-0ubuntu16) jaunty; urgency=low

   * Yet another no-change upload to _really_ build against current
     pkgbinarymangler. (LP: #348225)

 -- Martin Pitt <email address hidden> Tue, 31 Mar 2009 12:23:52 +0200

Changed in system-config-printer:
status: Fix Committed → Fix Released
Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Fixed for me for system-config-printer. Good job!

Thanks a lot, waiting for synaptic :).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package synaptic - 0.62.5ubuntu2.1

---------------
synaptic (0.62.5ubuntu2.1) jaunty; urgency=low

  * Yet another no-change upload to _really_ build against current
    pkgbinarymangler. (LP: #348225)

 -- Martin Pitt <email address hidden> Tue, 31 Mar 2009 12:13:39 +0200

Changed in synaptic:
status: Fix Committed → Fix Released
Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Martin, thanks for the fix.

Additionally, I can see that computer-janitor-gtk.desktop file from computer-janitor package has inline translations, too, which should be removed. However, besides that, and due to bug #352770, its Ubuntu gettext domain should be changed from "computerjanitorapp" to "computerjanitor".

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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