Mercurial > hg > savane-forge
changeset 225:33306145a88c
Instructions for translators
author | Sylvain Beucler <beuc@beuc.net> |
---|---|
date | Sun, 01 Aug 2010 11:56:21 +0200 |
parents | 22c52fa20e6c |
children | 1f66481850e4 |
files | TRANSLATIONS.txt doc/DJANGO_I18N |
diffstat | 2 files changed, 64 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/TRANSLATIONS.txt @@ -0,0 +1,58 @@ +Translate Savane in your own language! +====================================== + +Create a translation strings catalog +------------------------------------ + +In a terminal, type: + + ./manage.py makemessages -l XX + +where XX is your language code: +http://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html + +The catalog will be created in locale/XX/LC_MESSAGES/django.po . + +If you don't know how to do that, ask a Savane developer to send you +the translation strings catalog for your language. + +Check if there's a catalog in the previous version of Savane, as the +current version reuses a lot of text strings from it: +http://svn.gna.org/viewcvs/savane/trunk/po/ + + +Editing your .po catalog +------------------------ + +Poedit (PO editor) is a nice graphical editor that can create new .po +files and synchronize them with the Savane source code. Check it out! +http://www.poedit.net/ + +Emacs users can use PO-mode, which runs automatically when editing .po +files (under Debian GNU/Linux, install the 'gettext-el' package). + + +Update your catalog +------------------- + +In a terminal, just type again: + + ./manage.py makemessages -l XX + +Don't use Poedit to update your catalog, as it doesn't know how to +search for strings in the Savane templates (Django format). + + +Testing your translation +------------------------ + +Update locale/XX/LC_MESSAGES/django.po with your latest catalog. + +Then type in a terminal: + + ./manage.py compilemessages + +and restart Savane (see README). + +(You should notice an updated .mo file (not .po) in + locale/XX/LC_MESSAGES/)
--- a/doc/DJANGO_I18N +++ b/doc/DJANGO_I18N @@ -4,6 +4,7 @@ You create them with either: - a monolithic translation catalog + (what we currently use) cd framework/ mkdir locale/ # or conf/locale/ @@ -22,6 +23,7 @@ cd ... django-admin makemessages -a + Monolithic translations are not suited for deploying reusable apps (because they are installed in the projects rather than in the applications). @@ -59,3 +61,7 @@ we'll get a lot fuzzy strings that translators will need to review. Thus let's not worry so much about introducing fuzzy strings: typically let's not keep All Firstcap Titles that cripple Savane 3. + +- The strings discover parser is limited and doesn't understand + "string1" + "string2" on multiple lines, so don't be afraid to use + super-long text lines in the code.