boinc/locale/updatetrans.sh

116 lines
2.3 KiB
Bash
Raw Normal View History

#!/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.
projname=boinc
2015-03-24 19:11:15 +00:00
projdir=/home/boincadm/rwalton/$projname/locale
cd $projdir
for file in `find -name 'BOINC-Manager.po'` ; do
dir=`dirname $file`
locale=`basename $dir`
template_name=BOINC-Manager
cd $projdir/${locale}
if test ${template_name}.po -nt ${template_name}.mo.flag
then
# Compile the PO file into an MO file.
2015-03-24 19:14:31 +00:00
pocompile ${template_name}.po ${template_name}.mo
# Add the updated file to git
git add ${template_name}.mo
# Touch each file to adjust timestamps
touch ${template_name}.po
touch ${template_name}.mo.flag
fi
done
cd $projdir
for file in `find -name 'BOINC-Client.po'` ; do
dir=`dirname $file`
locale=`basename $dir`
template_name=BOINC-Client
cd $projdir/${locale}
if test ${template_name}.po -nt ${template_name}.mo.flag
then
# Compile the PO file into an MO file.
pocompile ${template_name}.po ${template_name}.mo
2015-03-24 19:14:31 +00:00
# Add the updated file to git
git add ${template_name}.mo
# Touch each file to adjust timestamps
touch ${template_name}.po
touch ${template_name}.mo.flag
fi
done
cd $projdir
for file in `find -name 'BOINC-Web.po'` ; do
dir=`dirname $file`
locale=`basename $dir`
template_name=BOINC-Web
cd $projdir/${locale}
if test ${template_name}.po -nt ${template_name}.mo.flag
then
# Compile the PO file into an MO file.
pocompile ${template_name}.po ${template_name}.mo
2015-03-24 19:14:31 +00:00
# Add the updated file to git
git add ${template_name}.mo
# Touch each file to adjust timestamps
touch ${template_name}.po
touch ${template_name}.mo.flag
fi
done
cd $projdir
for file in `find -name 'BOINC-Setup.po'` ; do
dir=`dirname $file`
locale=`basename $dir`
template_name=BOINC-Setup
cd $projdir/${locale}
if test ${template_name}.po -nt ${template_name}.mo.flag
then
# Compile the PO file into an MO file.
pocompile ${template_name}.po ${template_name}.mo
2015-03-24 19:14:31 +00:00
# Add the updated file to git
git add ${template_name}.mo
# Touch each file to adjust timestamps
touch ${template_name}.po
touch ${template_name}.mo.flag
fi
done
2013-09-06 19:35:12 +00:00
git commit -a -m "locale: Update compiled localization files"
git push origin
exit 0