Update translation HOWTO
This commit is contained in:
parent
6be41aa18b
commit
86ec16e73d
3 changed files with 35 additions and 25 deletions
18
autogen.sh
Executable file
18
autogen.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
autoconf
|
||||
autoheader
|
||||
|
||||
echo bootstrapping translation files ...
|
||||
cd po
|
||||
intltool-update --pot
|
||||
for lang in $(cat LINGUAS); do
|
||||
if [ -e "$lang.po" ]
|
||||
then
|
||||
echo "updating language file $lang.po ..."
|
||||
intltool-update "$lang"
|
||||
else
|
||||
echo "creating new language file $lang.po ..."
|
||||
msginit --locale="$lang"
|
||||
fi
|
||||
done
|
||||
cd ..
|
||||
|
25
po/HOWTO
25
po/HOWTO
|
@ -1,25 +0,0 @@
|
|||
# Translation HOWTO for note-taking and personal reference
|
||||
|
||||
# Add a new language
|
||||
|
||||
Creates a new empty .po file for a specific translation
|
||||
|
||||
msginit --locale=LL # LL is the language code used
|
||||
|
||||
|
||||
Updates the .po file from the template, while merging existing template strings. Should be called when
|
||||
the translatable strings have changed?
|
||||
|
||||
intltool-update LL # LL is the language code used
|
||||
|
||||
|
||||
# File types
|
||||
|
||||
./po directory contains all files needed for translation
|
||||
|
||||
./po/telegram-purple.pot is a translation template for creating other .po for specific translations. The file is
|
||||
created by letting intltool-update --pot search through all source files (defined in
|
||||
potfiles.in) that contain translatable strings.
|
||||
|
||||
./po/de.po German locale, created by calling msginit --locale=de from telegram-purple.pot
|
||||
|
17
po/HOWTO.md
Normal file
17
po/HOWTO.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
Translation Howto
|
||||
=================
|
||||
|
||||
To add the new language, append the language code LL to po/LINGUAS, and run autogen.sh. You
|
||||
rill be prompted for a contact email. The .po files for the language should then show up in ./po/LL.po
|
||||
|
||||
|
||||
echo LL >> po/LINGUAS
|
||||
./autogen.sh
|
||||
|
||||
|
||||
To update the translatable strings:
|
||||
|
||||
|
||||
./autogen.sh
|
||||
|
||||
|
Loading…
Add table
Reference in a new issue