(Created page with "== Gettext notes == === Upgrade manaplus translation file === To add new untranslated lines do: $ cd manaplus_src/po $ make update-po === Test potfile === Compile...") |
m |
||
Line 3: | Line 3: | ||
=== Upgrade manaplus translation file === | === Upgrade manaplus translation file === | ||
To add new untranslated lines do: | To add new untranslated lines in manaplus do: | ||
$ cd manaplus_src/po | $ cd manaplus_src/po | ||
$ make update-po | $ make update-po | ||
(which in its order does msgmerge). | |||
=== Test potfile === | === Test potfile === | ||
Validate for critical errors (like c-format) and output translation stats | |||
(number of fuzzy lines, number of translated and untranslated lines): | |||
$ msgfmt -cv xx.po | |||
Compile manaplus with new language support, with e.g. --prefix=$HOME/.opt , | Compile manaplus with new language support, with e.g. --prefix=$HOME/.opt , | ||
Line 22: | Line 29: | ||
msgfmt part of gettext distribution. | msgfmt part of gettext distribution. | ||
=== | === Helper tools === | ||
Get gettext-lint tools, then use POFileChecker. Output suggests missed commas and few other common errors. | |||
=== Client data testing === | === Client data testing === |
Latest revision as of 08:35, 28 December 2014
Gettext notes
Upgrade manaplus translation file
To add new untranslated lines in manaplus do:
$ cd manaplus_src/po $ make update-po
(which in its order does msgmerge).
Test potfile
Validate for critical errors (like c-format) and output translation stats (number of fuzzy lines, number of translated and untranslated lines):
$ msgfmt -cv xx.po
Compile manaplus with new language support, with e.g. --prefix=$HOME/.opt , convert .po to .mo and place into manaplus shared path.
$ msgfmt -o xx.mo xx.po
Default paths:
- help - $prefix/share/manaplus/data/translations/help
- gui - $prefix/share/locale
msgfmt part of gettext distribution.
Helper tools
Get gettext-lint tools, then use POFileChecker. Output suggests missed commas and few other common errors.
Client data testing
Build own local testing server, place translation file xx.po to path client-data/translations .
See: https://wiki.themanaworld.org/index.php/How_to_Develop
Register GM character, set client custom game data location and use /createitems dialog to display all items (this can slow down your box).
Placing local updates file
This is helpful in case you don't have testing server.
Zip target files conforming to client-data structure, place resulted .zip to updates folder (default for tmw can be ~/.local/share/mana/update/tmwdata.org/updates/local ). Then generate adler32 checksum (see e.g. tmwa-server-data/tools) and put in resources.xml, like:
<?xml version="1.0"?> <updates> <update type="data" file="urfixhere.zip" hash="840ff7bf" /> </updates>