From d0b7e4ea79776751f8c7332bd39cb1c26f380b52 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Wed, 11 Mar 2026 11:48:09 +0100 Subject: [PATCH 1/2] util/run_xgettext: Rename template to .pot Renaming the translation template to *.pot, works better with some tooling like poedit and lokalize. Project......: Improve Superblock Addon Sponsored-by.: NLnet NGI0 Commons Fund --- util/run_xgettext.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/run_xgettext.sh b/util/run_xgettext.sh index b64862e65..c0e7a4f7b 100755 --- a/util/run_xgettext.sh +++ b/util/run_xgettext.sh @@ -22,12 +22,12 @@ if [ $ADDONMODE ] then cd "$FULLPATH/../addon/$ADDONNAME" mkdir -p "$FULLPATH/../addon/$ADDONNAME/lang/C" - OUTFILE="$FULLPATH/../addon/$ADDONNAME/lang/C/hmessages.po" + OUTFILE="$FULLPATH/../addon/$ADDONNAME/lang/C/hmessages.pot" FINDSTARTDIR="." FINDOPTS= else cd "$FULLPATH/../view/lang/en/" - OUTFILE="$FULLPATH/hmessages.po" + OUTFILE="$FULLPATH/hmessages.pot" FINDSTARTDIR="../../../" # skip addon folder FINDOPTS="( -wholename */store -o -wholename */vendor -o -wholename */extend ) -prune -o" From 260b61ba3b094374367e406d0855fca7c9ad0512 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Wed, 11 Mar 2026 11:51:35 +0100 Subject: [PATCH 2/2] util/run_xgettext: Use PHP matching rules Explicitly tell xgettext to use PHP matching rules to find translatable strings. Project......: Improve Superblock Addon Sponsored-by.: NLnet NGI0 Commons Fund --- util/run_xgettext.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/run_xgettext.sh b/util/run_xgettext.sh index c0e7a4f7b..f2d352bef 100755 --- a/util/run_xgettext.sh +++ b/util/run_xgettext.sh @@ -59,7 +59,7 @@ for f in $(find -L "$FINDSTARTDIR" $FINDOPTS -name "*.php" -type f) do if [ ! -d "$f" ] then - xgettext $KEYWORDS $OPTS -j -o "$OUTFILE" --from-code=UTF-8 "$f" > /dev/null 2>&1 + xgettext $KEYWORDS $OPTS -L PHP -j -o "$OUTFILE" --from-code=UTF-8 "$f" > /dev/null 2>&1 fi done