diff --git a/tools/check-translations.sh b/tools/check-translations.sh deleted file mode 100755 index 7d88022c..00000000 --- a/tools/check-translations.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env sh - -CURRENT_DIR=$(cd `dirname $0` && pwd) - -export DJANGO_SETTINGS_MODULE=dsmrreader.config.test - -echo "" -echo "--- Running tests for translations..." -export DJANGO_DATABASE_ENGINE=django.db.backends.sqlite3 -poetry run pytest dsmr_frontend/tests/regression/test_translations.py - - -echo "" -echo "--- Listing untranslated files..." -poetry run sphinx-intl stat -d dsmrreader/locales/ -d docs/_locale/ | grep -v "0 fuzzy, 0 untranslated" | grep -v changelog.po - -if [ $? -ne 1 ]; then - echo "[!] Pending translations [!]" - poetry run sphinx-intl stat -d dsmrreader/locales/ -d docs/_locale/ | grep -v "0 fuzzy, 0 untranslated" | grep -v changelog.po - exit 1; -fi diff --git a/tools/regenerate-translation-mo-files.sh b/tools/regenerate-translation-mo-files.sh deleted file mode 100755 index 08cfe1ed..00000000 --- a/tools/regenerate-translation-mo-files.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env sh - -CURRENT_DIR=$(cd `dirname $0` && pwd) - -# Remove annoying PO headers that get regenerated every time. And sometimes they're empty, crashing the compiler. -echo "Dropping PO file meta data causing issues with VCS..." -find $CURRENT_DIR/../ -type f -iname '*.po' | xargs sed -i '/"PO-Revision-Date:/d' -find $CURRENT_DIR/../ -type f -iname '*.po' | xargs sed -i '/"POT-Creation-Date:/d' -find $CURRENT_DIR/../ -type f -iname '*.po' | xargs sed -i '/"X-Generator:/d' -find $CURRENT_DIR/../ -type f -iname '*.po' | xargs sed -i '/"Generated-By:/d' - -# Same applies to the MO binaries. But since they're binaries we should NOT edit them. -# Just regenerate them AFTER we update the PO's. -echo "Generating MO files..." -$CURRENT_DIR/../manage.py compilemessages - -# How-to diff .MO in Git: https://superuser.com/a/1251397