X-Git-Url: http://git.jankratochvil.net/?p=gnokii.git;a=blobdiff_plain;f=Docs%2Fdevelopers%2Fgnokii%2Fgettext-howto;h=c24e67de78fe4ffaaf9e2221b895bb9bb1948a70;hp=b014220fd7b6985a4d6daedb5f86c8b1bc4a8ea8;hb=d26d783c1703086d1774b5ef7e2dafec8c48e308;hpb=833e1c7c90e13ceaba3dde8e7a36fcc8dfb1db3c diff --git a/Docs/developers/gnokii/gettext-howto b/Docs/developers/gnokii/gettext-howto index b014220..c24e67d 100644 --- a/Docs/developers/gnokii/gettext-howto +++ b/Docs/developers/gnokii/gettext-howto @@ -1,102 +1,102 @@ -1. What do I need? - -- a reasonably recent version of GNU gettext (e.g. 0.10.35) - Check the version using e.g. msgfmt -V - -- autoconf - -- gnokii distribution :-) - -- if you have the variable LINGUAS in the environment - (most Red Hats have, no idea about other distributions), - unset it - - -2. How to make gnokii.pot file? - -gnokii.pot file is a collection of all localizable strings -in the gnokii package. It will be generated automagically -and is included in the standard distribution package. - -If you need to regenerate it, goto "po" directory, -remove gnokii.pot and say - - make gnokii.pot - - -3.1 How to start translating for a new language? - -First, you would like to contact the authors or write -to the mailing list - maybe there already is someone -working on this translation. - -If you get the OK from the maintainer, there are several -steps to do: - -- add the code of your language to the ALL_LINGUAS line - in the configure.in file - - Caution: the language code may differ from the country - code, e.g. czech language is cs, Czech Republic is cz - -- run autoconf to recreate configure script - -- reconfigure the package (./configure) - -- in the po directory, copy gnokii.pot to .po - -- start translating - - -3.2 How to merge existing translations with the updated gnokii.pot? - -This is simple. Rename the old file and use msgmerge to create -an updated one: - - mv cs.po cs.po.bak - msgmerge -o cs.po cs.po.bak gnokii.pot - - -4. How to generate a .mo file - -When you say make in the po directory, all existing -translations will be generated. The suffix will be .gmo. - -If you want to do this manually, use the msgfmt utility, e.g. - - msgfmt -o cs.mo -v cs.po - - -5. How to install the files - -Again, the makefile takes care of this. Simply use (as root) - - make install - -in the po directory. If you want to do this manually (and/or -for your language only), move the .mo file to -/usr/share/locale//LC_MESSAGES/gnokii.mo - - -I'm from Czech republic, so I did (well, I did not, but if you would -like to localize gnokii, you should :-): - - cd po - make gnokii.pot - cp gnokii.pot cs.po - - msgfmt -o cs.mo -v cs.po - make - make install - -And now: - -SnowWhite:/tmp/gnokii$ export LC_MESSAGES=cs_CZ -SnowWhite:/tmp/gnokii$ ./gnokii --version -GNOKII Version 0.3.1 Copyright (C) Hugh Blemings 1999. - Kompilace: 19:09:02 Mar 13 1999 pro model 6110 na portu /dev/ttyS0 -SnowWhite:/tmp/gnokii$ - -The second line is in czech language :-) There are some problems - for -example with "Mar" which is substitute by the C preprocessor. - +1. What do I need? + +- a reasonably recent version of GNU gettext (e.g. 0.10.35) + Check the version using e.g. msgfmt -V + +- autoconf + +- gnokii distribution :-) + +- if you have the variable LINGUAS in the environment + (most Red Hats have, no idea about other distributions), + unset it + + +2. How to make gnokii.pot file? + +gnokii.pot file is a collection of all localizable strings +in the gnokii package. It will be generated automagically +and is included in the standard distribution package. + +If you need to regenerate it, goto "po" directory, +remove gnokii.pot and say + + make gnokii.pot + + +3.1 How to start translating for a new language? + +First, you would like to contact the authors or write +to the mailing list - maybe there already is someone +working on this translation. + +If you get the OK from the maintainer, there are several +steps to do: + +- add the code of your language to the ALL_LINGUAS line + in the configure.in file + + Caution: the language code may differ from the country + code, e.g. czech language is cs, Czech Republic is cz + +- run autoconf to recreate configure script + +- reconfigure the package (./configure) + +- in the po directory, copy gnokii.pot to .po + +- start translating + + +3.2 How to merge existing translations with the updated gnokii.pot? + +This is simple. Rename the old file and use msgmerge to create +an updated one: + + mv cs.po cs.po.bak + msgmerge -o cs.po cs.po.bak gnokii.pot + + +4. How to generate a .mo file + +When you say make in the po directory, all existing +translations will be generated. The suffix will be .gmo. + +If you want to do this manually, use the msgfmt utility, e.g. + + msgfmt -o cs.mo -v cs.po + + +5. How to install the files + +Again, the makefile takes care of this. Simply use (as root) + + make install + +in the po directory. If you want to do this manually (and/or +for your language only), move the .mo file to +/usr/share/locale//LC_MESSAGES/gnokii.mo + + +I'm from Czech republic, so I did (well, I did not, but if you would +like to localize gnokii, you should :-): + + cd po + make gnokii.pot + cp gnokii.pot cs.po + + msgfmt -o cs.mo -v cs.po + make + make install + +And now: + +SnowWhite:/tmp/gnokii$ export LC_MESSAGES=cs_CZ +SnowWhite:/tmp/gnokii$ ./gnokii --version +GNOKII Version 0.3.1 Copyright (C) Hugh Blemings 1999. + Kompilace: 19:09:02 Mar 13 1999 pro model 6110 na portu /dev/ttyS0 +SnowWhite:/tmp/gnokii$ + +The second line is in czech language :-) There are some problems - for +example with "Mar" which is substitute by the C preprocessor. +