Common strings for descriptions of DATE, TIME, DATETIME and VARCHAR2
[phpmyadmin.git] / scripts / update-po
blob6d4044b4f4c8c11c64cdda185b1d3b962a65abec
1 #!/bin/sh
2 # vim: expandtab sw=4 ts=4 sts=4:
3 export LC_ALL=C
6 # Update pot (template), ensure that advisor is at the end
7 LOCS=`ls po/*.po | sed 's@.*/\(.*\)\.po@\1@'`
8 xgettext \
9 -d phpmyadmin \
10 --msgid-bugs-address=phpmyadmin-devel@lists.sourceforge.net \
11 -o po/phpmyadmin.pot \
12 --language=PHP \
13 --add-comments=l10n \
14 --add-location \
15 --debug \
16 --keyword=__ --keyword=_pgettext:1c,2 --keyword=_ngettext:1,2 \
17 --copyright-holder="phpMyAdmin devel team" \
18 `find . -name '*.php' -not -path './test/*' -not -path './po/*' | sort`
20 # Generate PHP code for advisor rules
21 php ./scripts/advisor2po >> po/phpmyadmin.pot
23 ver=`sed -n "/PMA_VERSION', '/ s/.*PMA_VERSION', '\(.*\)'.*/\1/p" libraries/Config.class.php`
25 sed -i '
26 s/SOME DESCRIPTIVE TITLE/phpMyAdmin translation/;
27 s/PACKAGE/phpMyAdmin/;
28 s/(C) YEAR/(C) 2003 - '`date +%Y`'/;
29 s/VERSION/'$ver'/;
30 ' po/phpmyadmin.pot
32 # Update po files (translations)
33 for loc in $LOCS ; do
34 sed -i '
35 s/SOME DESCRIPTIVE TITLE/phpMyAdmin translation/;
36 s/PACKAGE/phpMyAdmin/;
37 s/(C) YEAR/(C) 2003 - '`date +%Y`'/;
38 s/VERSION/'$ver'/;
39 s/Project-Id-Version: phpMyAdmin .*/Project-Id-Version: phpMyAdmin '$ver'\\n"/;
40 ' po/$loc.po
41 msgmerge --previous -U po/$loc.po po/phpmyadmin.pot
42 done