Merge remote branch 'origin/master'
[phpmyadmin/dkf.git] / scripts / update-po
blobae024f030d836214e6165dda0a302aeccc494d2e
1 #!/bin/sh
2 # vim: expandtab sw=4 ts=4 sts=4:
3 LOCS=`ls po/*.po | sed 's@.*/\(.*\)\.po@\1@'`
4 xgettext \
5 -d phpmyadmin \
6 --msgid-bugs-address=phpmyadmin-devel@lists.sourceforge.net \
7 -o po/phpmyadmin.pot \
8 --language=PHP \
9 --add-comments=l10n \
10 --add-location \
11 --debug \
12 --keyword=__ --keyword=_pgettext:1c,2 --keyword=_ngettext:1,2 \
13 --copyright-holder="phpMyAdmin devel team" \
14 `find . -name '*.php' | sort`
16 ver=`sed -n "/PMA_VERSION', '/ s/.*PMA_VERSION', '\(.*\)'.*/\1/p" libraries/Config.class.php`
18 sed -i '
19 s/SOME DESCRIPTIVE TITLE/phpMyAdmin translation/;
20 s/PACKAGE/phpMyAdmin/;
21 s/(C) YEAR/(C) 2003 - '`date +%Y`'/;
22 s/VERSION/'$ver'/;
23 ' po/phpmyadmin.pot
25 for loc in $LOCS ; do
26 sed -i '
27 s/SOME DESCRIPTIVE TITLE/phpMyAdmin translation/;
28 s/PACKAGE/phpMyAdmin/;
29 s/(C) YEAR/(C) 2003 - '`date +%Y`'/;
30 s/VERSION/'$ver'/;
31 s/Project-Id-Version: phpMyAdmin .*/Project-Id-Version: phpMyAdmin '$ver'\\n"/;
32 ' po/$loc.po
33 if [ -f ../localized_docs/po/$loc.po ] ; then
34 msgmerge --previous -C ../localized_docs/po/$loc.po -U po/$loc.po po/phpmyadmin.pot
35 else
36 msgmerge --previous -U po/$loc.po po/phpmyadmin.pot
38 done