feat: translate admin panel frontend to English - #1
Merged
Conversation
Translate all Chinese strings in the three frontend files to English, using translations from PR su-kaka#303 (HsnSaboor/gcli2api) resolved to plain English text with no runtime i18n infrastructure. - front/control_panel.html: desktop admin panel - front/control_panel_mobile.html: mobile admin panel - front/common.js: shared frontend JavaScript No backend changes. No i18n runtime dependency. Pure static translation.
Replace Chinese model name prefixes in the API protocol layer:
- 假流式/ -> fake-stream/
- 流式抗截断/ -> anti-truncate/
These prefixes appear in /v1/models responses consumed by API clients
(model selectors in consuming apps). Translating them makes model names
readable for non-Chinese users.
Changes span 9 Python files:
- src/utils.py: prefix matching functions + model list generation
- src/router/antigravity/model_list.py: antigravity model list
- src/router/antigravity/{openai,gemini,anthropic}.py: routers + test code
- src/router/geminicli/{openai,gemini,anthropic}.py: routers + test code
- src/converter/fake_stream.py: docstrings
All functional code (is_fake_streaming_model, is_anti_truncation_model,
get_base_model_from_feature_model, model list appenders) updated together
so prefix matching remains consistent.
Hermes native_gemini adapter appends /models/{model}:streamGenerateContent
to the base_url. When base_url is set to the proxy root (e.g.
https://gemini.omnipassion.cloud/antigravity without /v1), the resulting
path /antigravity/models/{model}:streamGenerateContent had no matching
route and returned 404.
Add route aliases without the /v1 prefix:
- /antigravity/models/{model}:generateContent
- /antigravity/models/{model}:streamGenerateContent
- /antigravity/models/{model}:countTokens
- /antigravity/models (model list, Gemini format)
This allows Hermes to use native_gemini: true with a base_url that
doesn't include /v1, matching Google's canonical base URL pattern
(https://generativelanguage.googleapis.com/v1beta) where the version
segment is part of the base, not the route.
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.
Translates all Chinese strings in the three frontend files to English. Derived from PR su-kaka#303 but without the i18n runtime infrastructure.