[GRASS5] french translation for GRASS-5.7 CVS

Glynn Clements glynn.clements at virgin.net
Tue Sep 28 00:01:49 EDT 2004


Emmanuel Saracco wrote:

> > I have created a french translation for GRASS-5.7 (CVS version),
> > "locale/po/grassmods_fr.po" (100% done) and "locale/po/grasslibs_fr.po"
> > (70% done).
> > 
> > now I want to know how I can commit it on CVS, or on which E-Mail
> > address I can send my patch. Moritz Lennert advised me to send it first
> > to Markus Neteler. is it ok?
> > 
> > is it possible to have write access on CVS to maintain it myself and why
> > not "gettextize" current code?
> 
> here it is.

I had a brief look through these files, and I have two points:

1. I've changed the implementation of the error message in
lib/gis/get_ellipse.c. The message attempts to handle the
singular/plural distinction correctly, but was rather awkward in the
way that it did so. It used to read:

    /* for i18n this is not very inconvenient grammar*/
    
    sprintf (buf, _("Line%s%s of ellipsoid table file <%s> %s invalid"),
	err==1?"":_("s"), badlines, file, err==1?_("is"):_("are"));
    fatal ? G_fatal_error(buf) : G_warning (buf);

I've changed it to use two different format strings:

    (fatal ? G_fatal_error : G_warning)(
	(err > 1)
	    ? _("Lines%s of ellipsoid table file <%s> are invalid")
	    : _("Line%s of ellipsoid table file <%s> is invalid"),
	badlines, file);

That change affects the following entries in the grasslibs_fr.po file:

	#: ../lib/gis/get_ellipse.c:318
	#, c-format
	msgid "Line%s%s of ellipsoid table file <%s> %s invalid"
	msgstr ""
	"La ligne%s%s du fichier <%s> %s de la table de l'ellipsoïde est invalide"
	
	#: ../lib/gis/get_ellipse.c:319
	msgid "s"
	msgstr "s"
	
	#: ../lib/gis/get_ellipse.c:319
	msgid "is"
	msgstr "est"
	
	#: ../lib/gis/get_ellipse.c:319
	msgid "are"
	msgstr "sont"

2. I note that the "keywrd" field in the history file is
internationlised, in lib/gis/history.c, line 154:

    sprintf(hist->keywrd,_("generated by %s"), G_program_name());

I'm not sure that we should be internationalising strings which are
written to files. The creator's locale setting should affect the text
which they see, but shouldn't necessarily determine the text in any
files which they create.

3. UTF-8 isn't a good choice for message catalogs. Much of GRASS won't
handle multi-byte encodings correctly (e.g. curses assumes 1 byte == 1
character == 1 cell). I suggest using single-byte encodings such as
ISO-8859-1 instead (FWIW, Alex' Russian translation is in KOI8-R).

E.g. regarding the French translation for the message in point 2:

	#: ../lib/gis/history.c:154
	#, c-format
	msgid "generated by %s"
	msgstr "généré par %s"

If this text is written to a terminal which doesn't use UTF-8 (and
UTF-8 terminals are still in the minority), it will appear as garbage;
e.g. if the terminal uses ISO-8859-1, "généré" will appear as
"généré".

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list