Skip to content

Add full English language support (i18n) across frontend and backend#347

Closed
AbdulrahmanMasoud wants to merge 1 commit into666ghj:mainfrom
AbdulrahmanMasoud:english-translations
Closed

Add full English language support (i18n) across frontend and backend#347
AbdulrahmanMasoud wants to merge 1 commit into666ghj:mainfrom
AbdulrahmanMasoud:english-translations

Conversation

@AbdulrahmanMasoud
Copy link
Copy Markdown

Summary

  • Added complete English language support to MiroFish with vue-i18n on the frontend and bilingual API messages + LLM prompts on the backend
  • English is now the default language with a toggle to switch to Chinese
  • All LLM-generated output (reports, agent profiles, ontologies) adapts to the selected language

Changes

Frontend (13 Vue files + 4 new files):

  • Installed vue-i18n with en.json and zh.json locale files (~180 translation keys)
  • Created LanguageSwitcher component (EN/ZH toggle in navbar)
  • Replaced all hardcoded Chinese strings with $t() calls across all views and components
  • Added Accept-Language header to all API requests via axios interceptor

Backend API (5 files):

  • Created utils/messages.py with bilingual message dictionary and msg() helper
  • Added language field to Project model
  • Replaced Chinese response strings in graph.py, report.py, simulation.py with msg() calls

Backend LLM Prompts (5 service files):

  • Added English prompt versions for ontology_generator, oasis_profile_generator, report_agent, simulation_config_generator, zep_tools
  • Added language parameter to all service constructors — prompts selected based on user's language preference
  • Reports, agent profiles, and simulation output are generated in the user's chosen language

Test plan

  • Start dev server (npm run dev), verify UI shows in English by default
  • Toggle to Chinese and back — all labels, buttons, status badges, log messages switch
  • Create a project in English mode — verify ontology, agent profiles, and reports generate in English
  • Create a project in Chinese mode — verify everything still works as before
  • Verify language preference persists across page refresh (localStorage)

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement New feature or request labels Mar 26, 2026
mohamedsorour1998 added a commit to mohamedsorour1998/MiroFish that referenced this pull request Mar 27, 2026
# Conflicts:
#	backend/app/api/graph.py
#	backend/app/api/report.py
#	backend/app/api/simulation.py
#	backend/app/services/oasis_profile_generator.py
#	backend/app/services/report_agent.py
#	backend/app/services/simulation_config_generator.py
#	backend/app/services/zep_tools.py
#	frontend/package-lock.json
#	frontend/package.json
#	frontend/src/api/index.js
#	frontend/src/components/GraphPanel.vue
#	frontend/src/components/HistoryDatabase.vue
#	frontend/src/components/Step1GraphBuild.vue
#	frontend/src/components/Step2EnvSetup.vue
#	frontend/src/components/Step3Simulation.vue
#	frontend/src/components/Step4Report.vue
#	frontend/src/components/Step5Interaction.vue
#	frontend/src/i18n/index.js
#	frontend/src/views/Home.vue
#	frontend/src/views/InteractionView.vue
#	frontend/src/views/MainView.vue
#	frontend/src/views/ReportView.vue
#	frontend/src/views/SimulationRunView.vue
#	frontend/src/views/SimulationView.vue
@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