diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..a94dc23 --- /dev/null +++ b/autogen.sh @@ -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 .. + diff --git a/po/HOWTO b/po/HOWTO deleted file mode 100644 index 51fa34b..0000000 --- a/po/HOWTO +++ /dev/null @@ -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 - diff --git a/po/HOWTO.md b/po/HOWTO.md new file mode 100644 index 0000000..f85362e --- /dev/null +++ b/po/HOWTO.md @@ -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 + +