Currently GRASS GIS has no mechanism to provide comments for
translators. Sometimes strings might get incorrect translation if it's
hard to understand or translation depends on location of string (menu,
input parameter, warning). Other free software projects (i.e. KDE,
QGIS) have adopted an option to add comments for translators to give
hints about use of string, it's meaning.
Attached patch enables source code comment extraction for translators.
Comment is extracted and provided to translator if and only if it is
located just before (previous line) of translatable string AND it
contains GTC keyword (GTC - GRASS translator comment). Content of such
comment will be visible to translator in KBabel, Lokalize and other
translation software.
There are no extra changes necessary to existing code (apart from ones
provided in the attachment). If there will be no objections, I'll
commit on 19th of November.
An example how to provide hints to translators:
/* GTC An angle between true north and user digitized line. */
G_message(_("True bearing: %f"), bearing);
Maris.
(attachments)
GTC.patch (2.35 KB)