Translations should be stripped from the gwibber.desktop file

Bug #538851 reported by Gabor Kelemen
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Gwibber
Fix Released
Undecided
Ken VanDine
Ubuntu Translations
Fix Released
Low
Unassigned
gwibber (Ubuntu)
Fix Released
Medium
Ken VanDine

Bug Description

Binary package hint: gwibber

Gwibber uses language packs, which include the translations of its .desktop file. These are imported into Launchpad and then exported.

Normally, before they are imported, they are stripped from the source .desktop file, which is then shipped with no translations, which will actually be loaded from the .mo files in the language packs (see https://wiki.ubuntu.com/UbuntuDevelopment/Internationalisation/Packaging#Desktop%20Entries).

However, the .desktop file is shipped with full translations, which override those in the language packs. In order for them to be stripped, the X-Ubuntu-Gettext-Domain must be added to the .desktop file.

This applies to the gwibber.desktop file, the gwibber-preferences does not contain translations, but X-Ubuntu-Gettext-Domain is missing too.

Related branches

David Planella (dpm)
description: updated
Changed in ubuntu-translations:
status: New → Triaged
importance: Undecided → High
David Planella (dpm)
tags: added: needs-desktop-entry-i18n
Revision history for this message
David Planella (dpm) wrote :

After a conversation with pitti, it seems that for packages using python-distutils-extra there is no easy way of adding the X-Ubuntu-Gettext-Domain key. The langpack.mk rule assumes there is a po/Makefile file where to obtain the domain name from, which is not the case with apps using the p-d-e build system. Here's an extract of the conversation on #ubuntu-desktop:

<pitti> dpm: hmm -- the current build system doesn't even know about which gettext domain it's using
<pitti> dpm: if we know, or would assume that it's the same as the project name, we might just create a po/Makefile with GETTEXT_PACKAGE=$projectname in python-mkdebian perhaps

The best approach seems to be for now to add the X-Ubuntu-GNOME-Domain key to the upstream sources. This will have the benefit that it will work both for Ubuntu and for OpenSUSE. That's what the linked branch does.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

We need to add the X-Ubuntu-Gettext-Domain=gwibber line inside /usr/share/applications/gwibber-preferences.desktop file, too, in order to get the System->Preferences->Broadcast Preferences menu entry translated.

Revision history for this message
David Planella (dpm) wrote : Re: [Bug 538851] Re: Translations should be stripped from the gwibber.desktop file

Hi Ricardo,

Thanks for the comment and for working on translations bugs :)

El dv 19 de 03 de 2010 a les 17:19 +0000, en/na Ricardo Pérez López va
escriure:
> We need to add the X-Ubuntu-Gettext-Domain=gwibber line inside
> /usr/share/applications/gwibber-preferences.desktop file, too, in order
> to get the System->Preferences->Broadcast Preferences menu entry
> translated.
>

That's exactly what the patch does. The gwibber-preferences.desktop file
is the gwibber-preferences.desktop.in one you see in the diff on the
attached branch. This file is used as a basis to create
gwibber-preferences.desktop when the package is built.

We have chosen to use the X-GNOME-Gettext-Domain=gwibber key instead of
the X-Ubuntu-Gettext-Domain=gwibber one so that this can be included in
the upstream file directly (in Ubuntu we recognise both) and work for
all distros (in OpenSUSE it should work as in Ubuntu, other distros will
just ignore it).

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Great! Thank you very much, David.

Omer Akram (om26er)
Changed in gwibber (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in gwibber:
assignee: nobody → Ken VanDine (ken-vandine)
milestone: none → 2.30.0
status: New → Fix Committed
Changed in gwibber (Ubuntu):
assignee: nobody → Ken VanDine (ken-vandine)
milestone: none → ubuntu-10.04-beta-2
status: Triaged → Confirmed
David Planella (dpm)
tags: added: gwibber-i18n
Changed in gwibber (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gwibber - 2.29.93-0ubuntu1

---------------
gwibber (2.29.93-0ubuntu1) lucid; urgency=low

  * New upstream release
    - Use MAX_MESSAGE_LENGTH for max length instead of hard coding 140
    - Changed the views to not emit the entire doc as a value
    - Set default focus to the text input widget (LP: #528302)
    - Made a string translatable, requested by the translations
      team (LP: #534667)
    - Patch from Gabor Kelemen setting translation domain for .ui
      files (LP: #538846)
    - Mark strings translatable, thanks Kelemen Gábor (LP: #520462)
    - Added X-GNOME-Gettext-Domain to allow translations of the desktop
      files to be loaded at runtime (LP: #538851
    - Use the desktopcouch API for excluding the DB and handle
      errors (LP: #539583)
    - Set window icons properly so they scale nicely
    - Set account IDs in desktopcouch to force merging on sync instead of
      creating dupes (LP: #535263)
  * debian/patches/lp_report_to_ubuntu.patch
    - File bugs against the package (LP: #551132)
 -- Ken VanDine <email address hidden> Wed, 17 Mar 2010 13:20:24 -0400

Changed in gwibber (Ubuntu):
status: Fix Committed → Fix Released
Omer Akram (om26er)
Changed in gwibber:
status: Fix Committed → Fix Released
Revision history for this message
David Planella (dpm) wrote :

I'm leaving the translations task as open to keep track of it. The most important part of the bug (adding the gettext domain to the desktop.in file) has been fixed, but I still see some inline translations in the desktop file:

$ cat /usr/share/applications/gwibber.desktop
[Desktop Entry]
Name=Gwibber
GenericName=Social Client
X-GNOME-FullName=Gwibber Social Client
X-GNOME-FullName[ar]=Gwibber عميل الشبكات الاجتماعية
X-GNOME-FullName[bg]=Социален клиент Gwibber
X-GNOME-FullName[bn]=Gwibber সামাজিক ক্লায়েন্ট
X-GNOME-FullName[de]=Gwibber Anwendung für Soziale Netzwerke
X-GNOME-FullName[fi]=Gwibber – sosiaaliset mediat
X-GNOME-FullName[nl]=Gwibber sociaal programma
X-GNOME-FullName[pl]=Klient społecznościowy Gwibber
X-GNOME-FullName[pt_BR]=Cliente Social Gwibber
X-GNOME-FullName[sk]=Gwibber sociálny klient
Type=Application
Comment=Update your microblog and follow your contacts' statuses
Exec=gwibber
Icon=gwibber
Categories=GTK;GNOME;Network;
X-GNOME-Gettext-Domain=gwibber

I've also noticed that the gwibber.desktop file is again under version control. This should not be necessary, since it is regenerated from the gwibber.desktop.in upon every build.

In any case, I'm lowering the importance of the translations task, since translations can now at least be loaded

Changed in ubuntu-translations:
importance: High → Low
David Planella (dpm)
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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