3 #------------------------------------------------------------
4 # Short doc: launch this when people said they translated
5 # the program in Transifex, so that their translation appears
6 # in the production package.
7 #------------------------------------------------------------
9 # USE IT INSIDE alternc/ folder which MUST BE a git clone
12 # Take each sub-project of AlternC
13 # (EXPECTED IN PARENT FOLDERS of alternc/)
14 # (yes, one day we will be united again ;) )
15 # and get the TRANSLATED strings from transifex
16 # then put them at the right places in the repositories
17 # and commit everything using svn
21 langs="fr_FR de_DE en_US es_ES pt_BR it_IT nl_NL"
25 echo "doing lang $lang"
26 cp "lang/${lang}.po" "bureau/locales/$lang/LC_MESSAGES/alternc"
27 sublang="`echo $lang | cut -c 1-2`"
28 # merge the po for debconf into the relevant file for the modules :
29 if [ "$lang" != "en_US" ]
31 cat "debian/po/${sublang}.po" | sed -e 's/msgstr ""/msgstr "**DUMMY**"/' >tmp-debconf.po
32 msgcat --use-first --less-than=3 --more-than=1 -o tmp.po "lang/${lang}.po" "tmp-debconf.po"
34 mv -f tmp.po "debian/po/${sublang}.po"
36 cat "../alternc-mailman/debian/po/${sublang}.po" | sed -e 's/msgstr ""/msgstr "**DUMMY**"/' >tmp-debconf.po
37 msgcat --use-first --less-than=3 --more-than=1 -o tmp.po "lang/${lang}.po" "tmp-debconf.po"
39 mv -f tmp.po "../alternc-mailman/debian/po/${sublang}.po"
41 cat "../alternc-mailman/bureau/locales/$lang/LC_MESSAGES/mailman.po" | sed -e 's/msgstr ""/msgstr "**DUMMY**"/' >tmp-mailman.po
42 msgcat --use-first --less-than=3 --more-than=1 -o tmp.po "lang/${lang}.po" "tmp-mailman.po"
44 mv -f tmp.po "../alternc-mailman/bureau/locales/$lang/LC_MESSAGES/mailman.po"
51 if [ "$1" != "nocommit" ]
54 git commit -am "Updating language files from Transifex"
55 pushd ../alternc-mailman
56 git commit -am "Updating language files from Transifex"