view MoinMoin/i18n/README @ 0:77665d8e2254

tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0 (automatically generated log message) imported from: moin--main--1.5--base-0
author Thomas Waldmann <tw-public@gmx.de>
date Thu, 22 Sep 2005 15:09:50 +0000
parents
children 9fb4124ea499
line wrap: on
line source
Translators and Developers,

The data flow for i18n stuff has completely changed, so please read this.

Translators need to deal with the *.po files ONLY - do not touch anything else,
especially do not update <lang>.py files as you used to in previous versions.

In moin 1.3 we switched the i18n system to use wiki markup instead html - you
should change the header of your *.po file after adapting to wiki markup,
see de.po for a sample.

Encoding: please use utf-8 ONLY for the po file you submit.

If you don't like to edit using utf-8, see the section below about non-utf-8
editing.

For using the i18n build system, one needs to have "gettext" (e.g. from Debian
unstable) installed. For simply translating text, you do not need it, you can
use a text editor.

Translators should search their *.po file for "fuzzy" - this marks places
needing work. If you have reviewed these places, remove the "fuzzy" marker.

In the source code, there is original english text marked with
_("english string") - xgettext can extract these strings automatically from
the files listed in POTFILES.in.

As not all strings appear in the source code, there is an additional
file i18n/dummy.py that contains strings that need to be translated, but
do not appear in src otherwise or are not found by gettext.



Files
=====

Makefile: a GNU-Makefile

POTFILES.in: a list of files with translatable strings

MoinMoin.pot: Master translation file.

*.po: Translations (utf-8 encoding)

*.py: Translations automatically converted from *.po

build_lang_py: converts the po files into old-style MoinMoin translations,
               like de.py.

meta.py: meta data, automatically built from *.py lang files

build_meta_py: collects and converts the meta infos from the py files to meta.py.


New Translation (no .po file exists yet)
========================================
- copy MoinMoin.pot to <langcode>.po
- edit the header of <langcode>.po (this is the first entry in the file, it
  starts with Project-Id-Version)
  - Project-Id-Version: MoinMoin 1.3
  - Content-Type: text/plain; charset=utf-8
  - Language-Team: LANGUAGE mailinglist
    LANGUAGE should be your language in english, in long form - e.g.:
    German, French, ...
  - X-Language: LANGUAGE
    LANGUAGE should be your language expressed in your language, e.g.:
    Deutsch, Francais (with c-cedille), ...

Update Translation
==================
- run "make <langcode>.po"
- change the translation
- update the PO-Revision-Date and Last-Translator entries
- run "make <langcode>.py"

Change of translatable strings
==============================
If you change any translatable string, please call "make update-po" before
commit.

Regenerating all
================
- run "make" to re-generate everything needed, like:
  - all *.py language files
  - meta.py file with language meta data


You have some xx.py file and want to make a xx.po out of it
===========================================================

Copy it to i18n/xx.py and run:

python py-to-po xx

Then continue like described above.


Non-utf-8 editing
=================

If you don't like to use a utf-8 capable editor, you could process the po like
that:

Recode the po file to your preferred encoding (e.g. iso-8859-1). Be very sure
that this is possible or you will get errors:

> ./recode.py utf-8 iso-8859-1 <de.po >de.po-iso1

Edit that file and do your work:

> $EDITOR de.po-iso1

Recode your work back to utf-8 for submission. This should generally work if
you specify the "from" encoding (here: iso-8859-1) correctly:

> ./recode.py iso-8859-1 utf-8 <de.po-iso1 >de.po-utf8

Now maybe use this to make sure nothing weird happened:

> diff de.po de.po-utf8

Finally, if everything looked OK:

> mv de.po-utf8 de.po

Also make sure that the Content-Type header in the po file tells charset=utf-8.