diff --git a/api/routes.py b/api/routes.py index 22437be3..0e816873 100644 --- a/api/routes.py +++ b/api/routes.py @@ -7052,6 +7052,15 @@ _LOGIN_LOCALE = { "invalid_pw": "Nieprawid\u0142owe has\u0142o", "conn_failed": "Po\u0142\u0105czenie nie powiod\u0142o si\u0119", }, + "vi": { + "lang": "vi", + "title": "\u0110\u0103ng nh\u1eadp", + "subtitle": "Nh\u1eadp m\u1eadt kh\u1ea9u c\u1ee7a b\u1ea1n \u0111\u1ec3 ti\u1ebfp t\u1ee5c", + "placeholder": "M\u1eadt kh\u1ea9u", + "btn": "\u0110\u0103ng nh\u1eadp", + "invalid_pw": "M\u1eadt kh\u1ea9u kh\u00f4ng h\u1ee3p l\u1ec7", + "conn_failed": "K\u1ebft n\u1ed1i th\u1ea5t b\u1ea1i", + }, } diff --git a/tests/test_auxiliary_models_settings.py b/tests/test_auxiliary_models_settings.py index 25fd253e..e39c24f4 100644 --- a/tests/test_auxiliary_models_settings.py +++ b/tests/test_auxiliary_models_settings.py @@ -305,8 +305,8 @@ class TestAuxiliaryModelsI18n: """Count of each key should equal the number of locales (12 with Turkish).""" for key in self.REQUIRED_KEYS: count = I18N_JS.count(f"{key}:") - assert count == 13, ( - f"i18n key '{key}' found {count} times — expected 12 (one per locale)" + assert count == 14, ( + f"i18n key '{key}' found {count} times — expected 14 (one per locale)" ) diff --git a/tests/test_issue1488_composer_voice_buttons.py b/tests/test_issue1488_composer_voice_buttons.py index 0f08eb25..7cd02c2f 100644 --- a/tests/test_issue1488_composer_voice_buttons.py +++ b/tests/test_issue1488_composer_voice_buttons.py @@ -123,7 +123,7 @@ class TestComposerVoiceButtonI18n: "voice_mode_toggle_active", ) - LOCALES = ("en", "fr", "it", "ja", "ru", "es", "de", "zh", "zh-Hant", "pt", "ko", "tr", "pl") + LOCALES = ("en", "fr", "it", "ja", "ru", "es", "de", "zh", "zh-Hant", "pt", "ko", "tr", "pl", "vi") def test_legacy_voice_toggle_key_removed(self): """The old key whose string was 'Voice input' caused the duplicate- @@ -171,7 +171,7 @@ class TestComposerVoiceButtonI18n: class TestVoiceModePreferenceGate: """boot.js must hide btnVoiceMode by default, surface it via Preferences.""" - LOCALES = ("en", "fr", "it", "ja", "ru", "es", "de", "zh", "zh-Hant", "pt", "ko", "tr", "pl") + LOCALES = ("en", "fr", "it", "ja", "ru", "es", "de", "zh", "zh-Hant", "pt", "ko", "tr", "pl", "vi") def test_voice_mode_pref_is_localstorage_backed(self): """The pref reads from localStorage key 'hermes-voice-mode-button'.""" diff --git a/tests/test_issue2679_hide_suggestions.py b/tests/test_issue2679_hide_suggestions.py index 893d02c1..33c8bbc3 100644 --- a/tests/test_issue2679_hide_suggestions.py +++ b/tests/test_issue2679_hide_suggestions.py @@ -50,8 +50,8 @@ def test_panels_round_trip_and_hot_apply_hide_suggestions(): def test_hide_suggestions_i18n_all_locales_and_changelog(): js = I18N.read_text(encoding="utf-8") - assert js.count("settings_label_hide_suggestions:") == 13 - assert js.count("settings_desc_hide_suggestions:") == 13 + assert js.count("settings_label_hide_suggestions:") == 14 + assert js.count("settings_desc_hide_suggestions:") == 14 changelog = CHANGELOG.read_text(encoding="utf-8") assert "#2679" in changelog assert "hide_empty_state_suggestions" in changelog diff --git a/tests/test_issue3227_help_tab.py b/tests/test_issue3227_help_tab.py index 47b87337..99d58aec 100644 --- a/tests/test_issue3227_help_tab.py +++ b/tests/test_issue3227_help_tab.py @@ -6,7 +6,7 @@ PANELS_JS = (ROOT / "static" / "panels.js").read_text(encoding="utf-8") I18N_JS = (ROOT / "static" / "i18n.js").read_text(encoding="utf-8") STYLE_CSS = (ROOT / "static" / "style.css").read_text(encoding="utf-8") -LOCALE_COUNT = 13 # en, it, ja, ru, es, de, zh, zh-TW, pt, ko, fr, tr, pl +LOCALE_COUNT = 14 # en, it, ja, ru, es, de, zh, zh-TW, pt, ko, fr, tr, pl def test_help_nav_button_present(): diff --git a/tests/test_issue4325_virtualization_toggle.py b/tests/test_issue4325_virtualization_toggle.py index 7aacd98f..1f0fbc62 100644 --- a/tests/test_issue4325_virtualization_toggle.py +++ b/tests/test_issue4325_virtualization_toggle.py @@ -76,8 +76,8 @@ def test_panels_round_trip_and_hot_apply_virtualize_toggle(): def test_virtualize_toggle_i18n_all_locales(): js = I18N.read_text(encoding="utf-8") - assert js.count("settings_label_virtualize_transcript:") == 13 - assert js.count("settings_desc_virtualize_transcript:") == 13 + assert js.count("settings_label_virtualize_transcript:") == 14 + assert js.count("settings_desc_virtualize_transcript:") == 14 # ── #4343 force-off-for-everyone migration (load_settings behavior) ────────── diff --git a/tests/test_issue4356_no_git_update_check.py b/tests/test_issue4356_no_git_update_check.py index 5f8243d6..92e93d20 100644 --- a/tests/test_issue4356_no_git_update_check.py +++ b/tests/test_issue4356_no_git_update_check.py @@ -80,10 +80,10 @@ def test_panels_has_no_git_branch(): def test_i18n_no_git_key_all_locales(): - """settings_update_no_git key appears in all 13 locale blocks in static/i18n.js.""" + """settings_update_no_git key appears in all 14 locale blocks in static/i18n.js.""" i18n_path = Path(__file__).resolve().parent.parent / 'static' / 'i18n.js' content = i18n_path.read_text() # Count occurrences of the new key (should be exactly 13, one per locale) count = content.count("settings_update_no_git") - assert count == 13, f"Expected exactly 13 settings_update_no_git keys, found {count}" + assert count == 14, f"Expected exactly 14 settings_update_no_git keys, found {count}" diff --git a/tests/test_pr1721_rtl_salvage.py b/tests/test_pr1721_rtl_salvage.py index 4d365578..f7c8cb61 100644 --- a/tests/test_pr1721_rtl_salvage.py +++ b/tests/test_pr1721_rtl_salvage.py @@ -112,5 +112,5 @@ def test_rtl_in_config_defaults_and_writable_keys(): def test_rtl_localized_in_all_locales(): js = I18N.read_text(encoding="utf-8") # Count occurrences — should match the 11 locale blocks - assert js.count("settings_label_rtl:") == 13 - assert js.count("settings_desc_rtl:") == 13 + assert js.count("settings_label_rtl:") == 14 + assert js.count("settings_desc_rtl:") == 14 diff --git a/tests/test_quota_chip_settings_toggle.py b/tests/test_quota_chip_settings_toggle.py index 1908fb50..13387873 100644 --- a/tests/test_quota_chip_settings_toggle.py +++ b/tests/test_quota_chip_settings_toggle.py @@ -88,5 +88,5 @@ def test_quota_chip_panels_round_trip(): def test_quota_chip_localized_in_all_locales(): js = I18N.read_text(encoding="utf-8") - assert js.count("settings_label_quota_chip:") == 13, "12 locales expected" - assert js.count("settings_desc_quota_chip:") == 13, "12 locales expected" + assert js.count("settings_label_quota_chip:") == 14, "12 locales expected" + assert js.count("settings_desc_quota_chip:") == 14, "12 locales expected" diff --git a/tests/test_verdigris_skin.py b/tests/test_verdigris_skin.py index fa2736a0..0c8c6ce4 100644 --- a/tests/test_verdigris_skin.py +++ b/tests/test_verdigris_skin.py @@ -38,4 +38,4 @@ def test_verdigris_has_no_light_variant(): def test_verdigris_i18n_lists_skin_in_all_locales(): # There are 12 locales; each should now include verdigris as the trailing skin. # 10 locales use ASCII closing paren, 2 Chinese locales use full-width paren. - assert I18N_JS.count("verdigris)") + I18N_JS.count("verdigris)") == 13 + assert I18N_JS.count("verdigris)") + I18N_JS.count("verdigris)") == 14 diff --git a/tests/test_zeus_skin.py b/tests/test_zeus_skin.py index 34b4e877..abca40e9 100644 --- a/tests/test_zeus_skin.py +++ b/tests/test_zeus_skin.py @@ -45,4 +45,4 @@ def test_zeus_modals_are_not_navy(): def test_zeus_i18n_lists_skin_in_all_locales(): # There are 12 locales; each should include zeus in the skin list. - assert I18N_JS.count("/zeus/") == 13 + assert I18N_JS.count("/zeus/") == 14