Repository navigation
Conversation
Add the 257 strings vi.json was missing (provider setup tips, generation progress, AI video quotes, diagnostic logging, OAuth flows), so the Vietnamese UI no longer falls back to English. Provider tips now render in any locale listed in FULLY_TRANSLATED_TIPS_LOCALES (zh, en, vi), falling back to English per key. The i18n tests treat vi as a fully translated locale: it must cover every English key with matching placeholders and URLs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Vietnamese locale covered only the keys required for secondary locales, so about 257 strings still showed in English: provider setup tips, generation progress, AI video quotes and charge confirmations, diagnostic logging, and the Kimi/Codex/ChatGPT OAuth flows. This PR translates all of them, so
vi.jsonnow covers all 763 keys inen.json.Changes
webui/i18n/vi.json: adds the missing translations. Existing keys are reordered to matchen.json; no existing translation changed. Placeholders ({...}) and Markdown link targets are identical to English. In the provider tips, the field labels**API Key**/**Base Url**/**Model Name**stay in English, as inzh.json.webui/Main.py:get_llm_provider_tipsandget_tts_provider_tipsnow use_provider_tips_language(). That function picks the UI language when it is inFULLY_TRANSLATED_TIPS_LOCALES(zh,en,vi) and the locale has that tip, and falls back to English per key otherwise. Non-zhlanguages prefer the international service endpoint, asenalready did.test/services/test_webui_i18n.py: addsFULLY_TRANSLATED_LOCALES = ("vi",). These locales are exempt from the "do not duplicate provider tips / English fallback keys" checks. A new test requires them to cover every English key with matching placeholders and URLs.Note on maintenance policy
This relaxes the current rule that only zh/en maintain provider tips, for
vionly. Every other secondary locale behaves as before. When new English keys are added, the new test will flag missing Vietnamese strings. If you would rather keep the zh/en-only policy, I can drop the tips and fallback keys from this PR.Testing
pytest test/services/test_webui_i18n.py test/services/test_llm.py test/services/test_codex_i18n.py test/services/test_chatgpt_i18n.py: 200 passed.test/servicesrun on Windows: 3202 passed, 3 failed. The 3 failures also happen onmainwithout this change and come from Windows limits: a long image file name, and symlink creation that needs admin privileges.🤖 Generated with Claude Code