[GRASS translations] Re: [GRASS-dev] Re: fprintf in raster modules
converted to G_message
Jachym Cepicky
jachym.cepicky at centrum.cz
Sat Dec 23 16:44:13 EST 2006
hi,
I tryed this patch for glocale.h, which sets standard messages, which
should be used in all grass modules.
it worked for r.average quite well, but when I updated .po files, new
messages did not appear.
could someone tell me, how to add glocale.h to list of files, which are
searched trough by running "make pot" ?
thanks
Jachym
On Thu, Dec 14, 2006 at 10:55:31AM +0000, Glynn Clements wrote:
>
> Hamish wrote:
>
> > > My suggestion is:
> > >
> > > Index: include/glocale.h
> > > ===================================================================
> > > RCS file: /grassrepository/grass6/include/glocale.h,v
> > > retrieving revision 2.2
> > > diff -u -r2.2 glocale.h
> > > --- include/glocale.h 26 Nov 2006 21:32:36 -0000 2.2
> > > +++ include/glocale.h 13 Dec 2006 18:51:56 -0000
> > > @@ -1,6 +1,11 @@
> > > #ifndef GRASS_GLOCALE_H
> > > #define GRASS_GLOCALE_H
> > >
> > > +#define ERRMSG_RASTER_OPEN_FILE _("Unable to find raster map <%s>")
> > > +#define ERRMSG_VECTOR_OPEN_FILE _("Unable to find vector map <%s>")
> > > +#define ERRMSG_ASCII_OPEN_FILE _("Unable to find ASCII file <%s>")
> > > +#define ERRMSG_OTHER_OPEN_FILE _("Unable to find file <%s>")
> >
> >
> > Will that hardcode whatever language GRASS was built with as the
> > only translation it can use for those messages? Or will the _(macros)
> > survive the build process and be processed normally at run-time?
>
> Macros are substituted by the preprocessor, so there's no difference
> between:
>
> G_fatal_error(ERRMSG_RASTER_OPEN_FILE, mapname);
> and:
> G_fatal_error(_("Unable to find raster map <%s>"), mapname);
>
> so far as the resulting object file is concerned.
>
> In either case, the code which is actually compiled will be either:
>
> G_fatal_error(("Unable to find raster map <%s>"), mapname);
> or:
> G_fatal_error(G_gettext(PACKAGE,("Unable to find raster map <%s>")), mapname);
>
> depending upon whether I18N is enabled (in the latter case, PACKAGE
> will have been expanded to either "grasslibs" or "grassmods").
>
> --
> Glynn Clements <glynn at gclements.plus.com>
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
--
Jachym Cepicky
e-mail: jachym.cepicky at centrum.cz
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub
-----------------------------------------
OFFICE:
Department of Geoinformation Technologies
Zemedelska 3
613 00, Brno
Czech Republick
e-mail: xcepicky at node.mendelu.cz
URL: http://mapserver.mendelu.cz
Tel.: +420 545 134 514
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.osgeo.org/pipermail/grass-translations/attachments/20061223/292233a7/attachment.bin
More information about the grass-translations
mailing list