[GRASS-dev] Enabling comments for GRASS translators

Maris Nartiss maris.gis at gmail.com
Mon Nov 12 00:42:01 PST 2012


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GTC.patch
Type: application/octet-stream
Size: 2406 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20121112/f895a0e5/attachment.obj>


More information about the grass-dev mailing list