[GRASS-dev] C syntax and the use of underscore ('_')
Markus Neteler
neteler at osgeo.org
Sun Aug 2 10:55:46 PDT 2015
On Sun, Aug 2, 2015 at 6:42 PM, Rob Parsons <jrobparsons at gmail.com> wrote:
> Hi,
>
> In r.univar_main.c, there are a number of string assignments similar to
> this:
>
>
> param.percentile->description =
> _("Percentile to calculate (requires extended statistics flag)");
>
>
> I am not familiar with the '_' syntax as it is being used here before the
> opening '('.
These are the gettext macros used for the indication of strings (user
messages) to be translated.
Background info:
http://grass.osgeo.org/development/translations/
and especially
http://grasswiki.osgeo.org/wiki/GRASS_messages_translation
I have added some more hints now here:
http://grasswiki.osgeo.org/wiki/GRASS_messages_translation#Updating_messages_in_the_source_code
> The Eclipse editor complains about syntax.
>
> Anyone know what is happening here?
I suppose that the Eclipse editor needs to be configured properly for
that (no idea how since I am not familiar with it). Perhaps others
know here?
In any case, the macro need to remain.
best,
Markus
More information about the grass-dev
mailing list