diff --git a/Makefile b/Makefile index 2fa6fd20d6e567dd2d7c36511448f318ebbf565c..394096717d53fdc5af1752398ce0bbca0c20df08 100644 --- a/Makefile +++ b/Makefile @@ -15,8 +15,8 @@ ifndef V endif endif -po4a.conf: scripts/create_po4a_conf.sh sources.txt - ./scripts/create_po4a_conf.sh +po4a.conf: scripts/create_po4a_conf.sh sources.txt $(LANGUAGE_PO) + @./scripts/create_po4a_conf.sh po4a-stamp: po4a.conf $(EN_SOURCES) $(LANGUAGE_PO) Makefile $(QUIET_PO4A)PERL5LIB=./po4a/lib po4a/po4a -v po4a.conf diff --git a/README b/README index 62ddd981e763e8aa8c9c6c79cdc2fccf663943f3..1220bbcfd92fae3b84638342374bdf724bb70242 100644 --- a/README +++ b/README @@ -97,15 +97,15 @@ Initializing a documentation.XX.po file If your language XX does not have translated message file documentation.XX.po yet, you add a translation for the first time by - * editing the file create_po4a_conf.sh and adding your language code - to the first line, e.g. "[po4a_langs] fr XX", where XX is the - locale, such as "de", "is", "pt_BR", "zh_CN", etc. - * running in the root directory of the project - - make all + * initializing the translation po file by running: + msginit --local=XX + in the po/directory, where XX is the locale, e.g. "de", "is", "pt_BR", + "zh_CN", etc. + * pre-translating the file for unchanged strings by running: + scripts/pre-translate-po po/documentation.XX.po A file po/documentation.XX.po was created, corresponding -to the newly created translation. +to the newly created translation and is ready for your translations. Then edit the automatically generated copyright info in your new documentation.XX.po to be correct, e.g. for Icelandic: @@ -126,8 +126,7 @@ just "Git Documentation": Documentation/' documentation.XX.po Once you are done testing the translation (see below), commit the -create_po4a_conf.sh and documentation.XX.po files and ask the l10n coordinator -to pull from you. +documentation.XX.po files and ask the l10n coordinator to pull from you. Updating a documentation.XX.po file ----------------------------------- @@ -140,7 +139,7 @@ file. If there's an existing documentation.XX.po file for your language, but the repository of the l10n coordinator has newer documentation.pot -file, chances are the new documentation.XX.po already includes the +file, chances are the upstreamed documentation.XX.po already includes the changes of the new version. Once you are done testing the translation (see below), commit the result diff --git a/scripts/create_po4a_conf.sh b/scripts/create_po4a_conf.sh index ed74f091f8c1809872bba10483910679eb772c3e..ebb7adffac958ecf7b246be8f8a3f819352d1e3a 100755 --- a/scripts/create_po4a_conf.sh +++ b/scripts/create_po4a_conf.sh @@ -1,7 +1,14 @@ #!/bin/bash -cat <<EOF >po4a.conf -[po4a_langs] fr de +echo -n "[po4a_langs]" >po4a.conf +for l in po/documentation.*.po +do + rstripped=${l%%.po} + echo -n " ${rstripped##po/documentation.}" >> po4a.conf +done +echo >> po4a.conf + +cat <<EOF >>po4a.conf [po4a_paths] po/documentation.pot \$lang:po/documentation.\$lang.po [options] opt: " -k 80"