-
Notifications
You must be signed in to change notification settings - Fork 0
feat(i18n): complete i18n migration - remove hardcoded Chinese strings #263
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
Merged
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
… i18n system - Add i18n translations for crypto errors (decrypt, key derivation, biometric) - Add i18n translations for chain errors (unsupported type, miniapp launch) - Add i18n translations for transaction errors (gas, retry, validation) - Migrate mpay-crypto, mpay-transformer, miniapp-runtime, pending-tx - Migrate derivation.ts, encryption.ts, secure-storage.ts - Migrate use-send.ts, use-send.web3.ts, use-multi-chain-address-generation.ts - Migrate use-security-password.ts
- Add i18n-ignore markers for standalone clear page (cannot use React i18n) - Add i18n-ignore markers for native language names (zh-CN, zh-TW, ja) - Add i18n-ignore markers for config data in ecosystem store - Migrate miniapp sources label in settings - Migrate destroy page error messages
…e strings - Add markers for swipeable-tabs, password-input, ecosystem-tab-indicator - Add markers for transaction-list, token-list default props - Add common translations for password strength, ecosystem tabs, etc.
- MiniappTransferConfirmJob: remove defaultValue - MiniappDestroyConfirmJob: remove defaultValue - CryptoAuthorizeJob: remove defaultValue - WalletPickerJob: remove defaultValue - SettingsSourcesActivity: add sources.* translation keys - Add common keys: transferWarning, confirming, drawPatternToConfirm, selectWallet, noWallets, sources.*, refresh, enable, disable, etc. - Regenerate i18n types
- send/index.tsx: remove assetLabel defaultValue - destroy/index.tsx: remove all defaultValue (6 occurrences) - asset-selector.tsx: remove defaultValue, add assetSelector.* keys - token-item.tsx: remove a11y.more defaultValue - SettingsSourcesActivity.tsx: fix remaining aria-labels - Regenerate i18n types Remaining: 56 Chinese literals (down from 109)
- authorize/signature.tsx: convert to English + i18n-ignore - chain-selector.tsx: use translation function for chain kinds - MigrationCompleteStep.tsx: remove all defaultValue - MigrationProgressStep.tsx: remove STEP_DEFAULTS + defaultValue - migration-required-view.tsx: remove all defaultValue - WelcomeScreen.tsx: remove defaultValue - crypto-authorize.tsx: remove all defaultValue - Add crypto.authorize.* translation keys - Add chainKind.* translation keys - Add error:signature.* translation keys - Regenerate i18n types Final: 2 Chinese literals remaining (i18n-ignore for error detection)
4259db0 to
c8b8378
Compare
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
Complete i18n migration for KeyApp - migrating hardcoded Chinese strings to the i18n system for multi-language support.
Changes
// i18n-ignoremarkersFiles Modified (20+)
Components
SigningConfirmJob.tsx,ChainSwitchConfirmJob.tsx- Remove defaultValueMiniappTransferConfirmJob.tsx,MiniappDestroyConfirmJob.tsx- Remove all defaultValueCryptoAuthorizeJob.tsx,WalletPickerJob.tsx- Remove all defaultValueMigrationCompleteStep.tsx,MigrationProgressStep.tsx- Remove STEP_DEFAULTS + defaultValuemigration-required-view.tsx,WelcomeScreen.tsx- Remove defaultValuechain-selector.tsx- Use translation function for chain kindscrypto-authorize.tsx- Remove all defaultValueSettingsSourcesActivity.tsx- Add translation keys and migratePages
send/index.tsx,destroy/index.tsx- Remove defaultValueauthorize/signature.tsx- Convert to English + i18n-ignoreasset-selector.tsx,token-item.tsx- Remove defaultValueTranslation Keys Added
common:crypto.authorize.*(title, permissions, duration, address, pattern, error)common:chainKind.*(bioforest, evm, bitcoin, tron, custom)common:sources.*(title, noSources, urlPlaceholder, etc.)error:signature.*(missingField, unsupportedType, etc.)Remaining Chinese Literals (2)
These are error detection patterns, not UI text:
Verification
pnpm typecheckpasses (14/14 packages)bun scripts/i18n-check.tsshows only 2 remaining (with i18n-ignore)