Translation update done using Pootle.
[phpmyadmin.git] / scripts / update-po-foreign
blob831fa0c6cbf060f9f17ea10ef018916b5cf94fe4
1 #!/bin/sh
2 # vim: expandtab sw=4 ts=4 sts=4:
4 if [ ! -d "$1" ] ; then
5 echo 'Usage: update-po-foreign DIR'
6 echo 'Updates po files based on po files in DIR'
7 exit 1
8 fi
10 export LC_COLLATE=C
11 LOCS=`ls po/*.po | sed 's@.*/\(.*\)\.po@\1@'`
13 ver=`sed -n "/PMA_VERSION', '/ s/.*PMA_VERSION', '\(.*\)'.*/\1/p" libraries/Config.class.php`
15 for loc in $LOCS ; do
16 if [ ! -f "$1/$loc.po" ] ; then
17 continue
19 sed -i '
20 s/SOME DESCRIPTIVE TITLE/phpMyAdmin translation/;
21 s/PACKAGE/phpMyAdmin/;
22 s/(C) YEAR/(C) 2003 - '`date +%Y`'/;
23 s/VERSION/'$ver'/;
24 s/Project-Id-Version: phpMyAdmin .*/Project-Id-Version: phpMyAdmin '$ver'\\n"/;
25 ' po/$loc.po
26 msgmerge --previous -C "$1/$loc.po" -U po/$loc.po po/phpmyadmin.pot
27 done