support context for .desktop files

Bug #647387 reported by Lukas Sommer
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
intltool
Triaged
Wishlist
Unassigned

Bug Description

Please support context information (resulting in msgctxt in the .pot file) for extracting strings from .desktop files templates with intltool-extract.

Actual results:

There is no way to set the context information for the strings. But this is useful for applications who use by police a special semantic markup with fixed contexts (e.g. http://techbase.kde.org/Development/Tutorials/Localization/i18n_Semantics#Context_Markers).

Expected results:

Provide a way to determine individual context information for the entries in .desktop files.

Revision history for this message
Данило Шеган (danilo) wrote :

We'd have to discuss for http://standards.freedesktop.org/desktop-entry-spec/ to be updated with context field first. Not sure this would be trivial, so we can add an intltool extension, but ideally, it would be included in the .desktop file specification.

Changed in intltool:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Colomban Wendling (banw) wrote :

Couldn't "just" the entries have the group as their context? ("Desktop Entry" in case of Desktop files) This probably would require a specific opt-in option not to break current translations, but I would imagine it would work and address most conflicts. Though it's possibly too specific and would lead to duplicate translations, if some keys could be shared not not others.

Revision history for this message
Moritz Bruder (muesli4-2) wrote :

This issue surfaced when one of the translators of GMPC used a newline in the desktop file markup (but the string was shared with several C files) leading to not showing the application entry at all.

Would it be possible to always generate a separate entry (with a new msgctxt) in the po file for strings from desktop files? (A bit of developer / translator effort.)

Another alternative would be to provide special syntax to specify the msgctxt in desktop files (since it's possible in C). E.g., _u_ instead of _ (Is there some possible syntax?). (Results in no effort for anyone but the developers are able to fix related bugs easily.)

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.