Repository navigation
feat: add localization infrastructure with .resw resource files (en-US + zh-CN) - #46
Merged
Merged
Conversation
36 tasks
Add WinUI .resw resource files for proper multi-language support: - Strings/en-us/Resources.resw with all extractable UI strings - Strings/zh-cn/Resources.resw with Chinese Simplified translations - x:Uid attributes on XAML elements for automatic resource lookup - LocalizationHelper for C# runtime string localization - Windows auto-selects language based on OS locale Any language can now be added by contributing a new .resw file. Addresses #40
shanselman
force-pushed
the
feat/localization-infrastructure
branch
from
March 17, 2026 04:44
6d6b100 to
456bd0f
Compare
This was referenced Mar 17, 2026
|
Thanks @shanselman! Glad the translations from PR #30 were useful. Good catch on 库存提醒→股票提醒 — that was a mistake on my end. Looking forward to seeing the localized version ship. |
This was referenced Jun 26, 2026
7 of 16 tasks
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.
Add proper WinUI localization infrastructure using
.reswresource files, enabling any language to be added by contributing a single resource file — no source code changes needed.What's included
Infrastructure
Strings/en-us/Resources.resw— 100+ English resource entries covering all windows, dialogs, tray menu, and runtime stringsStrings/zh-cn/Resources.resw— Complete Chinese Simplified translations (from @Kobe9312's work in Add Chinese (Simplified) localization #30)LocalizationHelper.cs— StaticGetString()helper usingResourceLoaderwith fallbackx:Uidattributes on all XAML elements with user-visible text (with English fallback values)DefaultLanguageset toen-USin .csprojLocalized code paths
Settings persistence: safe
ComboBox values are saved/loaded by
Tagattribute (from #42), not display text. Localized labels won't corrupt settings.Review
Dual-model review (Opus + Codex). Both found resources defined but not wired up in code-behind — all fixed. Opus caught a translation error (库存提醒→股票提醒) — fixed.
Build passes, all 475 tests pass.
Adding a new language
Just create
Strings/{locale}/Resources.reswwith the same keys. Windows auto-selects based on OS locale.Addresses #40
/cc @Kobe9312