[GRASS-dev] [GRASS-SVN] r60669 - grass/trunk/vector/v.vol.rst
Markus Neteler
neteler at osgeo.org
Mon Jun 2 07:24:16 PDT 2014
Hi,
if I may make a suggestion on the message translation:
On Mon, Jun 2, 2014 at 4:14 PM, <svn_grass at osgeo.org> wrote:
> Author: hcho
> Date: 2014-06-02 07:14:16 -0700 (Mon, 02 Jun 2014)
> New Revision: 60669
>
> Modified:
> grass/trunk/vector/v.vol.rst/dataoct.c
> grass/trunk/vector/v.vol.rst/main.c
> grass/trunk/vector/v.vol.rst/user1.c
> grass/trunk/vector/v.vol.rst/user2.c
> grass/trunk/vector/v.vol.rst/user3.c
> grass/trunk/vector/v.vol.rst/vector.c
> Log:
> v.vol.rst: translate error/warning messages
All these messages need now to be translated separately (translator "hell" :):
> - G_fatal_error("Not enough memory for az");
> + G_fatal_error(_("Not enough memory for az"));
> adx = (double *)G_malloc(sizeof(double) * (n_cols + 1));
> if (!adx)
> - G_fatal_error("Not enough memory for adx");
> + G_fatal_error(_("Not enough memory for adx"));
> ady = (double *)G_malloc(sizeof(double) * (n_cols + 1));
> if (!ady)
> - G_fatal_error("Not enough memory for ady");
> + G_fatal_error(_("Not enough memory for ady"));
> adxx = (double *)G_malloc(sizeof(double) * (n_cols + 1));
> if (!adxx)
[...]
A better way may be (needs to be properly declared, just as example)
G_fatal_error(_("Not enough memory for %s"), mapname);
This reduces the work to one string and the rest comes in dynamically.
Furthermore it would be good to sync the messages to v.surf.rst to
make them as identical as possible.
Some best practice is described here:
https://trac.osgeo.org/grass/wiki/MessageStandardization
(which I now liked at
http://grasswiki.osgeo.org/wiki/GRASS_messages_translation)
Best
Markus
More information about the grass-dev
mailing list