Skip to content

feat(i18n): add full English translation with language switcher#297

Closed
Amir-Bazylkhanov wants to merge 1 commit into666ghj:mainfrom
Amir-Bazylkhanov:feat/english-i18n
Closed

feat(i18n): add full English translation with language switcher#297
Amir-Bazylkhanov wants to merge 1 commit into666ghj:mainfrom
Amir-Bazylkhanov:feat/english-i18n

Conversation

@Amir-Bazylkhanov
Copy link
Copy Markdown

Summary

  • Adds complete English internationalization (i18n) support to both frontend and backend
  • Users can toggle between English and Chinese via a language switcher in the header
  • English is the default locale; preference is persisted in localStorage

Changes

Frontend

  • Installed vue-i18n@9 and created i18n infrastructure (src/i18n/index.js, en.json, zh.json)
  • Replaced all hardcoded Chinese strings across 14 Vue components/views with $t() / t() calls (~300+ translation keys)
  • Added a language toggle button (EN/中文) to all view headers
  • Used reactive computed() for stepNames to ensure locale changes update headers immediately
  • Updated index.html lang attribute and meta tags

Backend

  • Translated all user-facing API response strings (error messages, progress messages, task status) across 9 Python files
  • Translated LLM report generation prompt templates so reports are generated in English
  • Translated tool result formatting (to_text() methods) in zep_tools.py
  • Translated interview prompt prefixes in simulation.py and zep_tools.py

Bug fixes included

  • Fixed stage name comparison in Step2EnvSetup.vue to use raw API keys instead of translated names
  • Fixed non-reactive $t('common.stepNames')[N] in 4 view files by wrapping in computed()

Test plan

  • Verify frontend builds without errors (npm run build)
  • Verify English UI renders correctly on all 5 steps
  • Verify language toggle switches all UI text between EN and ZH
  • Verify backend API responses return English messages
  • Verify report generation produces English content
  • Verify Chinese locale still works correctly when selected

🤖 Generated with Claude Code

- Install vue-i18n and create i18n infrastructure with locale persistence
- Add complete en.json and zh.json locale files (~300+ translation keys)
- Replace all hardcoded Chinese strings in 14 Vue components/views with $t() calls
- Add language toggle button (EN/中文) to all view headers
- Translate all user-facing backend API responses, error messages, and progress strings
- Translate LLM report generation prompt templates to produce English reports
- Translate tool result formatting (to_text methods) in zep_tools.py
- Fix stage comparison to use raw keys instead of translated names
- Use reactive computed() for stepNames to ensure locale toggle updates headers
- Set English as default locale with Chinese as fallback

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement New feature or request labels Mar 22, 2026
@666ghj
Copy link
Copy Markdown
Owner

666ghj commented Apr 2, 2026

The project already has i18n support in place — please refer to [PR #428] for reference.

@666ghj 666ghj closed this Apr 2, 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:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants