<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.gramps-project.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Translation_environment4%2Fhe</id>
	<title>Translation environment4/he - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.gramps-project.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Translation_environment4%2Fhe"/>
	<link rel="alternate" type="text/html" href="https://www.gramps-project.org/wiki/index.php?title=Translation_environment4/he&amp;action=history"/>
	<updated>2026-06-07T07:04:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.3</generator>
	<entry>
		<id>https://www.gramps-project.org/wiki/index.php?title=Translation_environment4/he&amp;diff=103977&amp;oldid=prev</id>
		<title>Avma: copy en page</title>
		<link rel="alternate" type="text/html" href="https://www.gramps-project.org/wiki/index.php?title=Translation_environment4/he&amp;diff=103977&amp;oldid=prev"/>
		<updated>2024-04-25T10:24:02Z</updated>

		<summary type="html">&lt;p&gt;copy en page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;div dir=&amp;quot;rtl&amp;quot; lang=&amp;quot;he&amp;quot; class=&amp;quot;mw-content-rtl&amp;quot;&amp;gt;&lt;br /&gt;
{{languages/he|Translation environment4}}&lt;br /&gt;
{{man note|Current|This page describes the current translation environment used for Gramps '''4.0.x''' to Gramps '''5.1.x'''.}}&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
To generate an updated translation template catalog eg:&amp;lt;code&amp;gt;gramps.pot&amp;lt;/code&amp;gt;:&lt;br /&gt;
 python update_po.py -p&lt;br /&gt;
&lt;br /&gt;
Update the existing translation &amp;lt;code&amp;gt;xx.po&amp;lt;/code&amp;gt; file where ''xx'' is your [[Portal:Translators|language code]]:&lt;br /&gt;
 python update_po.py -m it.po&lt;br /&gt;
     Merge it.po with current template.... done.&lt;br /&gt;
     Updated file: 'updated_it.po'.&lt;br /&gt;
&lt;br /&gt;
{{stub}}&lt;br /&gt;
&lt;br /&gt;
The python program &amp;lt;code&amp;gt;update_po.py&amp;lt;/code&amp;gt;, 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].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 python update_po.py -h&lt;br /&gt;
 python update_po.py --help&lt;br /&gt;
     usage: update_po.py [-h] [-t] [-x] [-g] [-c] [-p] [-m {all, xx.po}] [-k {all, xx.po}] [-u {xx.po}] [-f {xx.po}]&lt;br /&gt;
&lt;br /&gt;
     This program generates a new template and also provides some common features.&lt;br /&gt;
&lt;br /&gt;
     optional arguments:&lt;br /&gt;
       -h, --help            show this help message and exit&lt;br /&gt;
       -t, --test            test if 'python' and 'gettext' are properly installed&lt;br /&gt;
       -x, --xml             extract messages from xml based file formats&lt;br /&gt;
       -g, --glade           extract messages from glade file format only&lt;br /&gt;
       -c, --clean           remove created files&lt;br /&gt;
       -p, --pot             create a new catalog&lt;br /&gt;
&lt;br /&gt;
     Update:&lt;br /&gt;
       Maintenance around translations&lt;br /&gt;
       -m                    merge lang.po files with last catalog&lt;br /&gt;
       -k                    check lang.po files&lt;br /&gt;
&lt;br /&gt;
     Translation:&lt;br /&gt;
       Display content of translations file&lt;br /&gt;
       -u                    list untranslated messages&lt;br /&gt;
       -f                    list fuzzy messages&lt;br /&gt;
&lt;br /&gt;
 python update_po.py [options]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ''parser'' generates a new template and also provides some common features.&lt;br /&gt;
** test flag (-t) will test if 'python' and 'gettext' are properly installed.&lt;br /&gt;
* ''extract'' options are everything around extraction for message strings.&lt;br /&gt;
** xml flag (-x) will extract messages from xml based, ini and desktop files.&lt;br /&gt;
** glade flag (-g) will extract messages from glade file format only.&lt;br /&gt;
** clean flag (-c) will remove created files.&lt;br /&gt;
** pot flag (-p) will create a new catalog.&lt;br /&gt;
* ''update'' options are everything around update for translation file(s).&lt;br /&gt;
** merge flag (-m) will merge '''lang.po file(s)''' with last catalog.&lt;br /&gt;
** check flag (-k) will check '''lang.po file(s)''', will try to compile and will also use ''check_po'' script.&lt;br /&gt;
* ''translation'' options provide some information about one translation file.&lt;br /&gt;
** untranslate flag (-u) will list untranslated messages on '''lang.po file'''.&lt;br /&gt;
** fuzzy flag (-f) will list fuzzy messages on '''lang.po file'''.&lt;br /&gt;
&lt;br /&gt;
==== Alternate ways ====&lt;br /&gt;
* Using: intltool (perl), gettext&lt;br /&gt;
&lt;br /&gt;
 intltool-update -p&lt;br /&gt;
