# HG changeset patch # User Andrey Skvortsov # Date 1538565439 -10800 # Node ID dc5554f0c12ca544bb5f24e6c0ba5e6e47c69cf2 # Parent 2c7b7ae24d57b3c37ee7b14202507bf5dd00bb78 Add automatic check for localization strings with multiple unnamed arguments diff -r 2c7b7ae24d57 -r dc5554f0c12c tests/tools/check_source.sh --- a/tests/tools/check_source.sh Wed Oct 03 12:43:35 2018 +0300 +++ b/tests/tools/check_source.sh Wed Oct 03 14:17:19 2018 +0300 @@ -77,6 +77,21 @@ echo "" } +localization_checks() +{ + echo "Check correct localization formats" + xgettext --version + + for i in $py_files; do + xgettext -s --language=Python --package-name Beremiz --output=/tmp/m.pot $i 2>&1 | grep 'warning' + if [ $? -eq 0 ]; then + echo "Syntax error in $i" + set_exit_error + fi + done + echo "DONE" + echo "" +} # pep8 was renamed to pycodestyle # detect existed version @@ -419,6 +434,7 @@ get_files_to_check $@ python3_compile_checks compile_checks + localization_checks pep8_checks_default # pep8_checks_selected