Created
August 24, 2011 19:50
-
-
Save MattRead/1169013 to your computer and use it in GitHub Desktop.
update Habari POT and sync translations to etras-repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# setup tmp files from tar.gz's | |
cd /home/matt/habari-locales/bzr/ | |
bzr merge | |
bzr add locale/* | |
bzr commit -m "lp sync" | |
cd ../ | |
# check fo .po | |
for d in `ls bzr/locale/*.po`; | |
do | |
if [[ $d =~ bzr/locale/(.*).po ]] | |
then | |
if [ ! -d ${BASH_REMATCH[1]} ] | |
then | |
mkdir ${BASH_REMATCH[1]} | |
mkdir ${BASH_REMATCH[1]}/trunk | |
mkdir ${BASH_REMATCH[1]}/trunk/LC_MESSAGES | |
mkdir ${BASH_REMATCH[1]}/trunk/dist | |
fi | |
echo "moving ${BASH_REMATCH[1]}.po" | |
cp bzr/locale/${BASH_REMATCH[1]}.po ${BASH_REMATCH[1]}/trunk/LC_MESSAGES/habari.po | |
echo "generating mo file" | |
msgfmt -o ${BASH_REMATCH[1]}/trunk/LC_MESSAGES/habari.mo ${BASH_REMATCH[1]}/trunk/LC_MESSAGES/habari.po | |
svn add -q ${BASH_REMATCH[1]} ${BASH_REMATCH[1]}/trunk/LC_MESSAGES/habari.po ${BASH_REMATCH[1]}/trunk/LC_MESSAGES/habari.mo | |
fi | |
done | |
# remove tmp files | |
rm -rf tmp | |
svn ci -m"launchpad sync" | |
echo "done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /home/matt/habari-trunk/ | |
svn up | |
./rxgettext.sh | |
svn ci system/locale/habari.pot -m"automatic POT template generation" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xgettext -o locale/habari.pot --no-wrap --add-comments=@locale --language=PHP --from-code=utf-8 --keyword=_n:1,2 --keyword=_ne:1,2 --keyword=_t --keyword=_e $(find . -name "*.php") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment