Difference between revisions of "Translation environment22"
(→See also) |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | This page describes the second translation environment. | + | {{man warn|Historical|This page describes the second translation environment last used From Gramps '''2.2.x''' to Gramps '''3.4.x'''.}} |
− | + | ==How it works== | |
− | + | [http://live.gnome.org/TranslationProject/DevGuidelines/Localize%20using%20gettext%20and%20intltool Gnome] provides utilities and a [http://www.gnome.org/~malcolm/i18n/build-changes.html translation framework]: | |
* [http://www.gnu.org/software/autoconf/manual/gettext/msginit-Invocation.html msginit] will generate a standard gettext header. | * [http://www.gnu.org/software/autoconf/manual/gettext/msginit-Invocation.html msginit] will generate a standard gettext header. | ||
* intltool-update will manage template and translations. | * intltool-update will manage template and translations. | ||
Line 21: | Line 21: | ||
# Merges translated strings into key file, ''root'' directory : | # Merges translated strings into key file, ''root'' directory : | ||
intltool-merge -k po/ data/gramps.keys.in data/gramps.keys | intltool-merge -k po/ data/gramps.keys.in data/gramps.keys | ||
+ | |||
+ | ===Files and directory=== | ||
+ | |||
+ | * ''Makefile.am'' and ''intltool'' | ||
+ | |||
+ | If you want a script to take your translatable strings into account, you must add your source file path in the file : <code>po/POTFILES.in</code>. For this report example, you should add: | ||
+ | |||
+ | ... | ||
+ | # plugins directory | ||
+ | src/plugins/AncestorChart2.py | ||
+ | src/plugins/AncestorReport.py | ||
+ | ... | ||
+ | src/plugins/FindDupes.py | ||
+ | src/plugins/Leak.py | ||
+ | src/plugins/MediaManager.py | ||
+ | src/plugins/Myreport.py # <------ | ||
+ | src/plugins/NarrativeWeb.py | ||
+ | src/plugins/PatchNames.py | ||
+ | ... | ||
+ | |||
+ | In this file, the sources are sorted within each directory or category. | ||
+ | |||
+ | You can check missing references (not on <code>POTFILES.in</code> and <code>POTFILES.skip</code>) with the command | ||
+ | /intltool-update -m | ||
+ | into <code>/po</code> directory. | ||
+ | |||
+ | ==See also== | ||
+ | * [[Translating Gramps]] | ||
+ | * [[Translation environment22]] | ||
+ | * [[Translation environment4]] | ||
[[Category:Translators/Categories]] | [[Category:Translators/Categories]] | ||
[[Category:Developers/General]] | [[Category:Developers/General]] |
Latest revision as of 06:28, 8 January 2017
Historical This page describes the second translation environment last used From Gramps 2.2.x to Gramps 3.4.x. |
How it works
Gnome provides utilities and a translation framework:
- msginit will generate a standard gettext header.
- intltool-update will manage template and translations.
- intltool-extract will extract translation strings on .glade and .xml files, by generating files with .h extension.
# Generates a new template (gramps.pot), into /po directory : intltool-update -p
- intltool-merge will merge cached translations into .in files
# Merges translated strings into desktop file, root directory : intltool-merge -d po/ data/gramps.desktop.in data/gramps.desktop
# Merges translated strings into xml file, root directory : intltool-merge -x po/ data/gramps.xml.in data/gramps.xml
# Merges translated strings into key file, root directory : intltool-merge -k po/ data/gramps.keys.in data/gramps.keys
Files and directory
- Makefile.am and intltool
If you want a script to take your translatable strings into account, you must add your source file path in the file : po/POTFILES.in
. For this report example, you should add:
... # plugins directory src/plugins/AncestorChart2.py src/plugins/AncestorReport.py ... src/plugins/FindDupes.py src/plugins/Leak.py src/plugins/MediaManager.py src/plugins/Myreport.py # <------ src/plugins/NarrativeWeb.py src/plugins/PatchNames.py ...
In this file, the sources are sorted within each directory or category.
You can check missing references (not on POTFILES.in
and POTFILES.skip
) with the command
/intltool-update -m
into /po
directory.