Laxkit
0.0.7.1
|
All of this refers to the goings on in the src/po directory. For more info on just what the hell all these po things are, you can look up the gettext manual at: http://www.gnu.org/software/gettext/manual/gettext.html
Any po files you make MUST be encoded as UTF-8 characters.
————————– Updating Basic Info ———————–
- POTFILES is a list of files to grab translatable strings from. To regenerate that file, do: make potfiles If there is an error saying something about missing Makefile-toinclude, then you will need to configure the Laxkit: cd ../..; ./configure
- laxkit.pot is base template file. Refresh with: make update This will make a file laxkit-freshdump.pot, and merge it with any existing laxkit.pot. laxkit-freshdump.pot may be removed at this point. laxkit.pot is the file you want.
————————– Making New Translations ——————-
- Update the basic info as above.
- Now make the necessary changes to that pot file, and save to the correct language name in this directory. For instance, canadian english would be en_CA.po. You might use a program like kbabel to help edit the file. If you do it by hand, then you really just need to know that the things beginning with msgid are the original strings, and the msgstr things are the translated strings. For more info on just what the hell all these po things are, you can look up the gettext manual at: http://www.gnu.org/software/gettext/manual/gettext.html
- Tell the developers there's a new translation available, and make sure they include your .po file in the source tree.
———————– Installation of the translation files —————
- Plain "make" will compile all the .po files found there.
- "make install" will install the .mo files to (prefix)/share/locale/*/LC_MESSAGES/laxkit.mo This is called automatically when you type "make install" in the top Laxkit directory.
- Go learn some more languages and make new translations!
————————– Updating Old Translation Files ———————-
- Do the steps in "Updating Basic Info" above.
- Now run this command: msgmerge your_old_po_file.po laxkit.pot > your_updated_po_file.po Now the your_updated_po_file.po file will contain all the currently needed strings, preserving all the old translations, as long as they are still needed. Now just translate the new strings, and put it in place of your_old_po_file.po.
———–For reference, here's the basics of translation file management: ————-
xgettext -C -d laxkit –files-from POTFILES -o laxkit.pot –keyword=_ –flag=_:1:pass-c-format
—-> makes a pot file, usually from a file called po/POTFILES, with translatable strings listed then, edit that file to have a proper header, and make it a master po file. translators make their own en_CA.po, es.po, etc based on the master pot file
- msgmerge old.pot new.pot > newest.pot will merge new strings with an existing pot file
- msgfmt converts the .po files into .mo (or .gmo) files
these are installed typically in /usr/share/locale/en_CA/LC_MESSAGES/thedomainname.mo, or /share/locale/...
foreach *.mo install /share/locale/
basename $NAME .po
/LC_MESSAGES/laxkit.mo