feat(i18n): Add Chinese/English language toggle with vue-i18n#244
Open
pjhoberman wants to merge 2 commits into666ghj:mainfrom
Open
feat(i18n): Add Chinese/English language toggle with vue-i18n#244pjhoberman wants to merge 2 commits into666ghj:mainfrom
pjhoberman wants to merge 2 commits into666ghj:mainfrom
Conversation
Add internationalization support to the MiroFish frontend with Chinese (zh-CN) as the default language and English (en) as an alternative, switchable via a toggle button in the header. Changes: - Install vue-i18n and configure with Composition API mode - Create zh-CN and en locale files with ~262 translation keys - Add useLocaleToggle composable for shared language toggle logic - Replace hardcoded Chinese strings with $t() calls across all 14 Vue components and 7 views - Add language toggle button to all page headers - Persist language preference in localStorage - Configure Vite @ path alias for clean imports Chinese regex patterns that parse backend LLM responses are intentionally preserved unchanged (Step4Report.vue, Step2EnvSetup.vue). Also fixes API base URL to use window.location.hostname instead of hardcoded localhost, enabling remote access. Closes 666ghj#117 Closes 666ghj#182 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4 tasks
The Home page navbar is transparent (not dark as assumed), so the white-on-transparent button was invisible. Use explicit light gray background with dark text for guaranteed visibility on any background. Also increase button size across all views for better discoverability. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9 tasks
7 tasks
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
vue-i18nwith Chinese (zh-CN) as default and English (en) as alternativewindow.location.hostnameinstead of hardcodedlocalhostImplementation
vue-i18nwith Composition API mode (legacy: false)frontend/src/i18n/locales/zh-CN.jsanden.jswith nested keys by area (home.*,step1.*,header.*,common.*, etc.)useLocaleTogglecomposable for shared toggle logic across views@alias configured for clean importsWhat's NOT translated (intentionally)
Step4Report.vueparsing backend LLM report outputStep2EnvSetup.vuematching backend status valuesconsole.log/console.errormessages (developer-facing)Files changed (23)
i18n/index.js,i18n/locales/zh-CN.js,i18n/locales/en.js,i18n/useLocaleToggle.jspackage.json,vite.config.js,main.jsapi/index.js(baseURL fix)Test plan
npm run devstarts without errorsCloses #117
Closes #182
🤖 Generated with Claude Code