Skip to content

feat: translate admin panel frontend to English - #1

Merged
Erudition merged 3 commits into
masterfrom
feat/english-admin-panel
Aug 19, 2026
Merged

feat: translate admin panel frontend to English#1
Erudition merged 3 commits into
masterfrom
feat/english-admin-panel

Conversation

@Erudition

Copy link
Copy Markdown
Owner

Translates all Chinese strings in the three frontend files to English. Derived from PR su-kaka#303 but without the i18n runtime infrastructure.

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.
@Erudition
Erudition merged commit f86e37f into master Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant