Procházet zdrojové kódy

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.

3d-gussner před 2 roky
rodič
revize
6e8a1d88f2
1 změnil soubory, kde provedl 4 přidání a 3 odebrání
  1. 4 3
      lang/fw-build.sh

+ 4 - 3
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