[GRASS-dev] C syntax and the use of underscore ('_')

Nikos Alexandris nik at nikosalexandris.net
Sun Aug 2 13:25:00 PDT 2015


* Markus Neteler <neteler at osgeo.org> [2015-08-02 19:55:46 +0200]:

> 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

Is this relevant to python (scripts) as well?

Nikos



> 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
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev

-- 
Nikos Alexandris | Remote Sensing Scientist, Dr
Themidos 3, 42100, Trikala, Greece
GPG Key Fingerprint 6F9D4506F3CA28380974D31A9053534B693C4FB3 


More information about the grass-dev mailing list