[GRASS translations] Re: gettext macro update

Markus Neteler neteler at itc.it
Wed Nov 17 09:51:45 EST 2004

Dear translators,

to avoid problems with new line characters, we have
to announce a change in the G_message() update
procedure. This changes simply skips step three
and reduces the necessary steps from 4 to 3.

The change:

On Wed, Nov 17, 2004 at 09:53:30 +0100, Markus Neteler wrote:
> c) to remove:
> - \n at the end of single message strings

  -> just DON'T do it. Keep \n if present.


The full procedure again:

Generally, to support i18N multiple languages,
message strings in GRASS must be modified from

 fprintf ( ..., "...\n", ...);
 G_message ( _("...\n"), ...);

Three steps:
1) to replace (see example above:
     a) fprintf (stdout,    with G_message (
     b) fprintf (stderr,    with G_message (

2) to add (see example above):
     the macro _( ) which encapulates the message

3) to be added to file.c header:
     #include "glocale.h"

   This line has to be added to each C file which contains
   user messages, preferably as last #include statement.

All these messages strings will be then automatically
extracted into the message files.

SUMMARY: Keep the message as-is. Only step 1-3 from
above list is needed.

Thanks and sorry for the confusion,


More information about the grass-translations mailing list