From 5c6c5ba932c37647aa88ea52dc70484974619403 Mon Sep 17 00:00:00 2001 From: acli Date: Sun, 23 Jan 2005 04:57:51 +0000 Subject: [PATCH] Minor corrections & clarifications, and make the command line examples not break in the middle (like in the original version) --- misc/translator/Makefile | 5 ++- misc/translator/translator_doc.html | 22 ++++++------ misc/translator/translator_doc.txt | 56 ++++++++++++++--------------- 3 files changed, 42 insertions(+), 41 deletions(-) diff --git a/misc/translator/Makefile b/misc/translator/Makefile index 9706c705f0..985c0371a3 100644 --- a/misc/translator/Makefile +++ b/misc/translator/Makefile @@ -1,4 +1,7 @@ all: translator_doc.txt %.txt: %.html - LANG=C w3m $< > $@ + set -x; sed -e 's/
/&
/g' -e 's/<\/blockquote>/<\/pre><\/table>&/g' $<|tee foo|LANG=C w3m -T text/html -cols 80 | sed -e 's/  *$$//g' | cat -s > $@
+
+clean:
+	rm translator_doc.txt
diff --git a/misc/translator/translator_doc.html b/misc/translator/translator_doc.html
index 61e39d046a..e9f81ad944 100644
--- a/misc/translator/translator_doc.html
+++ b/misc/translator/translator_doc.html
@@ -6,14 +6,14 @@ This transation tool should greatly help Koha translators.
 It's composed of 2 scripts
 (with a number of associated perl module files):
 
-
    +
    1. xgettext.pl, that extracts the texts in a template, - and which is called by the script + and which is called by the script; and
    2. 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. +
          +
        1. create a file with all the "translatable strings" in all files in a directory (& its subdirectories), +
        2. update an existing translation file, and +
        3. rebuild translated templates from English & translation file.

@@ -34,9 +34,11 @@ perldoc tmpl_process3.pl. ../../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.) + The use of relative paths for the English templates is recommended; + it makes the resulting PO files slightly shorter + and more usable in a team environment. + Absolute paths are certainly fine, + and might be better if there is only one translator for your language.)

  • Translate your css_opac_fr_FR.po file using a text editor or a PO file translation tool.
  • Create your translated templates: @@ -51,7 +53,7 @@ perldoc tmpl_process3.pl.

    -If something changes in English version: +If something changes in the English version:

    1. Update your translation file:
      diff --git a/misc/translator/translator_doc.txt b/misc/translator/translator_doc.txt index 96520f638f..0322fbda2c 100644 --- a/misc/translator/translator_doc.txt +++ b/misc/translator/translator_doc.txt @@ -4,13 +4,13 @@ TRANSLATION TOOL, V3.0: This transation tool should greatly help Koha translators. It's composed of 2 scripts (with a number of associated perl module files): - * 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. + 1. xgettext.pl, that extracts the texts in a template, and which is called by + the script; and + 2. tmpl_process3.tmpl, which can do 3 things: + a. create a file with all the "translatable strings" in all files in a + directory (& its subdirectories), + b. update an existing translation file, and + c. 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. @@ -20,43 +20,39 @@ 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 - po/css_opac_fr_FR.po -r - + + ./tmpl_process3.pl create -i ../../koha-tmpl/opac-tmpl/default/en/ -s po/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.) + English templates is recommended; it makes the resulting PO files slightly + shorter and more usable in a team environment. Absolute paths are certainly + fine, and might be better if there is only one translator for your + language.) 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 - /home/paul/koha.dev/koha/koha-tmpl/opac-tmpl/default/fr2/ -s po/ - css_opac_fr_FR.po -r - + + ./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 + (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: +If something changes in the English version: 1. Update your translation file: - - ./tmpl_process3.pl update -i /home/paul/koha.dev/koha/koha-tmpl/ - 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. + + ./tmpl_process3.pl update -i ../../koha-tmpl/opac-tmpl/default/en/ -s po/css_opac_fr_FR.po -r + + 2. Translate your newly updated css_opac_fr_FR.po file. Look for strings + marked as "fuzzy" and strings that are not translated. 3. Create your translated templates: - - ./tmpl_process3.pl install -i /home/paul/koha.dev/koha/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 - + + ./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 + 4. Copy new images/css files in your new directory if needed WEAKNESSES -- 2.39.5