From 8b0bf908aff581f4a5e2c8d69545e4bd910baa04 Mon Sep 17 00:00:00 2001 From: Emily Mabrey Date: Sat, 31 Jul 2021 13:03:41 -0400 Subject: [PATCH] Improve `locale_diagnostics.sh` Signed-off-by: Emily Mabrey --- locale/scripts/locale_diagnostics.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/scripts/locale_diagnostics.sh b/locale/scripts/locale_diagnostics.sh index b6b29cc36..616789ce5 100644 --- a/locale/scripts/locale_diagnostics.sh +++ b/locale/scripts/locale_diagnostics.sh @@ -3,15 +3,15 @@ # Report how complete each translation catalog is # How many messages in total? -total=$(grep -c '^msgid' "${BASH_SOURCE[0]}/../tenacity.pot") +total=$(grep -c '^msgid' "../tenacity.pot") declare -i badlines -for po_file in "${BASH_SOURCE[0]}/../"*.po; do +for po_file in ../*.po; do # If there are errors from msgcmp, then the last line on standard error # contains a count of problematic messages; else it won't match the # pattern in awk, so assume no errors - errors=$(msgcmp "$po_file" "${BASH_SOURCE[0]}/../tenacity.pot" 2>&1 | awk '/msgcmp: found [0-9]* fatal error/ { nn = $3 } END {print 0+nn}') + errors=$(msgcmp "$po_file" "../tenacity.pot" 2>&1 | awk '/msgcmp: found [0-9]* fatal error/ { nn = $3 } END {print 0+nn}') complete=$((total-errors)) # detect whether this sequence occurs in any .po file. It will break msgfmt on Windows.