diff --git a/.gitignore b/.gitignore index cab0ffcedb..ed52327581 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ tests/server_test_cases/.cache/ .pytest_cache/ .vscode/ env/ +venv/ diff --git a/tools/server_tests b/tools/server_tests index 40b45d665a..8139f9896c 100755 --- a/tools/server_tests +++ b/tools/server_tests @@ -30,9 +30,26 @@ pushd "$(dirname $0)" >/dev/null && source common.sh && popd >/dev/null # directory. cd "$(dirname $0)/.." +# Parse arguments and set flags +SKIP_UPDATE_TRANSLATIONS=false +for arg in "$@"; do + shift + if [[ "${arg}" == "--skip_update_translations" ]]; then + SKIP_UPDATE_TRANSLATIONS=true + continue + fi + # All arguments other than "--skip_update_translations" remains intact + set -- "$@" "${arg}" +done +readonly SKIP_UPDATE_TRANSLATIONS + echo -echo "--- Updating translations" -$TOOLS_DIR/update_messages +if [[ "${SKIP_UPDATE_TRANSLATIONS}" == true ]]; then + echo "--- Skipped updating translations" +else + echo "--- Updating translations" + "${TOOLS_DIR}"/update_messages +fi echo echo "--- Running server tests" diff --git a/tools/update_messages.py b/tools/update_messages.py index f263e8740f..df239a69ba 100644 --- a/tools/update_messages.py +++ b/tools/update_messages.py @@ -189,4 +189,5 @@ def django_admin(*args): # Run compilemessages to generate all the .mo files. sys.stderr = open('/dev/null', 'w') # suppress the listing of all files - django_admin('compilemessages') + django_admin('compilemessages', + '--ignore=vendors')