From e3d537a404c93540123bcf87bfa19150f6096211 Mon Sep 17 00:00:00 2001 From: pvillaverde Date: Sun, 5 Mar 2023 14:15:09 +0100 Subject: [PATCH] Fix long lines being added despite already translated --- src/lang/extra/_checkMissingTranslations.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lang/extra/_checkMissingTranslations.sh b/src/lang/extra/_checkMissingTranslations.sh index 6fe5512425..cbcfe78c45 100755 --- a/src/lang/extra/_checkMissingTranslations.sh +++ b/src/lang/extra/_checkMissingTranslations.sh @@ -20,11 +20,10 @@ while read -r line; do continue fi # Extract the string code from the English line - STRING_CODE=$(echo $line | cut -d' ' -f1) + STRING_CODE=$(echo $line | cut -d':' -f1 | tr -d '[:space:]') # Check if the string code exists in the language file - if ! grep -qw "$STRING_CODE" "$language_file"; then + if ! grep -q "$STRING_CODE" "$language_file"; then # If the line doesn't exist, add it to the end of the language file - continue echo "$line" >>"$language_file" echo "Added missing line to $language_file: $line" fi