From 8a93b11eb02e66f857560503be7b8edbbb2f6cf2 Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Sun, 26 Oct 2025 09:36:05 +0200 Subject: [PATCH] build: set i18n-update.pl to break at .po error Add logic into i18n-update.pl to break on noticing a fatal error in the .po file. That is needed especially for syncing with i18n-sync script, where possibly all modules and applications are synced and errors easily disappear from screen. Example: Updating ./applications/luci-app-keepalived/po/de/keepalived.po./applications/luci-app-keepalived/po/de/keepalived.po:928:40: invalid control sequence ./applications/luci-app-keepalived/po/de/keepalived.po:928:51: invalid control sequence msgmerge: found 2 fatal errors ./build/i18n-update.pl: [] failed: 256 and Updating modules/luci-base/po/zh_Hant/base.po modules/luci-base/po/zh_Hant/base.po:1169: duplicate message definition... modules/luci-base/po/zh_Hant/base.po:1129: ...this is the location of the first definition modules/luci-base/po/zh_Hant/base.po:1173: duplicate message definition... modules/luci-base/po/zh_Hant/base.po:1133: ...this is the location of the first definition msgmerge: found 2 fatal errors ./build/i18n-update.pl: [] failed: 256 Signed-off-by: Hannu Nyman (cherry picked from commit 6e9a7e12ca7ff7652bc3c0fda367134cf5c04d55) --- build/i18n-update.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/i18n-update.pl b/build/i18n-update.pl index e97e3d2f35..c9ebc25e2f 100755 --- a/build/i18n-update.pl +++ b/build/i18n-update.pl @@ -72,7 +72,7 @@ foreach my $dir (@dirs) my $head = read_header($file); printf "Updating %-40s", $file; - system("msgmerge", "-U", "-N", $file, "$dir/templates/$basename.pot"); + system("msgmerge", "-U", "-N", $file, "$dir/templates/$basename.pot") == 0 || die "$0: [$cmd] failed: $?\n"; write_header($file, $head); } -- 2.30.2