adding scripts to push/pull from/to transifex and update other repos
This commit is contained in:
parent
a79d558a5e
commit
baf4c8331d
|
@ -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/alternc-admintools.fr.8 -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
|
||||
/repos-to-tx.sh -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
|
||||
/tx-to-repos.sh -text
|
||||
|
|
32
.tx/config
32
.tx/config
|
@ -1,31 +1,11 @@
|
|||
[main]
|
||||
host = https://www.transifex.net
|
||||
|
||||
[alternc.messages]
|
||||
source_file = bureau/locales/messages.pot
|
||||
[alternc.alternc]
|
||||
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
|
||||
|
||||
[alternc.manual]
|
||||
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
|
||||
|
||||
[alternc.alterncadmintools]
|
||||
source_file = po/alternc-admintools.pot
|
||||
source_lang = en
|
||||
trans.fr_FR = po/fr/LC_MESSAGES/alternc-admintools.po
|
||||
|
||||
[alternc.debian]
|
||||
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
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
The po files here are automatically generated by repos-to-tx.sh
|
||||
|
||||
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 repos-to-tx.sh
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,52 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Take each sub-project of AlternC
|
||||
# (EXPECTED IN PARENT FOLDERS)
|
||||
# (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
|
||||
do
|
||||
pushd "$project/trunk/bureau/locales"
|
||||
make
|
||||
popd
|
||||
done
|
||||
|
||||
# no merge all the po's for each language
|
||||
for lang in $langs
|
||||
do
|
||||
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" \
|
||||
"alternc/trunk/tmp.$lang/"
|
||||
# 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"
|
||||
done
|
||||
|
||||
# Now pushing po files into transifex website:
|
||||
cd alternc/trunk/lang/
|
||||
tx push -s
|
||||
|
||||
popd
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Take each sub-project of AlternC
|
||||
# (EXPECTED IN PARENT FOLDERS)
|
||||
# (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
|
||||
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 :
|
||||
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"
|
||||
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"
|
||||
popd
|
||||
|
Loading…
Reference in New Issue