Commit baf4c833 authored by Benjamin Sonntag's avatar Benjamin Sonntag

adding scripts to push/pull from/to transifex and update other repos

parent a79d558a
......@@ -467,6 +467,8 @@ install/upgrades/1.0.1.php -text
install/upgrades/1.0.sql -text
install/upgrades/1.1.sql -text
install/upgrades/README -text
lang/README -text
lang/en_US.po -text
man/alternc-admintools.8 -text
man/ -text
man/alternc.install.8 -text
......@@ -490,6 +492,7 @@ po/fr/LC_MESSAGES/.svnignore -text
po/fr/LC_MESSAGES/alternc-admintools.po -text
/quota_delete -text
/quota_init -text
/ -text
src/Makefile -text
src/alternc-check -text
src/alternc-dboptimize -text
......@@ -528,3 +531,4 @@ tools/postfix-add-policy -text
tools/top_ftp_users -text
tools/top_http_users -text
tools/top_mysql_users -text
/ -text
host =
source_file = bureau/locales/messages.pot
source_file = lang/en_US.po
source_lang = en
trans.fr_FR = bureau/locales/fr_FR/LC_MESSAGES/messages.po
trans.es_ES = bureau/locales/es_ES/LC_MESSAGES/messages.po
trans.pt_BR = bureau/locales/pt_BR/LC_MESSAGES/messages.po
trans.en_US = bureau/locales/en_US/LC_MESSAGES/messages.po
trans.de_DE = bureau/locales/de_DE/LC_MESSAGES/messages.po
source_file = bureau/locales/manual.pot
source_lang = en
trans.fr_FR = bureau/locales/fr_FR/LC_MESSAGES/manual.po
trans.es_ES = bureau/locales/es_ES/LC_MESSAGES/manual.po
trans.pt_BR = bureau/locales/pt_BR/LC_MESSAGES/manual.po
trans.en_US = bureau/locales/en_US/LC_MESSAGES/manual.po
trans.de_DE = bureau/locales/de_DE/LC_MESSAGES/manual.po
source_file = po/alternc-admintools.pot
source_lang = en
trans.fr_FR = po/fr/LC_MESSAGES/alternc-admintools.po
source_file = debian/po/templates.pot
source_lang = en
trans.fr_FR = debian/po/fr.po
trans.fr_FR = lang/fr_FR.po
trans.es_ES = lang/es_ES.po
trans.pt_BR = lang/pt_BR.po
trans.de_DE = lang/de_DE.po
The po files here are automatically generated by
Don't edit them in any way !
If you need to add automatically translated string, use po-debconf for debian templates, or _("") and __("") in php code for the desktop
If you have manual text that can't use _("") or __("") add it to bureau/locales/manual.pot instead, and relaunch
This source diff could not be displayed because it is too large. You can view the blob instead.
# Take each sub-project of AlternC
# (yes, one day we will be united again ;) )
# and regenerate the .POT
# then regenerate the .PO for each language
# then merge them into one big .po file and
# put them in the altenrc-i18n repository
# finally, push all those files to transifex
pushd ../..
langs="fr_FR de_DE en_US es_ES pt_BR"
for project in alternc alternc-awstats alternc-mailman
pushd "$project/trunk/bureau/locales"
# no merge all the po's for each language
for lang in $langs
sublang="`echo $lang | cut -c 1-2`"
echo "doing lang $lang"
rm -rf "alternc/trunk/tmp.$lang"
mkdir "alternc/trunk/tmp.$lang"
# po-debconf : (they are using only the language code, not lang_country
cp "alternc/trunk/debian/po/${sublang}.po" "alternc/trunk/tmp.$lang/alternc.debconf.po"
cp "alternc-mailman/trunk/debian/po/${sublang}.po" "alternc/trunk/tmp.$lang/alternc-mailman.debconf.po"
cp "alternc-awstats/trunk/debian/po/${sublang}.po" "alternc/trunk/tmp.$lang/alternc-mailman.debconf.po"
cp "alternc/trunk/bureau/locales/$lang/LC_MESSAGES/messages.po" \
"alternc/trunk/bureau/locales/$lang/LC_MESSAGES/manual.po" \
"alternc-mailman/trunk/bureau/locales/$lang/LC_MESSAGES/mailman.po" \
"alternc-mailman/trunk/bureau/locales/$lang/LC_MESSAGES/mailman_manual.po" \
"alternc-awstats/trunk/bureau/locales/$lang/LC_MESSAGES/aws.po" \
"alternc-awstats/trunk/bureau/locales/$lang/LC_MESSAGES/aws_manual.po" \
# now we have all .po files in one folder, merge them into one big catalog:
msgcat --use-first -o "alternc/trunk/lang/${lang}.po" alternc/trunk/tmp.$lang/*
rm -rf "alternc/trunk/tmp.$lang"
echo "done"
# Now pushing po files into transifex website:
cd alternc/trunk/lang/
tx push -s
# Take each sub-project of AlternC
# (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
tx pull -a
langs="fr_FR de_DE en_US es_ES pt_BR"
for lang in $langs
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 :
msgcat --use-first --less-than=3 --more-than=1 -o tmp.po "lang/${lang}.po" "debian/po/${sublang}.po"
mv -f tmp.po "debian/po/${sublang}.po"
msgcat --use-first --less-than=3 --more-than=1 -o tmp.po "lang/${lang}.po" "../../alternc-awstats/trunk/debian/po/${sublang}.po"
mv -f tmp.po "../../alternc-awstats/debian/po/${sublang}.po"
msgcat --use-first --less-than=3 --more-than=1 -o tmp.po "lang/${lang}.po" "../../alternc-mailman/trunk/debian/po/${sublang}.po"
mv -f tmp.po "../../alternc-mailman/debian/po/${sublang}.po"
echo "done"
# Now committing
svn commit -m "Updating language files from Transifex"
pushd ../../alternc-mailman/trunk
svn commit -m "Updating language files from Transifex"
cd ../../alternc-awstats/trunk
svn commit -m "Updating language files from Transifex"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment