Changes

Jump to: navigation, search

Translation environment4

1,432 bytes added, 16:24, 28 June 2021
m
Usage: ling to Languages portal, that has a list of language codes
{{man note|Current|This page describes the current translation environment used for Gramps '''4.0.x''' to Gramps master'''5.1.x'''.}}
==How it worksUsage==
* Recommended wayTo generate an updated translation template catalog eg: python, ElementTree[http://docs<code>gramps.python.orgpot</library/xml.etree.elementtree.html] and xgettext[httpcode>://www.gnu python update_po.org/savannahpy -checkouts/gnu/gettext/manual/html_node/xgettext-Invocation.html]p
Update the existing translation <code>xx.po</code> file where ''xx'' is your [[Portal:Translators|language code]]:
python update_po.py -m it.po
Merge it.po with current template.... done.
Updated file: 'updated_it.po'.
 
{{stub}}
 
The python program <code>update_po.py</code>, is a parser that uses [http://docs.python.org/library/xml.etree.elementtree.html ElementTree] and [http://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/xgettext-Invocation.html xgettext].
 
<pre>
python update_po.py -h
python update_po.py --help
usage: update_po.py [-h] [-t] [-x] [-g] [-c] [-p] [-m {all, xx.po}] [-k {all, xx.po}] [-u {xx.po}] [-f {xx.po}]
 
This program generates a new template and also provides some common features.
 
optional arguments:
-h, --help show this help message and exit
-t, --test test if 'python' and 'gettext' are properly installed
-x, --xml extract messages from xml based file formats
-g, --glade extract messages from glade file format only
-c, --clean remove created files
-p, --pot create a new catalog
 
Update:
Maintenance around translations
-m merge lang.po files with last catalog
-k check lang.po files
 
Translation:
Display content of translations file
-u list untranslated messages
-f list fuzzy messages
 
python update_po.py [options]
</pre>
For generating a new template:
python update_po.py -p
* ''parser'' generates a new template and also provides some common features.
==== Alternate ways ====
* One wayUsing: intltool (perl), gettext
intltool-update -p
* xgettext and shell
[https://github.com/gramps-project/gramps/blob/master/po/genpot.sh genpot.sh]
===Files and directory===
==See also==
* [[Translating Gramps]]
* [[Translation environment22]]
* [[Translation environment4]]
* See [[GEPS 026: Replace 'make' for Gramps build|Replace make]]. ''completed in 2012 for the release of Gramps 4.0''
[[Category:Translators/Categories]]
[[Category:Developers/General]]
4,529
edits

Navigation menu