Commit 09fee16a authored by Richard Mansfield's avatar Richard Mansfield

When pushing new .pot templates to launchpad, update .po files too

This change modifies the launchpad .pot updater.  After checking the
English strings for changes and committing the new .pot template, it
then pulls the latest exported po files down from launchpad, updates
any msgids in them to reflect the changes in the newly created
template, and pushes the resulting .po files to launchpad along with
the new .pot.

This won't help until the launchpad settings are modified to import
.po translations from the bzr branch as well as templates.
parent 2fff6e3b
...@@ -119,11 +119,34 @@ for branch in ${branches} ; do ...@@ -119,11 +119,34 @@ for branch in ${branches} ; do
# Update copy of template in webroot # Update copy of template in webroot
tar zcf ${DOCROOT}/pot/${branch}.tar.gz mahara/mahara.pot tar zcf ${DOCROOT}/pot/${branch}.tar.gz mahara/mahara.pot
# Push template to lp:mahara-lang # Update template
bzr add mahara/mahara.pot bzr add mahara/mahara.pot
bzr commit -m "Update template to ${remotecommit}" bzr commit -m "Update template to ${remotecommit}"
bzr push lp:~mahara-lang/mahara-lang/${branch}
# Update all the .po files from the export repo to avoid unnecessary invalidation
# of existing translations
exportbranch=${branch}-export
if [ ! -d ${BZR}/${exportbranch} ]; then
bzr branch lp:~mahara-lang/mahara-lang/${exportbranch} ${BZR}/${exportbranch}
else
cd ${BZR}/${exportbranch}
bzr pull
fi
for po in `ls ${BZR}/${exportbranch}/mahara/*.po`; do
pobase=${po##*/}
/usr/bin/perl ${SCRIPTS}/update-po-from-pot.pl $po mahara/mahara.pot mahara/$pobase
done
podiffs=`bzr diff mahara`
if [ ! -z "$podiffs" ] ; then
bzr add mahara
bzr commit -m "Update translations to ${remotecommit}"
fi
# Push everything to lp:mahara-lang
bzr push lp:~mahara-lang/mahara-lang/${branch}
fi fi
cd ${GITDIR} cd ${GITDIR}
......
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