[GRASS-user] bash scripts and NLS

Hamish hamish_nospam at yahoo.com
Wed Mar 28 02:10:41 EDT 2007


Jarek:
> > ...d.what.vect -1 -t  map=lines|grep category|awk '{print
> > $2}'>>cat.txt...
> > 
> > I compiled grass with NLS (national languages suports) and script
> > stop  working becouse there is no category (grep) but kategoria
> > (category in  polish). In my few scripts it is no problem (or rather
> > I will never use  NLS), but what about scripts in grass add-ons and
> > nls?

Glynn:
> If a script parses output which is meant to be human-readable, it
> needs to explicitly set the locale to "C" for that command, e.g.:
> 
> 	LC_ALL=C d.what.vect -1 -t ...


d.what.vect's -t specifically says it is for parsing:

  -t   Terse output. For parsing by programs

the i18n is not new, it's been there for 2.3 years. (but maybe the
translation is)



so a question: should std output intended for parsing be strictly
english only? (as debug messages are)

e.g. north: south: etc by g.region -p  (not talking about g.region -g)
[-p is currently not translated]


Hamish




More information about the grass-user mailing list