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

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
# Update copy of template in webroot
tar zcf ${DOCROOT}/pot/${branch}.tar.gz mahara/mahara.pot
# Push template to lp:mahara-lang
# Update template
bzr add mahara/mahara.pot
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
if [ ! -d ${BZR}/${exportbranch} ]; then
bzr branch lp:~mahara-lang/mahara-lang/${exportbranch} ${BZR}/${exportbranch}
cd ${BZR}/${exportbranch}
bzr pull
for po in `ls ${BZR}/${exportbranch}/mahara/*.po`; do
/usr/bin/perl ${SCRIPTS}/ $po mahara/mahara.pot mahara/$pobase
podiffs=`bzr diff mahara`
if [ ! -z "$podiffs" ] ; then
bzr add mahara
bzr commit -m "Update translations to ${remotecommit}"
# Push everything to lp:mahara-lang
bzr push lp:~mahara-lang/mahara-lang/${branch}
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