Add script for updating po files.
This commit is contained in:
33
scripts/updatepo
Executable file
33
scripts/updatepo
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
# vim: expandtab sw=4 ts=4 sts=4:
|
||||
LOCS=`ls po/*.po | sed 's@.*/\(.*\)\.po@\1@'`
|
||||
xgettext \
|
||||
-d phpmyadmin \
|
||||
--msgid-bugs-address=phpmyadmin-devel@lists.sourceforge.net \
|
||||
-o po/phpmyadmin.pot \
|
||||
--language=PHP \
|
||||
--add-comments=l10n \
|
||||
--add-location \
|
||||
--keyword=__ \
|
||||
--copyright-holder="phpMyAdmin devel team" \
|
||||
`find . -name '*.php' | sort`
|
||||
|
||||
ver=`sed -n "/PMA_VERSION', '/ s/.*PMA_VERSION', '\(.*\)'.*/\1/p" libraries/Config.class.php`
|
||||
|
||||
sed -i '
|
||||
s/SOME DESCRIPTIVE TITLE/phpMyAdmin translation/;
|
||||
s/PACKAGE/phpMyAdmin/;
|
||||
s/(C) YEAR/(C) 2003 - '`date +%Y`'/;
|
||||
s/VERSION/'$ver'/;
|
||||
' po/phpmyadmin.pot
|
||||
|
||||
for loc in $LOCS ; do
|
||||
sed -i '
|
||||
s/SOME DESCRIPTIVE TITLE/phpMyAdmin translation/;
|
||||
s/PACKAGE/phpMyAdmin/;
|
||||
s/(C) YEAR/(C) 2003 - '`date +%Y`'/;
|
||||
s/VERSION/'$ver'/;
|
||||
s/Project-Id-Version: phpMyAdmin .*/Project-Id-Version: phpMyAdmin '$ver'\\n"/;
|
||||
' po/$loc.po
|
||||
msgmerge --previous -U po/$loc.po po/phpmyadmin.pot
|
||||
done
|
Reference in New Issue
Block a user