[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Maposmatic-dev] [PATCH ocitysmap] Update I18N documentation file for ne
From: |
David MENTRE |
Subject: |
[Maposmatic-dev] [PATCH ocitysmap] Update I18N documentation file for new i18n.py script |
Date: |
Wed, 20 Jan 2010 20:05:13 +0100 |
---
I18N | 43 ++++++++++++++++++++-----------------------
1 files changed, 20 insertions(+), 23 deletions(-)
diff --git a/I18N b/I18N
index e16e24e..4824b67 100644
--- a/I18N
+++ b/I18N
@@ -8,42 +8,39 @@ Gettext manual.
Updating the template file
--------------------------
-This template file is created by extracting all strings from the code
-into a .pot (PO template) file :
+Do:
+ ./i18n.py --make-pot
- xgettext -o ocitysmap.pot -p locale ocitysmap/street_index.py
ocitysmap/draw_utils.py
-
-Currently, only ocitysmap/street_index.py and ocitysmap/draw_utils.py
-contain translated strings. The .pot file is generated in
-locale/ocitysmap.pot.
+The file "locale/ocitysmap.pot" is now up-to-date with the code.
Updating an existing translation
--------------------------------
-Once the template file has been updated, the new version can be merged
-with an older translation using the 'msgmerge' tool:
-
- msgmerge -U locale/fr/LC_MESSAGES/ocitysmap.po locale/ocitysmap.pot
+Do:
+ ./i18n.py --make-po
-Then edit the locale/fr/LC_MESSAGES/ocitysmap.po file with poedit or
-another .po file editor.
+Then edit the locale/YOUR_COUNTRY_CODE/LC_MESSAGES/ocitysmap.po file
+with poedit or another .po file editor.
Tip: refer to http://wiki.openstreetmap.org/wiki/Map_Features for
official translations of several words used in OpenStreetMap.
-Create a translation for a new language
----------------------------------------
+Compiling the message file
+--------------------------
-This must be done using the 'msginit' tool.
+Do:
+ ./i18n.py --compile-mo
- * To build .pot file
+Create a translation for a new language
+---------------------------------------
- ocitysmap$ pygettext -d ocitysmap -p locale ocitysmap/street_index.py
+Do:
+ ./i18n.py --new-language=LANGUAGE_CODE
- * Make the .po file for your language. Look at Map_Features in your
- language to find correct transaltions:
+Where LANGUAGE_CODE is like fr_FR, it, pt_BR, ...
-Compiling the message file
---------------------------
+Then edit the locale/LANGUAGE_CODE/LC_MESSAGES/ocitysmap.po file with
+poedit or another .po file editor.
- ocitysmap$ msgfmt -o locale/fr/LC_MESSAGES/ocitysmap.mo
locale/fr/LC_MESSAGES/ocitysmap.po
+Tip: refer to http://wiki.openstreetmap.org/wiki/Map_Features for
+official translations of several words used in OpenStreetMap.
--
1.6.0.4