73 lines
No EOL
2.8 KiB
Text
73 lines
No EOL
2.8 KiB
Text
TRANSLATION TOOL, V3.0:
|
|
======================
|
|
|
|
This transation tool should greatly help Koha translators. It's composed of
|
|
2 scripts:
|
|
|
|
* xgettext.pl, that extracts the texts in a template, and which is called by
|
|
the script
|
|
* tmpl_process3.tmpl, which can do 3 things:
|
|
+ create a file with all the "translatable strings" in all files in a
|
|
directory (& its subdirectories)
|
|
+ update an existing translation file.
|
|
+ rebuild translated templates from english & translation file.
|
|
|
|
Call tmpl_process3.pl --help to get a more detailed explanation. Some
|
|
additional explanations are also available by calling perldoc tmpl_process3.pl.
|
|
|
|
HOW TO TRANSLATE Koha:
|
|
=====================
|
|
|
|
1. Create your translation file (assuming your current directory is this
|
|
directory, i.e., misc/translator):
|
|
|
|
./tmpl_process3.pl create -i ../../koha-tmpl/opac-tmpl/default/en/ -s css_opac_fr_FR.po -r
|
|
|
|
(In the above example, ../../koha-tmpl/opac-tmpl/default/en/ contains the
|
|
English templates in the "default" theme, and po/css_opac_fr_FR.po is where
|
|
you want the generated PO file to appear. The use of relative paths for the
|
|
English templates is recommended but is not necessary; it makes the
|
|
resulting PO files somewhat easier to read.)
|
|
2. Translate your css_opac_fr_FR.po file using a text editor or a PO file
|
|
translation tool.
|
|
3. Create your translated templates:
|
|
|
|
./tmpl_process3.pl install -i ../../koha-tmpl/opac-tmpl/default/en/ -o ../../koha-tmpl/opac-tmpl/default/fr2/ -s css_opac_fr_FR.po -r
|
|
|
|
(In the above example, /home/paul/koha.dev/koha/koha-tmpl/opac-tmpl/default
|
|
/fr2/ is where you want your translated templates to be saved.)
|
|
4. Copy images/css files in your new directory (as they are NOT moved by
|
|
tmpl_process3.pl install).
|
|
|
|
If something changes in English version:
|
|
|
|
1. Update your translation file:
|
|
|
|
./tmpl_process3.pl update -i ../../opac-tmpl/default/en -s po/css_opac_fr_FR.po -r
|
|
|
|
2. Translate your new css_opac_fr_FR.po file. Look for strings marked as
|
|
"fuzzy" and strings that are not translated.
|
|
3. Create your translated templates:
|
|
|
|
./tmpl_process.pl install -i ../../koha-tmpl/opac-tmpl/default/en/ -o ../../koha-tmpl/opac-tmpl/default/fr2/ -s po/css_opac_fr_FR.po -r
|
|
|
|
4. Copy new images/css files in your new directory if needed
|
|
|
|
REBUILD ALL
|
|
===========
|
|
The rebuild_lang.sh script can be used to rebuild all languages officially supported in 2.2 release, when needed.
|
|
Useful for developpers, probably useless for all end-users.
|
|
|
|
|
|
WEAKNESSES
|
|
==========
|
|
|
|
For a somewhat up-to-date list of weaknesses, please run perldoc xgettext.pl
|
|
and perldoc tmpl_process3.pl and read the BUGS sections.
|
|
|
|
COPYRIGHT
|
|
=========
|
|
|
|
* Paul Poulain (paul.poulain _@_ free.fr) & Jerome Vizcaino (vizcainj _@_
|
|
esiee.fr)
|
|
* Parts of V3.0 by Ambrose Li (acli _@_ ada.dhs.org) |