fix(i18n): tray menu shows Simplified Chinese when Traditional Chinese is selected#901
Merged
cjpais merged 2 commits intocjpais:mainfrom Mar 1, 2026
Merged
Conversation
…e is selected The tray locale lookup truncated "zh-TW" to "zh", always hitting Simplified Chinese. Now tries full locale first, then language prefix, then English. Follow-up fix for cjpais#796. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Owner
|
Thank you! |
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.
Before Submitting This PR
Human Written Description
PR #796 added Traditional Chinese (zh-TW) locale support and fixed locale truncation in
settings.rsandi18n/index.ts, but missed the same truncation bug in the Rust traymenu code (
tray_i18n.rs). When a user selects 繁體中文 (Traditional Chinese), the tray menu still showsSimplified Chinese text (e.g. "设置..." instead of "設定...") because
get_language_code()strips "zh-TW" down to "zh", which maps to Simplified Chinese.
Related Issues/Discussions
Follow-up fix for #796
Testing
AI Assistance
If AI was used: