2 # vim: expandtab sw=4 ts=4 sts=4:
6 if [ -n "$GATEWAY_INTERFACE" ] ; then
7 echo 'Can not invoke as CGI!'
14 # Generate Twig template cache in clean dir
15 rm -rf twig-templates
/
16 php .
/scripts
/generate-twig-cache
18 # Update pot (template), ensure that advisor is at the end
19 LOCS
=`ls po/*.po | sed 's@.*/\(.*\)\.po@\1@'`
22 --msgid-bugs-address=translators@phpmyadmin.net \
23 -o po
/phpmyadmin.pot \
29 --keyword=__
--keyword=_gettext
--keyword=_pgettext
:1c
,2 --keyword=_ngettext
:1,2 \
30 --copyright-holder="phpMyAdmin devel team" \
31 `find \( -name '*.php' -o -name '*.phtml' \) -not -path './test/*' -not -path './po/*' -not -path './tmp/*' -not -path './release/*' -not -path './vendor/*' | sort`
33 # Fixup filenames for Twig templates
34 find twig-templates
-type f |
while read name
; do
35 original
=`sed -n 's@.*Twig_Source.*templates/\([^\"]*\)".*@\1@p' $name`
36 if [ -z "$original" ] ; then
37 echo "Failed to figure our original name of $name!" >&2
39 sed -i "s@$name@templates/$original@g" po
/phpmyadmin.pot
43 # Remote twig templates
44 rm -rf twig-templates
/
46 # Generate PHP code for advisor rules
47 php .
/scripts
/advisor2po
>> po
/phpmyadmin.pot
49 ver
=`sed -n "/PMA_VERSION', '/ s/.*PMA_VERSION', '\(.*\)'.*/\1/p" libraries/classes/Config.php`
52 s/SOME DESCRIPTIVE TITLE/phpMyAdmin translation/;
53 s/PACKAGE/phpMyAdmin/;
54 s/(C) YEAR/(C) 2003 - '`date +%Y`'/;
58 # Update po files (translations)
61 s/SOME DESCRIPTIVE TITLE/phpMyAdmin translation/;
62 s/PACKAGE/phpMyAdmin/;
63 s/(C) YEAR/(C) 2003 - '`date +%Y`'/;
65 s/Project-Id-Version: phpMyAdmin .*/Project-Id-Version: phpMyAdmin '$ver'\\n"/;
67 msgmerge
--previous -U po
/$loc.po po
/phpmyadmin.pot
71 git add po
/*.po po
/phpmyadmin.pot
72 git commit
-s -m 'Update po files