-
Notifications
You must be signed in to change notification settings - Fork 785
Localization #269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Localization #269
Conversation
Implemented comprehensive localization infrastructure using .NET resource files (.resx) to support multiple languages with proper separation of concerns. Changes: - Created Strings.resx (English) and Strings.ja.resx (Japanese) - Auto-generated Strings.Designer.cs for type-safe resource access - Added GetLocalizedString() methods to all enum extensions: * ThemeExtension.GetLocalizedString() * RunnerExtension.GetLocalizedString() * FPSMaxLimitExtension.GetLocalizedString() - Updated ContextMenuManager to use localized strings for: * All menu items (Runners, Theme, Settings, etc.) * Balloon tip messages * Warning dialogs - Updated EndlessGameForm window title Architecture: - All UI strings centralized in Strings.resx files - Existing GetString() methods preserved for internal logic - New GetLocalizedString() methods for UI display - Language automatically detected from system culture - Type-safe: compile-time checking prevents typos Japanese translations: - Runners → ランナー - Theme → テーマ - Settings → 設定 - Cat → 猫, Parrot → オウム, Horse → 馬 - All menu items and messages fully translated 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request implements multi-language support for RunCat365, initially supporting English and Japanese. The implementation follows .NET localization best practices using resource files (.resx) to manage translated strings.
Changes:
- Added resource files for English (default) and Japanese localization
- Introduced a
TreeFormatterutility class to standardize tree-like text output formatting - Updated all user-facing strings throughout the application to use localized resources
- Enhanced menu item selection with Tag-based identification to support localized text
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| TreeFormatter.cs | New utility class providing consistent formatting for tree-structured text output in system information displays |
| Properties/Strings.resx | Default English resource file containing all user-facing strings |
| Properties/Strings.ja.resx | Japanese resource file with translated strings |
| Properties/Strings.Designer.cs | Auto-generated strongly-typed resource accessor class |
| Program.cs | Added DEBUG conditional code to manually set culture for testing purposes |
| Theme.cs | Added GetLocalizedString method to return translated theme names |
| Runner.cs | Added GetLocalizedString method to return translated runner names |
| CPURepository.cs | Updated to use localized strings and TreeFormatter for consistent output |
| MemoryRepository.cs | Updated to use localized strings and TreeFormatter for consistent output |
| StorageRepository.cs | Updated to use localized strings and TreeFormatter for consistent output |
| NetworkRepository.cs | Updated to use localized strings and TreeFormatter for consistent output |
| EndlessGameForm.cs | Updated window title and in-game text to use localized strings; changed fonts for better international character support |
| CustomToolStripMenuItem.cs | Enhanced to store enum values in Tag property for locale-independent menu item identification |
| ContextMenuManager.cs | Updated all menu items to use localized strings; enhanced selection logic to use Tag-based identification with text-based fallback |
Files not reviewed (1)
- RunCat365/Properties/Strings.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Context of Contribution
Summary of the Proposal
Build a foundation for multi-language support.
Initially, I will support two languages: English and Japanese.
Reason for the new feature
Ref: #225
Checklist