6 # ./locale/translate.sh
8 # This script should be run by
10 # * PphWiki maintainers, before making a distribution
11 # * Translators, after making a translation update
14 if [ ! -f index.php ]; then
15 echo Usage: ./locale/translate.sh
21 xgettext -L C++ -o locale/po/phpwiki.pot lib/*php
23 for i in $ALL_LINGUAS; do
25 pot=$podir/phpwiki.pot
26 locale=locale/$i/LC_MESSAGES
28 msgmerge -o $po $po $pot
30 msgfmt -o $locale/phpwiki.mo $po
39 print ("$locale[\"" msgid "\"] =\n \"" str "\";");
45 print ("$locale[\"" msgid "\"] =\n \"" str "\";");
46 str = substr ($0, 8, length ($0) - 8);
56 str = substr ($0, 9, length ($0) - 9);
60 str = (str substr ($0, 2, length ($0) - 2));
65 print ("$locale[\"" msgid "\"] =\n \"" str "\";");
69 ' $po > $locale/phpwiki.php