2009-11-12 20:58:03 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-10-22 05:22:01 +00:00
|
|
|
# Look for .po files modified later than .mo, and regenerate .mo file
|
|
|
|
# Then commit and push changes.
|
|
|
|
|
|
|
|
# This is run in the Pootle copy of the source tree (~/pootle/repos/boinctrunk)
|
|
|
|
# It's run from pootle/update.sh, which is run from cron every 12 hours.
|
2009-11-12 22:19:36 +00:00
|
|
|
#
|
2009-11-12 21:48:04 +00:00
|
|
|
projname=boinctrunk
|
2013-09-06 19:35:12 +00:00
|
|
|
projdir=/home/boincadm/pootle/repos/$projname
|
2009-11-12 21:48:04 +00:00
|
|
|
|
2009-11-12 22:19:36 +00:00
|
|
|
cd $projdir
|
2009-11-12 21:48:04 +00:00
|
|
|
|
2010-02-18 20:57:13 +00:00
|
|
|
|
2009-11-12 22:19:36 +00:00
|
|
|
for file in `find -name 'BOINC-Manager.po'` ; do
|
2009-11-12 20:58:03 +00:00
|
|
|
dir=`dirname $file`
|
|
|
|
locale=`basename $dir`
|
2010-02-18 20:57:13 +00:00
|
|
|
template_name=${projdir}/${locale}/BOINC-Manager
|
2009-11-12 22:19:36 +00:00
|
|
|
|
2010-02-18 20:57:13 +00:00
|
|
|
if test ${template_name}.po -nt ${template_name}.mo
|
|
|
|
then
|
2009-11-12 22:19:36 +00:00
|
|
|
|
2010-09-20 20:40:22 +00:00
|
|
|
# Compile the PO file into an MO file.
|
2010-09-20 20:42:56 +00:00
|
|
|
pocompile ${template_name}.po ${template_name}.mo
|
2009-11-12 22:19:36 +00:00
|
|
|
|
|
|
|
# Touch each file to adjust timestamps
|
2010-02-18 20:57:13 +00:00
|
|
|
touch ${template_name}.po
|
|
|
|
touch ${template_name}.mo
|
2009-11-12 22:19:36 +00:00
|
|
|
|
|
|
|
fi
|
2010-02-18 20:57:13 +00:00
|
|
|
done
|
2009-11-12 21:48:04 +00:00
|
|
|
|
2010-02-18 20:57:13 +00:00
|
|
|
|
2010-07-13 20:02:33 +00:00
|
|
|
for file in `find -name 'BOINC-Client.po'` ; do
|
|
|
|
dir=`dirname $file`
|
|
|
|
locale=`basename $dir`
|
|
|
|
template_name=${projdir}/${locale}/BOINC-Client
|
|
|
|
|
|
|
|
if test ${template_name}.po -nt ${template_name}.mo
|
|
|
|
then
|
|
|
|
|
2010-09-20 20:40:22 +00:00
|
|
|
# Compile the PO file into an MO file.
|
2013-06-20 02:47:25 +00:00
|
|
|
pocompile ${template_name}.po ${template_name}.mo
|
2010-07-13 20:02:33 +00:00
|
|
|
|
|
|
|
# Touch each file to adjust timestamps
|
|
|
|
touch ${template_name}.po
|
|
|
|
touch ${template_name}.mo
|
|
|
|
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
|
2011-12-16 00:55:04 +00:00
|
|
|
for file in `find -name 'BOINC-Web.po'` ; do
|
|
|
|
dir=`dirname $file`
|
|
|
|
locale=`basename $dir`
|
|
|
|
template_name=${projdir}/${locale}/BOINC-Web
|
|
|
|
|
|
|
|
if test ${template_name}.po -nt ${template_name}.mo
|
|
|
|
then
|
|
|
|
|
|
|
|
# Compile the PO file into an MO file.
|
2013-06-20 02:47:25 +00:00
|
|
|
pocompile ${template_name}.po ${template_name}.mo
|
2011-12-16 00:55:04 +00:00
|
|
|
|
|
|
|
# Touch each file to adjust timestamps
|
|
|
|
touch ${template_name}.po
|
|
|
|
touch ${template_name}.mo
|
|
|
|
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
|
2013-06-05 20:49:02 +00:00
|
|
|
for file in `find -name 'BOINC-Setup.po'` ; do
|
|
|
|
dir=`dirname $file`
|
|
|
|
locale=`basename $dir`
|
|
|
|
template_name=${projdir}/${locale}/BOINC-Setup
|
|
|
|
|
|
|
|
if test ${template_name}.po -nt ${template_name}.mo
|
|
|
|
then
|
|
|
|
|
|
|
|
# Compile the PO file into an MO file.
|
2013-06-20 02:47:25 +00:00
|
|
|
pocompile ${template_name}.po ${template_name}.mo
|
2013-06-05 20:49:02 +00:00
|
|
|
|
|
|
|
# Touch each file to adjust timestamps
|
|
|
|
touch ${template_name}.po
|
|
|
|
touch ${template_name}.mo
|
|
|
|
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2013-09-06 19:35:12 +00:00
|
|
|
git commit -a -m "locale: Update compiled localization files"
|
|
|
|
git push origin
|
2013-06-05 20:49:02 +00:00
|
|
|
|
2009-11-12 20:58:03 +00:00
|
|
|
exit 0
|