View | Details | Raw Unified | Return to bug 10136
Collapse All | Expand All

(-)a/misc/translator/translator_doc.html (-87 lines)
Lines 1-87 Link Here
1
<h1>TRANSLATION TOOL, V3.0:
2
<br>======================</h1>
3
4
<p>
5
This transation tool should greatly help Koha translators.
6
It's composed of 2&nbsp;scripts
7
(with a number of associated perl module files):
8
9
<ol>
10
<li>xgettext.pl, that extracts the texts in a template,
11
    and which is called by the script; and
12
<li>tmpl_process3.tmpl, which can do 3 things:
13
    <ol type=a>
14
    <li>create a file with all the "translatable strings" in all files in a directory (& its subdirectories),
15
    <li>update an existing translation file, and
16
    <li>rebuild translated templates from English & translation file.
17
    </ul>
18
</ul>
19
<p>
20
Call tmpl_process3.pl --help to get a more detailed explanation.
21
Some additional explanations are also available by calling
22
perldoc tmpl_process3.pl.
23
<p>
24
<b>Warning:</b> Those scripts relie upon 'gettext' set of tools. On Debian
25
it is included in 'gettext' package.
26
</p>
27
28
<h2>HOW TO TRANSLATE Koha:
29
<br>=====================</h2>
30
31
<ol>
32
<li>Create your translation file
33
    (assuming your current directory is this directory, i.e., misc/translator):
34
    <blockquote>
35
./tmpl_process3.pl create -i ../../koha-tmpl/opac-tmpl/default/en/ -s po/css_opac_fr_FR.po -r
36
    </blockquote>
37
    <p>(In the above example,
38
    ../../koha-tmpl/opac-tmpl/default/en/
39
    contains the English templates in the "default" theme,
40
    and po/css_opac_fr_FR.po is where you want the generated PO file to appear.
41
    The use of relative paths for the English templates is recommended;
42
    it makes the resulting PO files slightly shorter
43
    and more usable in a team environment.
44
    Absolute paths are certainly fine,
45
    and might be better if there is only one translator for your language.)
46
<li>Translate your css_opac_fr_FR.po file
47
    using a text editor or a PO file translation tool.
48
<li>Create your translated templates:
49
    <blockquote>
50
./tmpl_process3.pl install -i ../../koha-tmpl/opac-tmpl/default/en/ -o /home/paul/koha.dev/koha/koha-tmpl/opac-tmpl/default/fr2/ -s po/css_opac_fr_FR.po -r
51
    </blockquote>
52
    <p>
53
    (In the above example,
54
    /home/paul/koha.dev/koha/koha-tmpl/opac-tmpl/default/fr2/
55
    is where you want your translated templates to be saved.)
56
<li>Copy images/css files in your new directory (as they are NOT moved by tmpl_process3.pl install).
57
</ol>
58
59
<p>
60
If something changes in the English version:
61
<ol>
62
<li>Update your translation file:
63
    <blockquote>
64
./tmpl_process3.pl update -i ../../koha-tmpl/opac-tmpl/default/en/ -s po/css_opac_fr_FR.po -r
65
    </blockquote>
66
<li>Translate your newly updated css_opac_fr_FR.po file.
67
    Look for strings marked as "fuzzy" and strings that are not translated.
68
<li>Create your translated templates:
69
    <blockquote>
70
./tmpl_process3.pl install -i ../../koha-tmpl/opac-tmpl/default/en/ -o /home/paul/koha.dev/koha/koha-tmpl/opac-tmpl/default/fr2/ -s po/css_opac_fr_FR.po -r
71
    </blockquote>
