3 #------------------------------------------------------------
4 # Short doc: launch this after big changes, so that
5 # people who translate the project have the new strings ;)
6 #------------------------------------------------------------
8 # USE IT INSIDE alternc/ folder which MUST BE a git clone
11 # Take each sub-project of AlternC
12 # (EXPECTED IN PARENT FOLDERS from here)
13 # and regenerate the .POT
14 # then regenerate the .PO for each language
15 # then merge them into one big .po file and
16 # put them in the lang/ folder
18 # finally, push en_US to transifex
21 if [ ! -x /usr/bin/tx ] ; then
22 echo "Package transifex-client is not installed."
23 echo "Install it to run $0."
28 echo "Update of PO files in debian/"
34 langs="fr_FR de_DE en_US es_ES pt_BR it_IT nl_NL"
36 # external repositories :
37 for project in alternc alternc-mailman
39 pushd "$project/bureau/locales"
45 for subproject in awstats
47 pushd "alternc/$subproject/bureau/locales"
52 # now merge all the po's for each language
55 sublang="`echo $lang | cut -c 1-2`"
56 echo "doing lang $lang"
57 rm -rf "alternc/tmp.$lang"
58 mkdir "alternc/tmp.$lang"
59 # po-debconf : (they are using only the language code, not lang_country
60 # if [ "$sublang" != "en" ] ; then
61 cp "alternc/debian/po/${sublang}.po" "alternc/tmp.$lang/alternc.debconf.po"
62 cp "alternc-mailman/debian/po/${sublang}.po" "alternc/tmp.$lang/alternc-mailman.debconf.po"
63 # cp "alternc/trunk/awstats/debian/po/${sublang}.po" "alternc/trunk/tmp.$lang/alternc-awstats.debconf.po"
65 # cp "alternc/trunk/debian/po/templates.pot" "alternc/trunk/tmp.$lang/alternc.debconf.po"
66 # cp "alternc-mailman/trunk/debian/po/templates.pot" "alternc/trunk/tmp.$lang/alternc-mailman.debconf.po"
68 cp "alternc/bureau/locales/$lang/LC_MESSAGES/messages.po" \
69 "alternc-mailman/bureau/locales/$lang/LC_MESSAGES/mailman.po" \
70 "alternc/awstats/bureau/locales/$lang/LC_MESSAGES/aws.po" \
72 # now we have all .po files in one folder, merge them into one big catalog:
73 msgcat --use-first -o "alternc/lang/${lang}.po" alternc/tmp.$lang/*
74 rm -rf "alternc/tmp.$lang"
78 # Now pushing po files into transifex website: