From 9d12f95fb4f5d080c3c1c1ccb9d25d2afc3902a4 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Tue, 13 Jul 2010 20:02:33 +0000 Subject: [PATCH] Quick Updates svn path=/trunk/boinc/; revision=21906 --- locale/updatetrans.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/locale/updatetrans.sh b/locale/updatetrans.sh index 9d0e7a76c1..e94bbb4567 100755 --- a/locale/updatetrans.sh +++ b/locale/updatetrans.sh @@ -46,6 +46,39 @@ for file in `find -name 'BOINC-Manager.po'` ; do done +# Iterrate through the various PO files looking for those that need to be compiled. +# +for file in `find -name 'BOINC-Client.po'` ; do + dir=`dirname $file` + locale=`basename $dir` + template_name=${projdir}/${locale}/BOINC-Client + + # Remove old MO from previous compilation + # + rm ${projdir}/BOINC-Client.mo > /dev/null 2> /dev/null + + if test ${template_name}.po -nt ${template_name}.mo + then + + # Use wget to cause the Pottle system to compile the PO file into an MO file. + # + # poEdit has a hard time with the Pootle markup in the PO files. + # + # Example: http://boinc.berkeley.edu/translate/ar/boinctrunk/BOINC-Client.mo + # + wget "http://boinc.berkeley.edu/translate/${locale}/${projname}/BOINC-Client.mo" > /dev/null 2> /dev/null + + # Add any new MO files to SVN + svn add ${template_name}.mo > /dev/null 2> /dev/null + + # Touch each file to adjust timestamps + touch ${template_name}.po + touch ${template_name}.mo + + fi +done + + # Determine if we need to update the various languages using the templates. # This will be done by the use of a tag file which should have a matching # timestamp as the template files. If the timestamps do not match update all