[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gettext] Support underscore-prefix to mark a field for translation

From: Sébastien Wilmet
Subject: [bug-gettext] Support underscore-prefix to mark a field for translation in a .desktop file
Date: Thu, 2 Mar 2017 16:46:47 +0100
User-agent: Mutt/1.7.1 (2016-10-04)


Intltool supports to prefix fields by an underscore to mark them for
translation in a .desktop file.

In source code, all translatable strings are explicitly marked as such,
usually with _(), N_() etc. When we see such a string, we immediately
know that it's extracted for translation.

But in a *.desktop file, gettext currently doesn't support the
underscore-prefix. From what I understand, it extracts a fixed set of
fields that the freedesktop.org spec allows them to be translated.

This leads to problems such as icons being translated whereas the
maintainer doesn't want that. See this thread:

GNOME projects using upstream gettext now adds a comment like this:

# Translators: Do NOT translate or transliterate this text (this is an icon 
file name)!

It stinks to need to add such a comment.

Another problem, a .desktop file is sometimes used for other purposes,
like writing the metadata of a libpeas plugin:

All in all, migrating from intltool to upstream gettext is a step
backward for *.desktop files. When reading the .desktop, we don't know
what is extracted for translation, and it is less flexible than with

The underscore-prefix is a standard way to mark something for
translation, in an explicit way. Doing things implicitly, in a magic
way, is a recipe for bugs (like a translator translating the icon name
without verifying that an icon exists for the translated name).

So, I hope you'll at least understand that there is currently a problem.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]