Add Simplified Chinese localization and language settings - #6
Add Simplified Chinese localization and language settings#6Jill-Stingray-L wants to merge 1 commit into
Conversation
|
Oh, by the way, would you be open to a separate follow-up PR adding a Simplified Chinese README as |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e65a95e568
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| CultureInfo.CurrentUICulture = culture; | ||
| CultureInfo.DefaultThreadCurrentUICulture = culture; |
There was a problem hiding this comment.
Apply the selected culture to formatted values
When an en-US user selects Simplified Chinese, or a zh-CN user selects English, this updates only CurrentUICulture; visible values are still formatted with CultureInfo.CurrentCulture in UsageTextFormatter, TokenActivityViewModel, UsageWidgetViewModel, and TaskbarLabelWindow. Consequently, day and month names remain in the Windows regional language (for example, an English Sunday, August 30 inside the Chinese UI), contradicting the explicit “always use” language setting. Also update the formatting culture/default, or format these values using Strings.Current.Culture.
Useful? React with 👍 / 👎.
Summary
zh-CN) resources with English fallbackNo third-party localization dependencies were added.
Testing
dotnet restore .\CodexUsageWidget.slnxdotnet build .\CodexUsageWidget.slnx -c Release --no-restoredotnet test .\CodexUsageWidget.slnx -c Release --no-build(157 tests passed)Closes #4