Created
September 18, 2010 21:33
-
-
Save mattrude/586057 to your computer and use it in GitHub Desktop.
Translating the mdr-network Plugins
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
sleep 2 | |
cd /var/www/therudes.com/wp-content/mu-plugins/ | |
rm -rf languages | |
mkdir languages | |
xgettext --keyword=__ --keyword=_e --from-code=php --language=php *.php --package-version=1.o --package-name=mdr-network --output=languages/mdr-network.pot | |
cd languages/ | |
sed --in-place mdr-network.pot --expression='s/YEAR-MO-DA HO:MI+ZONE/2010-09-18 14:57-0500/' | |
sed --in-place mdr-network.pot --expression='s/FULL NAME <EMAIL@ADDRESS>/Matt Rude <[email protected]>/' | |
sed --in-place mdr-network.pot --expression='s/LANGUAGE <[email protected]>/Matt Rude <[email protected]>/' | |
sed --in-place mdr-network.pot --expression='s/CHARSET/UTF-8/' | |
for a in `echo 'fr es de pt it ru nl cs da fi zh'` | |
do | |
rm -rf $a.* | |
curl -F [email protected] \ | |
-F language=$a \ | |
-F output=pofile \ | |
http://pepipopum.dixo.net \ | |
--output $a.po | |
done | |
mv fr.po fr_FR.po # French | |
mv de.po de_DE.po # German | |
mv it.po it_IT.po # Italian | |
mv ru.po ru_RU.po # Russian | |
mv da.po da_DK.po # Danish | |
mv nl.po nl_NL.po # Dutch | |
mv cs.po cs_CZ.po # Czech | |
mv fi.po fi_FI.po # Finnish | |
#mv es.po es_ES.po # Spanish | |
#mv pt.po pt_PT.po # Portuguese | |
#mv zh.po zh_CN.po # Chinese | |
for a in `echo 'zh_CN zh_TW zh_HK'` | |
do | |
cp zh.po $a.po | |
msgfmt -o $a.mo $a.po | |
done | |
for a in `echo 'es_ES es_PE es_CL'` | |
do | |
cp es.po $a.po | |
msgfmt -o $a.mo $a.po | |
done | |
for a in `echo 'pt_PT pt_BE'` | |
do | |
cp pt.po $a.po | |
msgfmt -o $a.mo $a.po | |
done | |
rm -rf pt.po | |
rm -rf es.po | |
rm -rf zh.po | |
msgfmt fr_FR.po | |
msgfmt de_DE.po | |
msgfmt it_IT.po | |
msgfmt ru_RU.po | |
msgfmt da_DK.po | |
msgfmt nl_NL.po | |
msgfmt cs_CZ.po | |
msgfmt fi_FI.po | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment