-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(i18n): expand support from 2 to 21 languages #1951
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
Open
StillKnotKnown
wants to merge
9
commits into
develop
Choose a base branch
from
i18n-additional-languages
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6d39c11
feat(i18n): add 19 new languages to type definitions
StillKnotKnown 05f4c31
fix(i18n): update LanguageSettings to use 'code' instead of 'value'
StillKnotKnown dc3a099
feat(i18n): add AI translations for 19 new languages
StillKnotKnown 8eb91a2
fix(i18n): add critical UI translations for 19 new languages
StillKnotKnown 1daed93
feat(i18n): add i18n validation script
StillKnotKnown 970d9ac
fix(i18n): add validate:i18n script and fix flaky performance test
StillKnotKnown 28eb575
docs(i18n): document i18n workflow and supported languages
StillKnotKnown 2c464ed
docs: add i18n expansion summary
StillKnotKnown b71f336
Update beta version to 2.8.0-beta.5 in README
StillKnotKnown File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| # i18n Multi-Language Expansion Summary | ||
|
|
||
| **Date:** 2026-03-14 | ||
| **Branch:** `i18n-additional-languages` | ||
| **Status:** Complete | ||
|
|
||
| ## Overview | ||
|
|
||
| Expanded internationalization (i18n) support from 2 languages (English, French) to 21 languages to serve a global user base. All translations were generated via AI translation. | ||
|
|
||
| ## Languages Added (19 New) | ||
|
|
||
| | Code | Language | Native Name | | ||
| |------|----------|-------------| | ||
| | es | Spanish | Español | | ||
| | zh-CN | Chinese (Simplified) | 简体中文 | | ||
| | zh-TW | Chinese (Traditional) | 繁體中文 | | ||
| | hi | Hindi | हिन्दी | | ||
| | pt-BR | Portuguese (Brazil) | Português (Brasil) | | ||
| | pt-PT | Portuguese (Portugal) | Português (Portugal) | | ||
| | ru | Russian | Русский | | ||
| | ja | Japanese | 日本語 | | ||
| | de | German | Deutsch | | ||
| | ko | Korean | 한국어 | | ||
| | tr | Turkish | Türkçe | | ||
| | it | Italian | Italiano | | ||
| | vi | Vietnamese | Tiếng Việt | | ||
| | th | Thai | ไทย | | ||
| | nl | Dutch | Nederlands | | ||
| | pl | Polish | Polski | | ||
| | no | Norwegian | Norsk | | ||
| | id | Indonesian | Bahasa Indonesia | | ||
| | uk | Ukrainian | Українська | | ||
|
|
||
| ## Files Changed | ||
|
|
||
| ### Core i18n Files | ||
| - `apps/desktop/src/shared/constants/i18n.ts` - Added SupportedLanguage type and AVAILABLE_LANGUAGES array | ||
| - `apps/desktop/src/shared/i18n/index.ts` - Added imports and resources for all 21 locales | ||
| - `apps/desktop/src/renderer/components/settings/LanguageSettings.tsx` - Uses new LocaleMetadata interface | ||
|
|
||
| ### New Translation Files (209 files) | ||
| - 19 new locale directories under `apps/desktop/src/shared/i18n/locales/` | ||
| - Each with 11 namespace files: common.json, navigation.json, settings.json, tasks.json, welcome.json, onboarding.json, dialogs.json, gitlab.json, taskReview.json, terminal.json, errors.json | ||
|
|
||
| ### New Scripts | ||
| - `scripts/validate-i18n.js` - Validates JSON structure and key consistency across all locales | ||
|
|
||
| ### Documentation | ||
| - `CLAUDE.md` - Added comprehensive i18n Guidelines section | ||
| - `apps/desktop/CONTRIBUTING.md` - Added i18n and Translations section | ||
|
|
||
| ## Technical Details | ||
|
|
||
| ### Hyphenated Locale Codes | ||
| The resources object uses bracket notation for hyphenated locale codes: | ||
| ```typescript | ||
| export const resources = { | ||
| en, fr, es, | ||
| 'zh-CN': zhCN, | ||
| 'zh-TW': zhTW, | ||
| 'pt-BR': ptBR, | ||
| 'pt-PT': ptPT, | ||
| // ... etc | ||
| } as const; | ||
| ``` | ||
|
|
||
| ### Fallback Behavior | ||
| Missing translation keys fall back to English automatically via i18next configuration: | ||
| ```typescript | ||
| fallbackLng: 'en' | ||
| ``` | ||
|
|
||
| ### Validation | ||
| Run `npm run validate:i18n` to verify: | ||
| - All JSON files are valid | ||
| - All locales have matching keys | ||
| - No missing namespaces | ||
|
|
||
| ## Testing | ||
|
|
||
| All tests passing: | ||
| - Type checking: `npm run typecheck` ✓ | ||
| - Linting: `npm run lint` ✓ | ||
| - Unit tests: `npm test` ✓ | ||
| - i18n validation: `npm run validate:i18n` ✓ | ||
| - Build: `npm run build` ✓ | ||
|
|
||
| ## Success Criteria | ||
|
|
||
| - [x] All 21 locales available in language settings | ||
| - [x] All 220 translation files generated and valid JSON (20 locales × 11 namespaces) | ||
| - [x] Language switching works immediately | ||
| - [x] Settings persist across app restarts | ||
| - [x] Missing keys fall back to English gracefully | ||
| - [x] All tests pass | ||
| - [x] Production build successful | ||
|
|
||
| ## Translation Quality Note | ||
|
|
||
| The AI-generated translations provide a solid foundation for community contributions. Some translations may be partial or literal. Community translators are encouraged to improve translations via GitHub contributions. | ||
|
|
||
| ## Future Enhancements | ||
|
|
||
| - RTL support for Arabic/Hebrew (if needed) | ||
| - Pluralization rules per locale | ||
| - Date/time localization improvements | ||
| - Community translation contribution workflow | ||
| - Translation quality monitoring | ||
|
|
||
| ## Git Tag | ||
|
|
||
| ``` | ||
| v2.8.0-i18n-21-languages | ||
| ``` | ||
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
This line is a bit confusing. The validation script checks 220 files (20 locales against English), but there are 21 locales and 231 translation files in total. Also, 209 new files were generated, not 220. To improve clarity, I suggest rephrasing to reflect the total number of files and the validation scope accurately.