feat(i18n): complete migration to centralized translations (en+zh+es)#1
Merged
feat(i18n): complete migration to centralized translations (en+zh+es)#1
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
- Consolidate 275+ translation keys into strategy-translations.ts
- Migrate 8 strategy components to use centralized i18n pattern
- Components: CoinSourceEditor, GridRiskPanel, RiskControlEditor,
GridConfigEditor, PromptSectionsEditor, IndicatorEditor,
PublishSettingsEditor, ChartTabs
- Add Spanish (es) translations for all strategy components
- Remove inline { zh, en } translation objects from components
- Use standard t(key, language) pattern throughout
Related: NoFxAiOS#1343 (maker95 - es language), NoFxAiOS#1374 (xsa-dev - zh TraderConfigModal)
Co-authored-by: xsa-dev <xsa-dev@users.noreply.github.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
Complete i18n infrastructure refactor for NOFX strategy components.
This PR consolidates scattered i18n strings and adds Spanish translations for 8 components.
What This PR Does
Creates
web/src/i18n/strategy-translations.tsMigrates 8 Strategy Components to centralized pattern:
CoinSourceEditor.tsx- Data source configurationGridRiskPanel.tsx- Risk display panelRiskControlEditor.tsx- Risk settingsGridConfigEditor.tsx- Grid parametersPromptSectionsEditor.tsx- AI prompt customizationIndicatorEditor.tsx- Technical indicatorsPublishSettingsEditor.tsx- Publishing optionsChartTabs.tsx- Chart navigationMigration Pattern
BEFORE (anti-pattern):
AFTER (standard pattern):
Files Changed
web/src/i18n/strategy-translations.ts(new)Stats
Related PRs
Testing
After merge, verify: