From 13940268a2539c91beed66ce62c128ca1568087c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 28 Feb 2018 01:19:40 -0600 Subject: [PATCH] Fix findMissingTranslations.sh for 2.0.x --- buildroot/share/scripts/findMissingTranslations.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/buildroot/share/scripts/findMissingTranslations.sh b/buildroot/share/scripts/findMissingTranslations.sh index d460e647b..c223d2a06 100755 --- a/buildroot/share/scripts/findMissingTranslations.sh +++ b/buildroot/share/scripts/findMissingTranslations.sh @@ -9,7 +9,9 @@ # If no language codes are specified then all languages will be checked # -[ -d "Marlin" ] && cd "Marlin" +LANGHOME="Marlin/src/lcd/language" + +[ -d $LANGHOME ] && cd $LANGHOME FILES=$(ls language_*.h | grep -v -E "(_en|_test)\.h" | sed -E 's/language_([^\.]+)\.h/\1/') declare -A STRING_MAP @@ -40,5 +42,8 @@ done echo for K in $( printf "%s\n" "${!STRING_MAP[@]}" | sort ); do - printf "%-35s :%s\n" "$K" "${STRING_MAP[$K]}" + case "$#" in + 1 ) echo $K ;; + * ) printf "%-35s :%s\n" "$K" "${STRING_MAP[$K]}" ;; + esac done