HEX
Server: LiteSpeed
System: Linux server44.twelveinks.com 5.14.0-570.12.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 13 06:11:55 EDT 2025 x86_64
User: moda (1338)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /python/moda/public_html/tech/old/vendor/phpmyadmin/sql-parser/tools/update-po
#!/bin/sh
# vim: expandtab sw=4 ts=4 sts=4:
export LC_ALL=C

# Exit on failure
set -e

# Update pot (template), ensure that advisor is at the end
LOCS=`ls locale/*/LC_MESSAGES/sqlparser.po | sed 's@.*locale/\(.*\)/LC_MESSAGES/sqlparser\.po@\1@'`

xgettext \
    -d sqlparser \
    --msgid-bugs-address=translators@phpmyadmin.net \
    -o locale/sqlparser.pot \
    --language=PHP \
    --add-comments=l10n \
    --add-location \
    --debug \
    --from-code=utf-8 \
    --keyword=gettext --keyword=error \
    --copyright-holder="phpMyAdmin devel team" \
    `find -name '*.php' -not -path './tests/*' -not -path './locale/*' -not -path './build/*' -not -path './vendor/*' | sort --dictionary-order --ignore-case`

ver=5

sed -i '
    s/SOME DESCRIPTIVE TITLE/phpMyAdmin SQL parser translation/;
    s/PACKAGE/SQL parser/;
    s/(C) YEAR/(C) 2015 - '`date +%Y`'/;
    s/VERSION/'$ver'/;
    ' locale/sqlparser.pot

# Update po files (translations)
for loc in $LOCS ; do
    sed -i '
        s/SOME DESCRIPTIVE TITLE/phpMyAdmin SQL parser translation/;
        s/PACKAGE/SQL parser/;
        s/(C) YEAR/(C) 2015 - '`date +%Y`'/;
        s/VERSION/'$ver'/;
        s/Project-Id-Version: \(phpMyAdmin\|SQL parser\) .*/Project-Id-Version: SQL parser '$ver'\\n"/;
        ' locale/$loc/LC_MESSAGES/sqlparser.po
    msgmerge --previous -U locale/$loc/LC_MESSAGES/sqlparser.po locale/sqlparser.pot
done

# Generate mo files as well
./tools/generate-mo

# Commit changes
git add locale
git commit -s -m 'Update translations

[CI skip]'