feat(i18n): complete English translation + full-stack bilingual support (en/zh-CN)#296
Open
hackingbutlegal wants to merge 11 commits into666ghj:mainfrom
Open
feat(i18n): complete English translation + full-stack bilingual support (en/zh-CN)#296hackingbutlegal wants to merge 11 commits into666ghj:mainfrom
hackingbutlegal wants to merge 11 commits into666ghj:mainfrom
Conversation
Replace all Chinese text with English across 57 files (21 frontend, 36 backend). This makes the application usable by English speakers and the codebase accessible to English-speaking developers. Scope of changes: - UI text: all Vue template labels, buttons, headings, status messages, placeholders, and tooltips - Code comments and docstrings: all Python and JavaScript documentation - LLM prompts: system prompts, user prompts, few-shot examples, and output formatting templates in all generator and agent services - Log/error messages: all logger calls and API error responses - Config files: pyproject.toml description and dependency section comments, requirements.txt section headers No structural, logic, or dependency changes. All identifier names, import paths, and code behavior are preserved. Verified: grep for CJK characters returns zero matches across the entire codebase. All Python files pass py_compile. Frontend builds successfully with vite.
Full-stack i18n: vue-i18n frontend, backend message catalog, locale-specific LLM prompt templates. 7 tasks, ~28 prompt files, ~95 API messages, ~600 frontend strings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…t loader Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…e header Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…messages Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extracted original Chinese prompts from commit 1536a79 (pre-translation) and wrote them to backend/app/prompts/zh-CN/ with 35 files matching the en/ directory 1:1. All {placeholder} variable names are identical to the English versions so .format() calls work unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
|
Come on merge this thang |
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
Complete English localization plus full-stack bilingual infrastructure — frontend UI, backend API messages, and LLM prompt templates — all in a single, atomic PR.
Why this PR over existing translation PRs
There are several open English translation PRs (#119, #155, #176, #189, #198, #244, #245, #290). This one is the most complete:
Key architectural advantage: LLM prompts are externalized into
backend/app/prompts/{en,zh-CN}/*.txttemplate files rather than embedded in Python code with if/else branches. Adding a new language (e.g., Japanese, Korean) means adding a directory of.txtfiles — zero code changes.What's included
Layer 1: Frontend (vue-i18n@9)
frontend/src/i18n/{en,zh-CN}.jsonAccept-Languageheader sent on all API requests via Axios interceptorfallbackLocale: 'en'for graceful degradationLayer 2: Backend API Messages
backend/app/i18n/{en,zh-CN}.jsonmsg(key, **kwargs)helper with placeholder substitutionbefore_requestmiddleware setsg.localefromAccept-LanguageLayer 3: LLM Prompt Templates
backend/app/prompts/{en,zh-CN}/load_prompt(name, locale)helper with English fallbackTranslation (prerequisite)
How it works
Test plan
grepfor CJK characters across source files returns zero matchespython -m py_compilevite build