From 4c95d9274e6234d6445a09313c1baecf4dcf77dd Mon Sep 17 00:00:00 2001 From: Frank Song Date: Sun, 10 May 2026 15:03:21 +0800 Subject: [PATCH] test: add kanban modal locale parity regression --- tests/test_kanban_ui_static.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/test_kanban_ui_static.py b/tests/test_kanban_ui_static.py index 5171ac31..fc7220e3 100644 --- a/tests/test_kanban_ui_static.py +++ b/tests/test_kanban_ui_static.py @@ -472,6 +472,38 @@ def test_kanban_i18n_keys_exist_in_every_locale_block(): assert missing == [] +def test_kanban_modal_locale_parity(): + """Parity check for modal-facing Kanban i18n keys. + + Any locale that already contains modal-facing Kanban strings should include the + same set of modal vocabulary so new additions don't regress into locale gaps. + """ + locale_blocks = re.findall(r"\n\s*([a-z]{2}(?:-[A-Z]{2})?): \{(.*?)\n\s*\},", I18N, flags=re.S) + modal_keys = [ + "kanban_title", + "kanban_description", + "kanban_description_placeholder", + "kanban_status", + "kanban_assignee", + "kanban_assignee_placeholder", + "kanban_tenant", + "kanban_tenant_placeholder", + "kanban_priority", + "kanban_priority_hint", + "kanban_title_required", + ] + anchor_key = "kanban_no_comments" + missing = [ + f"{locale}:{key}" + for locale, body in locale_blocks + if re.search(rf"\b{re.escape(anchor_key)}\s*:", body) is not None + for key in modal_keys + if re.search(rf"\b{re.escape(key)}\s*:", body) is None + ] + assert missing == [] + + + def test_kanban_dashboard_parity_core_controls_are_native(): assert 'id="kanbanOnlyMine"' in INDEX