From 9e8bd1926b37d35789f618d04679c1db2396e416 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 16:37:53 +0100 Subject: [PATCH] pre-commit: Run `scripts/find_localised_strings.py` This will report on any missing LANG comments at commit time. NB: set to run on all files in case of L10n/en.template changes. --- .pre-commit-config.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 25f65352..8c517ecf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -66,6 +66,15 @@ repos: args: [check, --bare, -r] language: system +# Check translation comments are up to date +- repo: local + hooks: + - id: LANG_comments + name: 'LANG comments' + language: system + entry: python scripts/find_localised_strings.py --compare-lang L10n/en.template --directory . --ignore coriolis-data --ignore dist.win32 + pass_filenames: false + default_language_version: python: python3.9