-
Notifications
You must be signed in to change notification settings - Fork 3.2k
refactor: i18n #10912
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
Draft
EurFelux
wants to merge
38
commits into
v2
Choose a base branch
from
refactor/i18n
base: v2
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.
Draft
refactor: i18n #10912
+1,135
−447
Conversation
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
5 tasks
Add i18next-scanner package to automate extraction and management of localization strings
- Rename i18n-related scripts to follow consistent naming pattern (i18n:check, i18n:sync, i18n:auto) - Change default base locale from zh-cn to en-us - Remove unused update-i18n.ts script - Update documentation and CI workflow to reflect script name changes
Update documentation and error messages in i18n-related scripts from Chinese to English to improve codebase accessibility for international teams.
…nguage - Change source language from Chinese to English in both docs - Update script names from check:i18n/sync:i18n/auto:i18n to i18n:check/i18n:sync/i18n:auto - Remove deprecated update:i18n script references - Clarify base locale behavior and environment variable usage
Add i18next-scanner configuration file to automate translation key extraction Include new 'i18n:scan' script in package.json to run the scanner Update tsconfig and oxlintrc to include the new config file
Update translation files to properly handle singular/plural cases for search results display
Add i18next-cli package to support translation file generation and management. This enables better i18n workflow integration.
Add configuration file for i18next-cli with supported locales and extraction settings Update package.json scripts to use i18next-cli commands for status and extraction
- Update biome.jsonc to use natural sort order for keys - Clean up i18next.config.ts formatting and remove trailing newline
…dding namespace in code
- Add new i18next config options including defaultValue, primaryLanguage, and types generation - Update vscode settings for better i18n-ally integration and namespace support - Reorder search exclude patterns for consistency
Use a function to generate more informative default values for missing translations, showing target language and original value
The count values were moved outside the translated strings to simplify localization and improve consistency across languages. The counts are now displayed separately after the translated labels in the UI.
- Fix incorrect translation key paths in MessageVideo component - Remove commented-out code for unused OCR options in PreprocessProviderSettings - Simplify success toast message in NotesSidebar by removing count parameter
- Add singular/plural forms for count-based translation strings - Update VS Code settings to enable JSON sorting - Remove unused i18n-ally sortKeys setting
…g comparison Use localeCompare with numeric sensitivity for more natural string sorting behavior
- Replace custom i18n sync script with i18next-cli sync command - Update json sorting setting to use biome formatter - Format i18n-ally config arrays for better readability
Remove language parameter from default value function since it's unused and simplify the placeholder text
Add 'zh-cn' and 'de-de' to language map and log system prompt for debugging
…eters Remove redundant <translate_input> tags and pass text directly to translate function Improve logging by showing both original and translated text
- Update README to clarify translation maintenance status - Add missing plural forms in en-us, zh-cn, and zh-tw locales - Complete machine translations for de-de, ja-jp, ru-ru, pt-pt, es-es, fr-fr, and el-gr - Convert array to object format for accessibility description in de-de and zh-cn
Move machine-translated files from translate/ to locales/ directory Update README location and clarify translation maintenance status
- Add 8 new locales (de-de, el-gr, es-es, fr-fr, ja-jp, pt-pt, ru-ru) - Remove unused translate directory references from auto-translate script
Remove i18next-scanner package and its configuration file along with unused dependencies that were only required by it.
- Add concurrent translation with configurable max requests - Implement automatic retry and rate limiting - Improve error handling and progress tracking - Add detailed configuration options and usage instructions
- Add postProcess callback to translateConcurrent and translateRecursively - Implement progress bar for individual file translation counts - Improve console output formatting with carriage returns - Move progress bar initialization inside file processing loop
81de4d7 to
b181902
Compare
Remove unused language resources and rename locales to resources for clarity Add i18next initialization with missing key logging
- Rename i18next import to i18n for consistency - Standardize locale keys to lowercase format - Remove commented out locale imports and unused translations - Replace getI18n with direct t function usage in services - Clean up VS Code settings and commented i18n config
…ontext Move translation files to new location and update resource structure to include translation namespace Update logger context to include module prefix for better debugging
Initialize i18n with user's preferred language from preferences or fallback to default Standardize locale file imports naming convention and improve i18n initialization flow
Add subscription to language preference changes to dynamically update i18n language. Also change warning to error log when no language preference is found
Add comment explaining why cleanup is not needed for language preference subscription
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.
What this PR does
Existing translation files will not be modified before the v2 merge
Fixes #
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Breaking changes
If this PR introduces breaking changes, please describe the changes and the impact on users.
Special notes for your reviewer
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.
Release note