build: set i18n-update.pl to break at .po error
authorHannu Nyman <[email protected]>
Sun, 26 Oct 2025 07:36:05 +0000 (09:36 +0200)
committerHannu Nyman <[email protected]>
Sun, 26 Oct 2025 07:36:05 +0000 (09:36 +0200)
commit6e9a7e12ca7ff7652bc3c0fda367134cf5c04d55
treece970f1c0e23cce2ef68be3d123b69baa287f9c1
parent2025a7afce1a07c188db1588c6e8671156d30973
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 <[email protected]>
build/i18n-update.pl