Skip to content
Snippets Groups Projects
Commit e824f298 authored by Jean-Noël Avila's avatar Jean-Noël Avila
Browse files

Create list of translation in po4a.confIG


Instead of requiring the script file to contain the list of
translations, just extract it from the list of po files on the
filesystem.

Signed-off-by: default avatarJean-Noël Avila <jn.avila@free.fr>
parent e33c6897
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
#!/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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment