From 8a4aacf27a616fa54b2b1727fb291d38991361db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sat, 8 Feb 2025 22:36:19 +0100 Subject: [PATCH] other: Improve finding translatable files --- scripts/update_translations.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/scripts/update_translations.py b/scripts/update_translations.py index c2fd380..a81113b 100755 --- a/scripts/update_translations.py +++ b/scripts/update_translations.py @@ -13,6 +13,19 @@ TRANSLATABLE_FILES = [ "*.py", "*.ui", ] +PLUGIN_DIRS = [ + "acronyms_expander", + "anti_spam", + "clients_icons", + "length_notifier", + "message_box_size", + "now_listen", + "openpgp", + "pgp", + "plugins_translations", + "quick_replies", + "triggers", +] def template_is_equal(old_template_path: Path, new_template: str) -> bool: @@ -30,7 +43,9 @@ def template_is_equal(old_template_path: Path, new_template: str) -> bool: def update_translation_template() -> bool: paths: list[Path] = [] for file_path in TRANSLATABLE_FILES: - paths += list(REPO_DIR.rglob(file_path)) + for plugin_dir in PLUGIN_DIRS: + plugin_path = REPO_DIR / plugin_dir + paths += list(plugin_path.rglob(file_path)) cmd = [ "xgettext",