feat: infinite i18n — auto-detect browser language, LLM-powered translations for any language#308
Open
K1skakas wants to merge 18 commits into666ghj:mainfrom
Open
feat: infinite i18n — auto-detect browser language, LLM-powered translations for any language#308K1skakas wants to merge 18 commits into666ghj:mainfrom
K1skakas wants to merge 18 commits into666ghj:mainfrom
Conversation
Translated all Vue frontend components and views from Chinese to English. This is the first complete EN localization of the MiroFish UI. - All 15 Vue files translated (views + components) - docker-compose.yml updated to build locally from source
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add view, steps, and status sections to en.json; wire useI18n into all 5 view files (MainView, SimulationView, SimulationRunView, ReportView, InteractionView) so view-switcher labels, step names, and status texts are all driven by locale keys instead of hardcoded English strings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…) keys - Step1GraphBuild: ontology/graph/build sections, badge labels, stats, log panel header - Step2EnvSetup: all phase badges, persona/config sections, addLog calls translated to English - Step3Simulation: report button, event counter, waiting state, monitor label, addLog calls - Step4Report: prediction report tag, waiting/complete labels, console output, deep interaction btn - Step5Interaction: interactive tools, survey section, chat placeholders, all Chinese UI strings - HistoryDatabase: simulation history header, formatRounds(), getSimulationTitle() - GraphPanel: panel title, refresh, loading/waiting states, legend, edge labels toggle, detail panel - en.json: added 50+ new keys under graph, simulation, report, interaction, history, env, graph_panel sections Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nd Step5Interaction Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… typographic quotes - Replace chat_json() with chat() to avoid response_format JSON mode issues on free-tier models (gemini-2.0-flash-exp, xiaomi/mimo-v2-pro) - Add prompt rules to prevent unescaped double-quotes in translated values (model was outputting literal " for \"local optimum\" breaking JSON parse) - Add backend/app volume mount in docker-compose.yml for live Python reload Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Only en.json (base locale) is tracked. All other language files are auto-generated by locale_generator.py and should not be committed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.
Body:
What this does
Replaces the hardcoded Chinese UI with a fully dynamic internationalization system.
How it works
Accept-LanguageheaderGET /api/locale/{lang}generates translations for any language on-demand using an LLMbackend/app/i18n/{lang}.json— no repeated API callsbackend/app/i18n/en.json— single source of truthvue-i18n@9handles frontend renderingvs PR #296
PR #296 adds Chinese + English as hardcoded options. This implementation supports unlimited languages
automatically — no manual translation files needed for each new language.
Tested
hu) — full UI translation generated and verified