"Desktop" string is not translated in KDE

Bug #749379 reported by Andrius Štikonas
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Translations
Invalid
Undecided
Unassigned
kde4libs (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

"Desktop settings" string should be translated in KDE (see screenshot). The word "Desktop" comes from /usr/share/kde4/services/plasma-containment-desktop.desktop file from plasma-desktop but for some reason "Desktop" is not translated.

The string is of course translated upstream and can also be found in launchpad: https://translations.launchpad.net/ubuntu/natty/+source/kdebase-workspace/+pots/desktop-kdebase-workspace/lt/+translate?search=&show=all&start=646

All other plasmoids and containments are correctly translated, this happens only with Desktop containment.

I tested this with Lithuanian, Russian and German languages, so it probably happens with all languages.

Tags: kubuntu l10n kde
Revision history for this message
Andrius Štikonas (stikonas) wrote :
description: updated
Revision history for this message
Felix Geyer (debfx) wrote :

For some reason gettext fails to load strings from the desktop_* templates:

$ LC_ALL=de_DE.UTF-8 LANG=de_DE.UTF-8 gettext desktop_kdebase-workspace "Free Space Notifier"
Free Space Notifier

Other templates work:

$ LC_ALL=de_DE.UTF-8 LANG=de_DE.UTF-8 gettext plasmagenericshell "All Widgets"
Alle Miniprogramme

/usr/share/locale-langpack/de/LC_MESSAGES/desktop_kdebase-workspace.mo seems to contain the translation for "Free Space Notifier"" : "Speicherplatzbenachrichtigung".

Changed in ubuntu-translations:
status: New → Confirmed
Revision history for this message
David Planella (dpm) wrote :

One thing that comes to mind is that perhaps the application does not set the right translation domain when initializing gettext, but it seems that gettext does _not_ load the translations itself.

Could it be that kdelibs does not recognize the X-Ubuntu-Gettext-Domain when loading the .desktop file translations (https://wiki.ubuntu.com/UbuntuDevelopment/Internationalisation/Packaging#Desktop%20Entries).

That would not explain why plain gettext fails loading the translations, though

Felix Geyer (debfx)
Changed in kde4libs (Ubuntu):
milestone: none → ubuntu-11.04-beta-2
Changed in ubuntu-translations:
status: Confirmed → Invalid
tags: added: kubuntu
Changed in kde4libs (Ubuntu):
status: New → Triaged
Revision history for this message
Felix Geyer (debfx) wrote :

The problem is that the translations of the desktop file entries have different gettext contexts:

1) context = [key name] (Name, GenericName, ...)

2) context = [key name]|[additional sting]

With this .desktop file the context is "Name|plasma containment":
[Desktop Entry]
# ctxt: plasma containment
Name=Desktop

3) no context

Currently we only lookup 1).

To solve this bug we need to parse the "# ctxt:" comment and figure out a way to check if a lookup failed.

Changed in kde4libs (Ubuntu):
milestone: ubuntu-11.04-beta-2 → later
importance: Undecided → Medium
Revision history for this message
Felix Geyer (debfx) wrote :

In natty kde4libs tries 1) and falls back to 3) if the translated string is equal to the original (English) string which usually means that the lookup failed.

We still need to parse the context 2) which probably means scanning the desktop file line by line for the ctxt comment.

Revision history for this message
Felix Geyer (debfx) wrote :

We have decided to stop stripping translations from desktop files, see https://lists.ubuntu.com/archives/kubuntu-devel/2011-September/thread.html#5464

Changed in kde4libs (Ubuntu):
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.