From 6e8a1d88f203ca79ed9f2965b39dc12efbf76db6 Mon Sep 17 00:00:00 2001 From: 3d-gussner <3d.gussner@gmail.com> Date: Sat, 17 Sep 2022 10:32:24 +0200 Subject: [PATCH] Add current size of translation if it fails disable translation suggestions by default during build, as we have lot of identical translated messages as the origin. --- lang/fw-build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lang/fw-build.sh b/lang/fw-build.sh index fc375da08..cd79b20a9 100755 --- a/lang/fw-build.sh +++ b/lang/fw-build.sh @@ -53,7 +53,7 @@ for lang in $LANGUAGES; do binfile="$TMPDIR/lang_$lang.bin" color 4 "compiling language \"$lang\" from $pofile" >&2 - ./lang-check.py --map "$MAP" "$pofile" + ./lang-check.py --map "$MAP" "$pofile" --no-suggest if [ "$?" != 0 ]; then color 1 "$pofile: NG! - translation contains warnings or errors" >&2 fi @@ -61,8 +61,9 @@ for lang in $LANGUAGES; do ./lang-build.py "$MAP" "$pofile" "$binfile" # ensure each catalog fits the reserved size - if [[ $(stat -c '%s' "$binfile") -gt $maxsize ]]; then - color 1 "$pofile: NG! - language data exceeds $maxsize bytes" >&2 + currentsize=$(stat -c '%s' "$binfile") + if [[ $currentsize -gt $maxsize ]]; then + color 1 "$pofile: NG! - language data exceeds $maxsize bytes, it uses $currentsize" >&2 finish 1 fi done