2013-02-06 06:25:20 +00:00
|
|
|
#!/bin/bash -x
|
2012-08-21 16:50:19 +00:00
|
|
|
|
2012-08-21 17:16:07 +00:00
|
|
|
#------------------------------------------------------------
|
|
|
|
# Short doc: launch this when people said they translated
|
|
|
|
# the program in Transifex, so that their translation appears
|
|
|
|
# in the production package.
|
|
|
|
#------------------------------------------------------------
|
|
|
|
|
|
|
|
# Long doc:
|
2012-08-21 16:50:19 +00:00
|
|
|
# Take each sub-project of AlternC
|
2012-08-21 17:16:07 +00:00
|
|
|
# (EXPECTED IN PARENT FOLDERS of alternc/trunk/)
|
2012-08-21 16:50:19 +00:00
|
|
|
# (yes, one day we will be united again ;) )
|
|
|
|
# and get the TRANSLATED strings from transifex
|
|
|
|
# then put them at the right places in the repositories
|
|
|
|
# and commit everything using svn
|
|
|
|
|
2012-10-31 11:44:41 +00:00
|
|
|
tx pull -a -f
|
2012-08-21 16:50:19 +00:00
|
|
|
|
2012-12-07 16:56:33 +00:00
|
|
|
langs="fr_FR de_DE en_US es_ES pt_BR it_IT nl_NL"
|
2012-08-21 16:50:19 +00:00
|
|
|
|
|
|
|
for lang in $langs
|
|
|
|
do
|
|
|
|
echo "doing lang $lang"
|
|
|
|
cp "lang/${lang}.po" "bureau/locales/$lang/LC_MESSAGES/alternc"
|
|
|
|
sublang="`echo $lang | cut -c 1-2`"
|
|
|
|
# merge the po for debconf into the relevant file for the modules :
|
2012-08-21 17:07:04 +00:00
|
|
|
if [ "$lang" != "en_US" ]
|
2012-08-21 17:03:21 +00:00
|
|
|
then
|
2013-02-08 15:14:11 +00:00
|
|
|
cat "debian/po/${sublang}.po" | sed -e 's/msgstr ""/msgstr "**DUMMY**"/' >tmp-debconf.po
|
|
|
|
msgcat --use-first --less-than=3 --more-than=1 -o tmp.po "lang/${lang}.po" "tmp-debconf.po"
|
|
|
|
rm "tmp-debconf.po"
|
2012-08-21 17:03:21 +00:00
|
|
|
mv -f tmp.po "debian/po/${sublang}.po"
|
2013-02-08 15:14:11 +00:00
|
|
|
cat "../../alternc-mailman/trunk/debian/po/${sublang}.po" | sed -e 's/msgstr ""/msgstr "**DUMMY**"/' >tmp-debconf.po
|
|
|
|
msgcat --use-first --less-than=3 --more-than=1 -o tmp.po "lang/${lang}.po" "tmp-debconf.po"
|
|
|
|
rm "tmp-debconf.po"
|
2012-08-21 17:03:21 +00:00
|
|
|
mv -f tmp.po "../../alternc-mailman/trunk/debian/po/${sublang}.po"
|
|
|
|
fi
|
2012-08-21 16:50:19 +00:00
|
|
|
echo "done"
|
|
|
|
done
|
|
|
|
|
2013-02-06 06:25:20 +00:00
|
|
|
if [ "$1" != "nocommit" ]
|
|
|
|
then
|
2012-08-21 16:50:19 +00:00
|
|
|
# Now committing
|
2013-02-06 06:25:20 +00:00
|
|
|
svn commit -m "Updating language files from Transifex"
|
|
|
|
pushd ../../alternc-mailman/trunk
|
|
|
|
svn commit -m "Updating language files from Transifex"
|
|
|
|
popd
|
|
|
|
fi
|
|
|
|
|
2012-08-21 16:50:19 +00:00
|
|
|
|