&lt;br /&gt;
which should be considered as incomplete, see [[Talk:Translation_environment4|differences between tools]].&lt;br /&gt;
&lt;br /&gt;
* xgettext and shell&lt;br /&gt;
&lt;br /&gt;
 [https://github.com/gramps-project/gramps/blob/master/po/genpot.sh genpot.sh]&lt;br /&gt;
&lt;br /&gt;
===Files and directory===&lt;br /&gt;
&lt;br /&gt;
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. Process is now only using ''gettext'' and ''python''.&lt;br /&gt;
&lt;br /&gt;
* gettext, 'POTFILES.in' and 'POTFILES.skip' files&lt;br /&gt;
&lt;br /&gt;
If you want a script to take your translatable strings into account, you must add your source file path in the file : &amp;lt;code&amp;gt;po/POTFILES.in&amp;lt;/code&amp;gt;. For this report example, you should add:&lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
 gramps/plugins/leak.py&lt;br /&gt;
 gramps/plugins/mediamanager.py&lt;br /&gt;
 gramps/plugins/myreport.py                # &amp;lt;------&lt;br /&gt;
 gramps/plugins/narrativeweb.py&lt;br /&gt;
 gramps/plugins/patchnames.py&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We can still check if some references are missing via:&lt;br /&gt;
 $ intltool-update -m&lt;br /&gt;
&lt;br /&gt;
==Translating man pages==&lt;br /&gt;
&lt;br /&gt;
You can also translate the [https://en.wikipedia.org/wiki/Man_page man pages]  (short for '''manual page''' a form of software documentation on Linux systems) into your own language.&lt;br /&gt;
&lt;br /&gt;
For the development version (master branch) you can find the required starting files under the directory [https://github.com/gramps-project/gramps/tree/master/data/man /data/man].&lt;br /&gt;
&lt;br /&gt;
You need at least [http://docutils.sourceforge.net/ docutils package].&lt;br /&gt;
&lt;br /&gt;
Some of the files you will find in the &amp;lt;code&amp;gt;data/man&amp;lt;/code&amp;gt; directory are:&lt;br /&gt;
*&amp;lt;code&amp;gt;update_man.py&amp;lt;/code&amp;gt;&lt;br /&gt;
*&amp;lt;code&amp;gt;en.rst&amp;lt;/code&amp;gt;&lt;br /&gt;
*&amp;lt;code&amp;gt;gramps.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First off all you must make a directory for your language under [https://github.com/gramps-project/gramps/tree/master/data/man data/man].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cd data/man&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and on Linux run the following command &amp;lt;code&amp;gt;mkdir xx&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;xx&amp;lt;/code&amp;gt; is your two letter [https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes language code] (fr for French, sv for Swedish, etc.) &lt;br /&gt;
&lt;br /&gt;
Next step is to copy the &amp;lt;code&amp;gt;en.rst&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;data/man&amp;lt;/code&amp;gt; to your new directory and rename it to your language code eg: &amp;lt;code&amp;gt;fr.rst&amp;lt;/code&amp;gt; for French.&lt;br /&gt;
&lt;br /&gt;
Then translate all relevant strings in the &amp;lt;code&amp;gt;data/man/xx/xx.rst&amp;lt;/code&amp;gt; file. &lt;br /&gt;
&lt;br /&gt;
Edit the file [https://github.com/gramps-project/gramps/blob/master/data/man/update_man.py data/man/update_man.py] and search for following line &amp;lt;code&amp;gt;LANGUAGES = ['sv', 'nl', 'pl', 'cs', 'pt_BR', 'fr', 'xx']&amp;lt;/code&amp;gt; where 'xx' is your new language. Save the file.&lt;br /&gt;
&lt;br /&gt;
Run data/man/update_man.py:&lt;br /&gt;
&amp;lt;code&amp;gt;$ python update_man.py -m&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All changes must be committed and pushed to your server (You should use Git. See [[Brief_introduction_to_Git| the introduction to Git]].):&lt;br /&gt;
 git commit -am &amp;quot;Add man page for xx&amp;quot;&lt;br /&gt;
 git push&lt;br /&gt;
&lt;br /&gt;
To see the result of your work, do:&amp;lt;code&amp;gt;$ man xx/gramps.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Translating Gramps]]&lt;br /&gt;
* [[Translation environment22]]&lt;br /&gt;
* [[Translation environment4]]&lt;br /&gt;
* See [[GEPS 026: Replace 'make' for Gramps build|Replace make]]. ''completed in 2012 for the release of Gramps 4.0''&lt;br /&gt;
&lt;br /&gt;
[[Category:Translators/Categories]]&lt;br /&gt;
[[Category:Developers/General]]&lt;/div&gt;</summary>
		<author><name>Avma</name></author>
		
	</entry>
</feed>