Skip to content

feat(i18n): Add French locale and set English as default#475

Open
Denis-hamon wants to merge 2 commits into666ghj:mainfrom
Denis-hamon:feat/i18n-french-default-en
Open

feat(i18n): Add French locale and set English as default#475
Denis-hamon wants to merge 2 commits into666ghj:mainfrom
Denis-hamon:feat/i18n-french-default-en

Conversation

@Denis-hamon
Copy link
Copy Markdown

Summary

This PR fully internationalizes MiroFish by:

  1. Adding complete French translations (locales/fr.json)
  2. Setting English as the default language (was Chinese)
  3. Replacing all hardcoded Chinese UI strings with i18n keys

Changes

New Files

  • locales/fr.json — Complete French translation (665 lines, 49 new keys)

Updated Files

  • locales/en.json — Added 6 missing keys for process, step3, step4, step5 sections
  • frontend/src/i18n/index.js — Changed default & fallback locale from zh to en
  • frontend/index.html — Updated lang attribute, <title> and <meta description> to English
  • frontend/src/views/Process.vue — Fully internationalized (was entirely hardcoded Chinese with zero $t() calls)
  • frontend/src/components/Step3Simulation.vue — Fixed hardcoded fallback error string
  • frontend/src/components/Step4Report.vue — Fixed 2 hardcoded Chinese strings
  • frontend/src/components/Step5Interaction.vue — Fixed chat context role labels and prompt template

Test Plan

  • locales/fr.json validated as valid JSON
  • locales/en.json validated as valid JSON
  • ✅ Default UI renders in English
  • ✅ Language switcher works for French and all other supported locales
  • ✅ No hardcoded Chinese strings remain in user-visible UI positions

Notes

Backend LLM prompts remain in Chinese by design — this is controlled by the llmInstruction field in locales/languages.json which already contains proper per-language instructions (e.g. "Veuillez répondre en français." for French). This PR focuses exclusively on frontend UI internationalization.


🤖 Generated with Claude Code

Debian and others added 2 commits April 5, 2026 16:20
- Create locales/fr.json with complete French translations (49 new keys)
- Update locales/en.json with missing keys for process, step3, step4, step5
- Change default locale from Chinese to English in i18n/index.js
- Change fallback locale to English for better UX
- Update HTML lang attribute and static title/description to English

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Process.vue: fully internationalize with 40+ i18n keys (was entirely in Chinese)
  - Add useI18n import and t() function
  - Update computed properties (statusText, getPhaseStatusText)
  - Replace all template hardcoded strings with $t() calls
  - Fix formatDate to use current locale instead of hardcoded zh-CN

- Step3Simulation.vue: replace fallback error string (line 427)
  - '启动失败' → t('step3.startFailedShort')

- Step4Report.vue: replace 2 hardcoded Chinese strings
  - Line 1472: '选择理由' → t('step4.selectionReason')
  - Line 1784: '等待开始' → t('step4.waitingToStart')

- Step5Interaction.vue: replace chat context strings (lines 725-727)
  - Role labels: '提问者'/'你' → t('step5.roleQuestioner')/t('step5.roleYou')
  - Chat prompt: hardcoded Chinese prompt → t('step5.chatHistoryPrompt')

All changes ensure UI renders in selected language (English, French, etc.)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant