[GRASS5] i18n GRASS mechanism description
Glynn Clements
glynn.clements at virgin.net
Fri Mar 1 08:18:28 EST 2002
Alex Shevlakov wrote:
> a brief way to create .po and .mo filez:
>
> [user at host:somedir] xgettext -a *.c -o some_module.po
>
> This makes a template which must be edited. Unneeded fields are removed,
> those that correspond to translatable strings are translated. Don't
> forget editing the header with encoding entries.
>
> [user at host:somedir] msgfmt some_module.po -o some_module.mo
>
> This makes the machine file (.mo). Both files would go to
> grass/locale/your_locale/LC_MESSAGES. That's where the prog will
> look for them.
A couple of notes:
1. The .po files should be committed to CVS, and the .mo files should
be constructed during the build process. It would help to have a
standard format for the make rules, so that gmake5 etc can process
them if necessary.
2. Don't blindly localise every string literal. Anything which might
be read by a program (including users' scripts) should probably remain
untranslated.
> Glynn, I think of the mechanism you mentioned as basis for locale maintainers,
> and it is easy to search for diffs between the templates you created last time
> and now.
So locale maintainers will "poll" the source code for changes? That
certainly keeps things simple for the developers.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list