[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) |
Hi,
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:
http://lists.gnu.org/archive/html/bug-gettext/2015-09/msg00015.html
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)!
Icon=devhelp
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:
https://developer.gnome.org/libpeas/stable/PeasPluginInfo.html
https://bugzilla.gnome.org/show_bug.cgi?id=774338
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
intltool.
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.
Thanks,
Sébastien
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug-gettext] Support underscore-prefix to mark a field for translation in a .desktop file,
Sébastien Wilmet <=