feat(i18n): add consolidated translation keys for strategy components#1375
Merged
tinkle-community merged 2 commits intoNoFxAiOS:mainfrom Feb 9, 2026
Merged
Conversation
- Add new translation keys for all hardcoded Chinese strings
- Replace hardcoded UI text with t('key', language) calls
- Support both English and Chinese languages
Modified files:
- web/src/i18n/translations.ts: +88 lines (42 new keys)
- web/src/components/TraderConfigModal.tsx: replaced 48 hardcoded strings
- 275+ translation keys from 8 strategy components - 3 languages: English, Chinese, Spanish - Ready for integration into translations.ts - Pre-aggregated exports for zhStrategy, enStrategy, esStrategy Related to PR NoFxAiOS#1343 (maker95) and NoFxAiOS#1374 (xsa-dev)
Contributor
Author
|
@tangmengqiu @hzb1115 This PR adds 275+ consolidated translation keys for 8 strategy components (en+zh+es). It's a prerequisite for the component migration work that will consolidate scattered i18n strings. What's in this PR:
Next steps after merge:
Related PRs: #1343 (es language), #1374 (zh TraderConfigModal) Please review when you have time. This unblocks the i18n consolidation work. Thanks! |
Contributor
Author
|
Hi @tangmengqiu and @hzb1115! This PR is blocking the i18n refactor for 8 strategy components. Once merged, we can proceed with migrating:
The consolidation file is ready and tested. Could you please review and merge when convenient? Thank you! |
Hansen1018
pushed a commit
to Hansen1018/nofx
that referenced
this pull request
Mar 11, 2026
…NoFxAiOS#1375) * feat(i18n): add 42 translation keys for TraderConfigModal - Add new translation keys for all hardcoded Chinese strings - Replace hardcoded UI text with t('key', language) calls - Support both English and Chinese languages Modified files: - web/src/i18n/translations.ts: +88 lines (42 new keys) - web/src/components/TraderConfigModal.tsx: replaced 48 hardcoded strings * feat(i18n): add consolidated translation keys (en + zh + es) - 275+ translation keys from 8 strategy components - 3 languages: English, Chinese, Spanish - Ready for integration into translations.ts - Pre-aggregated exports for zhStrategy, enStrategy, esStrategy Related to PR NoFxAiOS#1343 (maker95) and NoFxAiOS#1374 (xsa-dev)
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 275+ consolidated translation keys for 8 strategy components, supporting 3 languages (en, zh, es).
What This PR Does
Creates
web/src/i18n/strategy-translations.tswith:zhStrategy,enStrategy,esStrategyPurpose: Centralize scattered i18n strings currently inline in 8 component files
Why This Matters
Current Problem: 8 components use scattered
{ zh: '...', en: '...' }pattern:Solution: Centralized translations:
Components to Migrate (Future Work)
{ zh, en }objects{ zh, en }objects{ zh, en }objects{ zh, en }objects{ zh, en }objects{ zh, en }objects{ zh, en }objects{ zh, en }objectsRelated PRs
This PR complements #1343 by adding es translations for strategy components.
Next Steps
After this PR merges:
t('key', language)pattern{ zh, en }objects from component filesStats