Difference between revisions of "Translation environment4"
m |
m (→How it works) |
||
Line 6: | Line 6: | ||
==How it works== | ==How it works== | ||
+ | |||
+ | * intltool (perl), gettext | ||
+ | |||
+ | intltool-update -p | ||
+ | or run: | ||
+ | genpot.sh | ||
* python, ElementTree[http://docs.python.org/library/xml.etree.elementtree.html] and xgettext[http://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/xgettext-Invocation.html] | * python, ElementTree[http://docs.python.org/library/xml.etree.elementtree.html] and xgettext[http://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/xgettext-Invocation.html] | ||
Line 29: | Line 35: | ||
Like with [[Translation_environment22#Files_and_directory|previous environment]], we need to list files with translation strings for retrieving messages and generating a 'po/gramps.pot' file. | Like with [[Translation_environment22#Files_and_directory|previous environment]], we need to list files with translation strings for retrieving messages and generating a 'po/gramps.pot' file. | ||
+ | |||
+ | * gettext, intltool and 'POTFILES.in' file | ||
+ | |||
+ | See [[Translation_environment22]] | ||
* xgettext and 'po/gramps' file | * xgettext and 'po/gramps' file |
Revision as of 14:04, 3 October 2012
This page describes the next translation environment.
See GEPS_026:_Replace_'make'_for_Gramps_build. work in progress (testing stage)
Could be used for Gramps 4.0.x.
How it works
- intltool (perl), gettext
intltool-update -p
or run:
genpot.sh
python update_po.py -h python update_po.py --help
- parser generates a new template and also provides some common features.
- test flag (-t) will test if 'python' and 'gettext' are properly installed.
- extract options are everything around extraction for message strings.
- xml flag (-x) will extract messages from xml based file formats.
- glade flag (-g) will extract messages from glade file format only.
- clean flag (-c) will remove created files.
- pot flag (-p) will create a new catalog.
- update options are everything around update for translation files.
- merge flag (-m) will merge lang.po files with last catalog.
- check flag (-k) will check lang.po files, will try to compile and will also use check_po script.
- translation options are some informations about translation files.
- untranslate flag (-u) will list untranslated messages.
- fuzzy flag (-f) will list fuzzy messages.
Files and directory
Like with previous environment, we need to list files with translation strings for retrieving messages and generating a 'po/gramps.pot' file.
- gettext, intltool and 'POTFILES.in' file
- xgettext and 'po/gramps' file
If you want a script to take your translatable strings into account, you must add your source file path in the file : po/gramps
. For this report example, you should add:
... ../gramps/plugins/leak.py ../gramps/plugins/mediamanager.py ../gramps/plugins/myreport.py # <------ ../gramps/plugins/narrativeweb.py ../gramps/plugins/patchnames.py ...