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 bin
/console cache
:warmup
--twig-po --env development
18 # Update pot (template), ensure that advisor is at the end
19 LOCS
=$
(find resources
/po
-name '*.po' |
sed 's@.*/\(.*\)\.po@\1@')
21 find .
-name '*.php' -not -path './tests/*' -not -path './resources/po/*' -not -path './tmp/*' -not -path './release/*' -not -path './node_modules/*' -not -path './vendor/*' > twig-templates
/filesList
23 php .
/bin
/match-twig-cache
24 sort --dictionary-order --ignore-case --output .
/twig-templates
/filesListTemp
< .
/twig-templates
/filesList
25 mv .
/twig-templates
/filesListTemp .
/twig-templates
/filesList
26 php .
/bin
/match-twig-cache
--reverse
28 # Allows word splitting for files list.
29 # shellcheck disable=SC2046
32 --msgid-bugs-address=translators@phpmyadmin.net \
33 -o resources
/po
/phpmyadmin.pot \
39 --keyword=__
--keyword=_gettext
--keyword=_pgettext
:1c
,2 --keyword=_ngettext
:1,2 \
40 --copyright-holder="phpMyAdmin devel team" \
41 $
(cat .
/twig-templates
/filesList
)
43 # Fixup filenames for Twig templates
44 php bin
/console fix-po-twig
46 # Remote twig templates
47 rm -rf twig-templates
/
49 # Keep in sync with create-release.sh
50 fetchReleaseFromFile
() {
51 php
-r "define('VERSION_SUFFIX', ''); require_once('src/Version.php'); echo \PhpMyAdmin\Version::VERSION;"
54 ver
="$(fetchReleaseFromFile)"
57 s/SOME DESCRIPTIVE TITLE/phpMyAdmin translation/;
58 s/PACKAGE/phpMyAdmin/;
59 s/(C) YEAR/(C) 2003 - '"$(date +%Y)"'/;
61 ' resources
/po
/phpmyadmin.pot
63 # Update po files (translations)
66 s/SOME DESCRIPTIVE TITLE/phpMyAdmin translation/;
67 s/PACKAGE/phpMyAdmin/;
68 s/(C) YEAR/(C) 2003 - '"$(date +%Y)"'/;
70 s/Project-Id-Version: phpMyAdmin .*/Project-Id-Version: phpMyAdmin '"$ver"'\\n"/;
71 ' resources
/po
/"$loc".po
72 msgmerge
--previous -U resources
/po
/"$loc".po resources
/po
/phpmyadmin.pot
76 git add resources
/po
/*.po resources
/po
/phpmyadmin.pot
77 git commit
-s -m 'Update po files