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.