72
<li>Copy new images/css files in your new directory if needed
73
</ol>
74
75
<h2>WEAKNESSES
76
<br>==========</h2>
77
<p>For a somewhat up-to-date list of weaknesses,
78
please run <code>perldoc xgettext.pl</code>
79
and <code>perldoc tmpl_process3.pl</code>
80
and read the BUGS sections.
81
82
<h2>COPYRIGHT
83
<br>=========</h2>
84
<ul>
85
<li>Paul Poulain (paul.poulain _@_ free.fr) & Jerome Vizcaino (vizcainj _@_ esiee.fr)
86
<li>Parts of V3.0 by Ambrose Li (acli _@_ ada.dhs.org)
87
</ul>
(-)a/misc/translator/translator_doc.txt (-74 lines)
Lines 1-73 Link Here
1
TRANSLATION TOOL, V3.0:
2
======================
3
4
This transation tool should greatly help Koha translators. It's composed of
5
2 scripts (with a number of associated perl module files):
6
7
 1. xgettext.pl, that extracts the texts in a template, and which is called by
8
    the script; and
9
 2. tmpl_process3.tmpl, which can do 3 things:
10
     a. create a file with all the "translatable strings" in all files in a
11
        directory (& its subdirectories),
12
     b. update an existing translation file, and
13
     c. rebuild translated templates from English & translation file.
14
15
Call tmpl_process3.pl --help to get a more detailed explanation. Some
16
additional explanations are also available by calling perldoc tmpl_process3.pl.
17
18
Warning: Those scripts relie upon 'gettext' set of tools. On Debian
19
         it is included in 'gettext' package.
20
21
HOW TO TRANSLATE Koha:
22
=====================
23
24
 1. Create your translation file (assuming your current directory is this
25
    directory, i.e., misc/translator):
26
27
        ./tmpl_process3.pl create -i ../../koha-tmpl/opac-tmpl/default/en/ -s po/css_opac_fr_FR.po -r
28
29
    (In the above example, ../../koha-tmpl/opac-tmpl/default/en/ contains the
30
    English templates in the "default" theme, and po/css_opac_fr_FR.po is where
31
    you want the generated PO file to appear. The use of relative paths for the
32
    English templates is recommended; it makes the resulting PO files slightly
33
    shorter and more usable in a team environment. Absolute paths are certainly
34
    fine, and might be better if there is only one translator for your
35
    language.)
36
 2. Translate your css_opac_fr_FR.po file using a text editor or a PO file
37
    translation tool.
38
 3. Create your translated templates:
39
40
        ./tmpl_process3.pl install -i ../../koha-tmpl/opac-tmpl/default/en/ -o /home/paul/koha.dev/koha/koha-tmpl/opac-tmpl/default/fr2/ -s po/css_opac_fr_FR.po -r
41
42
    (In the above example, /home/paul/koha.dev/koha/koha-tmpl/opac-tmpl/default
43
    /fr2/ is where you want your translated templates to be saved.)
44
 4. Copy images/css files in your new directory (as they are NOT moved by
45
    tmpl_process3.pl install).
46
47
If something changes in the English version:
48
49
 1. Update your translation file:
50
51
        ./tmpl_process3.pl update -i ../../koha-tmpl/opac-tmpl/default/en/ -s po/css_opac_fr_FR.po -r
52
53
 2. Translate your newly updated css_opac_fr_FR.po file. Look for strings
54
    marked as "fuzzy" and strings that are not translated.
55
 3. Create your translated templates:
56
57
        ./tmpl_process3.pl install -i ../../koha-tmpl/opac-tmpl/default/en/ -o /home/paul/koha.dev/koha/koha-tmpl/opac-tmpl/default/fr2/ -s po/css_opac_fr_FR.po -r
58
59
 4. Copy new images/css files in your new directory if needed
60
61
WEAKNESSES
62
==========
63
64
For a somewhat up-to-date list of weaknesses, please run perldoc xgettext.pl
65
and perldoc tmpl_process3.pl and read the BUGS sections.
66
67
COPYRIGHT
68
=========
69
70
  * Paul Poulain (paul.poulain _@_ free.fr) & Jerome Vizcaino (vizcainj _@_
71
    esiee.fr)
72
  * Parts of V3.0 by Ambrose Li (acli _@_ ada.dhs.org)
73
74
- 

Return to bug 10136