feat: add Simplified Chinese (zh-CN) internationalization#1044
Open
superpickyapp wants to merge 1 commit into
Open
feat: add Simplified Chinese (zh-CN) internationalization#1044superpickyapp wants to merge 1 commit into
superpickyapp wants to merge 1 commit into
Conversation
Implement complete internationalization using react-i18next across the entire app. All UI strings in components, modals, panels, context menus, and adjustment controls are now translated. Language selection persists via AppSettings and switches instantly without restart. - Add i18next framework with en and zh-CN locale files - Add language field to AppSettings (Rust + TypeScript) - Replace hardcoded strings in 50+ components with t() calls - Translate mask type names, color labels, waveform modes, curve menus - Support dynamic strings (mask default names, copy/inverted suffixes) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
This PR adds full Simplified Chinese (简体中文) support to RapidRAW using react-i18next, while keeping English as the default language. The language can be switched instantly from the Settings panel without restarting the app, and the preference is persisted in
AppSettings.What's included
i18next+react-i18next, configured insrc/i18n.tswithenas default andzh-CNas the second localesrc/locales/en/translation.jsonandsrc/locales/zh-CN/translation.json— covering all namespaces:app,metadata,library,editor,adjustments,crop,export,presets,ai,settings,tooltips,modals,maskslanguage: Option<String>field to RustAppSettingsstruct; language is loaded on startup and saved on changei18n.changeLanguage()t()calls across 50+ components — including panels, modals, context menus, adjustment controls, mask type names, waveform modes, color labels, and moreArchitecture notes
nameKey/labelKeypattern — the key is stored in the array andt(key)is called at render time, so language switches are reactivenamefield onMaskTypeis preserved for backwards compatibility;nameKeyis the new field used for translated displayHow to test
I hope this can be useful to Chinese-speaking users of RapidRAW. Happy to address any feedback or make adjustments to fit the project's conventions.
🤖 Generated with Claude Code