feat(ui): 界面提示白话化 + 清理未引用的死键(版本 2.7.0 → 2.7.1)

老板要求「检查所有界面提示,客户不需要知道的不用提示」,
二次确认口径:普通成员看不到内部实现;术语要换成大白话
(「管理员也不懂熔断器是啥」)。

- 熔断术语白话化:熔断器/熔断状态 → 「供应商自动保护」;
  CLOSED/HALF_OPEN/OPEN → 「正常 / 恢复中 / 已暂停」;
  探测中 → 「检测中」;熔断冷却 → 「暂停时长」;窗口/阈值 → 「统计次数/触发次数」
  (指标页、仪表盘、API 文档端点说明)
- 智能体页去内部实现暴露:
  · 删掉 cfgWorkspace 整行(原显示内部 agent_id)
  · cfgEngine 值由「qwenpaw · https://...」改为文案「由平台提供」
  · 引擎就绪/不可达 → 「可用/暂不可用」;引擎连接中断 → 「连接中断」
  · slug → 「标识」;“显示名与 slug 可改” → “显示名与标识可改”
  · 去掉"在服务器上"等部署细节措辞
- 其它白话化:in-flight → “当前并发”;「开始与网关对话」→「开始对话」;
  “参数由网关固定/上游硬约束” → “参数已固定”;
  “上游一次只出 1 张/上游没有返回图片” → 去"上游"措辞;
  “下载走网关代拉” → “下载更省心”;“协议线” → “格式”
- 保留(老板确认):API 文档页的技术契约(Bearer/400/路径格式名)、
  配置页的文件名与变量名(gateway.yaml/.env/token_env)
- 删除 120 个未被引用的死键(gc 段早期表格化编辑设计残留:
  f_*/h_*/circuit/tab*/pKey 等,页面只用 YAML 编辑器与 env 两块)
  及 subHint(暴露引擎名+内部 URL 的孤儿键)

i18n 869 → 749 键(中英对称)。ci_check.sh 六道门禁全绿。
This commit is contained in:
api-gateway committed 2026-09-30 15:26:12 +08:00
1 parent 69f7175424
commit 33d79194b8
4 files changed
+92 -341

No files matched your search

+40 -160
View File
@@ -21,10 +21,10 @@ export default {
more: 'More',
subdashboard: 'Gateway overview · refreshed every 8s',
subchat: 'Vision-ready · multi-provider direct routing',
subimages: 'Params on the left, history on the right · downloads proxied by the gateway',
subimages: 'Params on the left, history on the right · easy downloads',
subvideos: '720P · 4–12s · async polling',
subagents: 'Assistants that get work done',
submodels: 'Providers / models / protocol lines',
submodels: 'Providers / models / formats',
submetrics: 'Usage & cost · isolated per account',
subkeys: 'Up to 3 per account · stored in plaintext, copyable anytime',
subusers: 'Accounts & roles · admin can inspect others’ logs and assets',
@@ -93,8 +93,8 @@ export default {
provShare: 'Provider success share',
latency: 'Model latency P50 / P95 (s)',
providerStatus: 'Provider status',
mediaCircuit: 'Media circuit',
circuit: 'Circuit',
mediaCircuit: 'Media service',
circuit: 'Auto-protection',
modelCountShort: 'Models',
keySet: 'Key set',
name: 'Name',
@@ -105,10 +105,10 @@ export default {
gwVersion: 'Gateway version',
concurrency: 'In-flight {cur} / peak {peak}',
latTitle: 'Model latency P50 / P95 (s)',
circ_closed: 'CLOSED',
circ_half_open: 'HALF_OPEN',
circ_open: 'OPEN',
circ_not_tracked: 'Not tracked',
circ_closed: 'Normal',
circ_half_open: 'Recovering',
circ_open: 'Paused',
circ_not_tracked: 'Not monitored',
noData: 'No data',
requests: 'Total requests',
successRate: 'Success rate',
@@ -125,7 +125,7 @@ export default {
noModels: 'No calls recorded yet',
share: 'Share',
live: 'Live',
byProtocol: 'Protocol lines',
byProtocol: 'Format coverage',
byProtocolSub: 'Models per line',
modelCountN: '{n} models',
},
@@ -142,17 +142,17 @@ export default {
fail: 'Fail',
ok: 'ok',
none: 'None',
circuitStatus: 'Circuit breaker status',
circuitStatus: 'Provider auto-protection',
provider: 'Provider',
state: 'State',
recentFailures: 'Recent failures',
window: 'Window',
threshold: 'Threshold',
cooldown: 'Cooldown(s)',
probing: 'Probing',
stateClosed: 'CLOSED',
stateHalf: 'HALF_OPEN',
stateOpen: 'OPEN',
cooldown: 'Pause(s)',
probing: 'Checking',
stateClosed: 'Normal',
stateHalf: 'Recovering',
stateOpen: 'Paused',
loadErr: 'Failed to load metrics',
requests: 'Total requests',
failCount: 'Failures',
@@ -165,7 +165,7 @@ export default {
inflightPeak: 'In flight / peak',
failRateNote: 'failure rate {v}%',
snapshot: 'Live snapshot',
circuitCard: 'Circuit breakers',
circuitCard: 'Auto-paused after repeated failures, auto-recovers shortly',
byProvider: 'Calls by provider (success / fail)',
},
logs: {
@@ -238,7 +238,7 @@ export default {
params: 'Parameters',
clear: 'Clear',
generating: 'Generating…',
empty: 'Start a conversation with the gateway (pick a model below)',
empty: 'Start a conversation (pick a model below)',
servedBy: 'by {provider}',
requestedTo: 'requested {req} → served {served}',
reasoning: 'Reasoning',
@@ -253,7 +253,7 @@ export default {
imgMax: 'At most {n} images per message',
imgPickErr: 'Image processing failed: {msg}',
visionWarn: 'Model {model} does not accept image input — images will be ignored or rejected. Switch to a vision-capable model.',
paramLocked: 'Parameters pinned by the gateway: {p} (upstream hard limit; what you set here is overridden before sending)',
paramLocked: 'Parameters pinned: {p} (what you set here is overridden before sending)',
useVision: 'Switch to {model}',
waiting: 'Awaiting input…',
send: 'Send',
@@ -282,11 +282,11 @@ export default {
refPickErr: 'Image processing failed: {msg}',
refsPH: 'Image-to-image / multi-image: image URLs or data:, one per line (empty = text-to-image)',
count: 'Count',
countTip: 'The upstream API returns 1 image per call; multiple images are generated one by one',
countTip: 'Only 1 image per call; multiple images are generated one by one',
genProgress: 'Generating {i}/{n}',
partialFail: 'Generated {done}, image #{i} failed: {msg}',
refsUsed: '{n} reference image(s)',
emptyResp: 'The upstream returned no image',
emptyResp: 'No image returned',
placeholder: 'Describe the image to generate (style / subject / composition)',
servedBy: 'Generated by {provider}',
clear: 'Clear history',
@@ -317,7 +317,7 @@ export default {
uploadAudio: 'Upload audio',
useUrl: 'Use URL',
urlPH: 'or paste an image URL',
uploadTip: 'Uploaded material is compressed to a data URI in the browser and sent directly (no public URL needed)',
uploadTip: 'Uploaded material is compressed in the browser and sent directly (no public URL needed)',
pickErr: 'Failed to process material: {msg}',
refMax: 'At most {n} reference images',
audMax: 'At most {n} reference audios',
@@ -371,7 +371,6 @@ export default {
agents: {
title: 'Agents',
sub: 'Assistants that get work done — each has its own params and sessions',
subHint: '{n} agents · engine {engine} ({url}) · {scope}',
scopeAdmin: 'Admins only',
scopeOpen: 'Available to {n}',
new: 'New',
@@ -389,25 +388,25 @@ export default {
statusRetired: 'Archived',
newChat: 'New chat',
thisChat: 'This chat',
engineReady: 'Engine ready',
engineDown: 'Engine unreachable',
engineDownHint: 'Engine not ready, please try again later',
engineReady: 'Available',
engineDown: 'Unavailable',
engineDownHint: 'Not reachable right now, please try again later',
retry: 'Retry',
stop: 'Stop',
stopRun: 'Background',
running: 'Generating',
inputPlaceholder: 'Say something… this agent can read/write files and run commands on the server',
inputPlaceholder: 'Say something… this agent can read/write files and run commands',
execSteps: 'Ran {n} steps',
execRunning: 'Running',
tokens: 'Tokens',
elapsed: 'Elapsed',
toolsUsed: 'Tools',
interrupted: '⚠ Engine connection lost, this turn is incomplete',
interrupted: '⚠ Connection lost, this turn is incomplete',
cfgBasic: 'Basics',
cfgBasicSub: 'Name and slug are editable',
cfgBasicSub: 'Name and ID are editable',
cfgName: 'Name',
cfgSlug: 'slug',
cfgSlugHint: 'Must not clash with an existing model id or alias',
cfgSlug: 'ID',
cfgSlugHint: 'Must not clash with an existing model name',
cfgDesc: 'Description',
cfgModel: 'Model',
cfgModelPick: 'Pick a model',
@@ -415,8 +414,9 @@ export default {
cfgModelSwitched: 'Switched to {model}',
cfgModelAtChat: 'Switch it at the bottom-left of the chat box (shared by all agents, takes effect immediately)',
cfgExec: 'Execution',
cfgExecSub: 'Affects server safety, read-only for now',
cfgEngine: 'Engine',
cfgExecSub: 'Touches runtime safety, read-only for now',
cfgEngine: 'Runtime',
cfgEngineVal: 'Provided by the platform',
cfgWorkspace: 'Workspace',
cfgParams: 'Parameters',
cfgTemp: 'temperature',
@@ -440,7 +440,7 @@ export default {
limitReached: 'Limit reached ({n})',
limitHint: 'Limit reached ({n}); archive unused agents first',
sharedNote: 'Each agent has its own params and sessions; the model is shared',
riskNote: 'This agent can read/write files and run commands on the server',
riskNote: 'This agent can read/write files and run commands',
runsTotal: 'Calls',
runsTools: 'Tool calls',
runsTokens: 'tokens',
@@ -469,7 +469,7 @@ export default {
aiLabel: 'Assistant',
runsEmpty: 'No runs yet',
formName: 'Name',
formSlug: 'slug',
formSlug: 'ID',
formDesc: 'Description',
formTemp: 'temperature (optional)',
formSuffix: 'Role suffix (optional)',
@@ -502,7 +502,7 @@ export default {
freeLimitedTag: 'Limited-time free',
freeLimitedHint: 'Officially "limited-time free": the offer has an expiry — the daily sync updates this label when the vendor changes it',
paramTag: 'Params locked',
paramLocked: 'Parameters pinned by the gateway: {p} (upstream hard limit; values from clients and the speed test are overridden)',
paramLocked: 'Parameters pinned: {p} (values from clients and the speed test are overridden)',
allTextModels: 'All text models',
providerCard: 'Providers',
keyOk: 'Key configured',
@@ -517,21 +517,21 @@ export default {
failed: 'Failed',
speedtestDone: 'Speed test done, {n} models',
speedtestFail: 'Speed test failed',
speedtestHint: 'Latency probed per protocol line',
speedtestHint: 'Latency probed per format',
textModelCount: '{n} text models',
// Round 27: the supported-formats column (three protocol lines). Line names are the
// vendors' own endpoint names, so they are not translated.
protocols: 'Supported formats',
protocolHint: 'Which lines this model accepts: chat/completions (OpenAI-compatible), messages (Anthropic), responses (OpenAI Responses). Any other format is rejected with 400 at the gateway edge — the gateway never translates between formats and never silently swaps in another model',
protocolHint: 'Which call formats this model accepts: chat/completions (OpenAI-compatible), messages (Anthropic), responses (OpenAI Responses). Using any other format returns 400 — requests are never auto-translated and another model is never silently swapped in',
protocolNa: 'N/A',
protocolNaHint: 'Image / video models use the dedicated /v1/images/generations and /v1/videos endpoints and are not tied to the three protocol lines',
protocolNaHint: 'Image / video models use the dedicated /v1/images/generations and /v1/videos addresses and don\'t use the three formats above',
protocolHintRow: 'Supported formats: {lines} ',
probedLine: 'probed via {p}',
// Round 31: virtual model id (alias) — clients always send model: wjd, the gateway
// forwards to the model an admin picks. An alias is not a model: it never shows up in
// the speed-test list or the model counts, only in this card.
aliasCard: 'Virtual model id (alias)',
aliasLine: 'Only the chat/completions (OpenAI) format is supported: calling {id} on /v1/messages or /v1/responses is rejected with 400 at the gateway (it never translates formats).',
aliasLine: 'Only the chat/completions (OpenAI) format is supported: calling {id} on /v1/messages or /v1/responses returns 400 (formats are never auto-translated).',
aliasInherit: 'Vision, forced params and pricing all follow the target model — the alias stores no configuration of its own, so switching the target switches everything.',
aliasName: 'Alias id',
aliasTarget: 'Target model',
@@ -664,7 +664,7 @@ export default {
epDownload: 'Download generated images / videos through the gateway (bypasses upstream hotlink protection and expiry; allow-listed hosts only)',
epHistory: 'Read your own history (images / videos / chats)',
epLogs: 'Your own call log',
epMetrics: 'Metrics snapshot (incl. circuit breaker states)',
epMetrics: 'Metrics snapshot (incl. provider protection state)',
epHealth: 'Health check (version / provider status)',
exChat: 'Example · chat',
exMessages: 'Example · chat (Anthropic Messages format)',
@@ -768,21 +768,11 @@ export default {
otherKeys: 'Everything else',
otherKeysTip: 'Read per request — effective immediately after saving (no restart, no reload wait)',
saveTip: 'Saving rewrites the whole config file from this page (the old file is backed up as .bak first); secrets are never sent to the browser — only whether they are set.',
viewYaml: 'View config file',
save: 'Save & apply',
saved: 'Saved and applied',
discard: 'Discard changes',
editorTitle: 'Config file (gateway.yaml)',
editorSub: 'Edit the full YAML; click Save to apply',
exportCfg: 'Export config',
importCfg: 'Import config',
importCfgOk: 'Config imported into editor — click Save to apply',
envTitle: 'API key env vars',
envSub: 'Stored in data/.env; hidden by default, show / copy / edit',
envExport: 'Export vars',
envImport: 'Import vars',
envImportErr: 'Import vars failed',
envEmpty: 'No provider uses token_env',
envSet: 'Set',
envMissing: 'Missing',
envShow: 'Show',
@@ -803,119 +793,9 @@ export default {
restoreInvalid: 'Invalid backup file',
errTitle: 'Save failed — nothing was changed',
needRestart: 'restart',
restartApplied: 'Saved. These need an api-gateway restart to take effect: {keys}',
savedRestart: 'Saved and applied',
addItem: 'Add',
addModel: 'Add model',
addProvider: 'Add provider',
addPrice: 'Add pricing',
delete: 'Delete',
delProvider: 'Delete provider',
delConfirm: 'Delete "{name}"? It takes effect once you save.',
needKey: 'Provider key cannot be empty',
dupKey: '"{name}" is duplicated — please rename',
newProvider: '(new provider)',
unlimited: 'empty = unlimited',
useServerTimeout: 'empty = server.timeout',
mediaEmpty: 'empty = unsupported',
modelId: 'model id',
modelDisplay: 'display name',
hdrKey: 'header',
hdrVal: 'value',
tokenSet: 'key configured',
tokenEnvMissing: 'env var not set',
tokenKeep: 'empty = keep current',
tokenEmpty: 'empty = none',
jump: 'Jump to',
tabServer: 'Server & security',
tabServerSub: 'Binding, timeout/retry, rate limits, CORS, session TTL and other runtime switches',
tabProviders: 'Providers & models',
tabProvidersSub: 'Key source, base URL, image/video endpoints and the model list per provider',
tabLog: 'Logs & pricing',
tabLogSub: 'Log level/format/capacity plus model pricing (CNY per million tokens)',
tabDownload: 'Download proxy',
tabDownloadSub: 'CDN hosts allowed for the download proxy and the per-file size limit',
circuit: 'Provider circuit breaker',
h_circuit: 'A provider failing to the threshold is cooled down; its requests get 503',
f_c_enabled: 'Enable circuit breaker',
f_c_failure_threshold: 'Failure threshold',
f_c_cooldown: 'Cooldown (s)',
f_c_window: 'Window (s)',
h_c_enabled: 'Off = never skip a failing provider',
h_c_failure_threshold: 'Opens the circuit once failures reach this count in the window',
h_c_cooldown: 'While open the provider is skipped; it half-opens automatically after the cooldown',
h_c_window: 'Counts failures inside the window (not necessarily consecutive)',
f_host: 'Bind address',
h_host: '127.0.0.1 keeps it local/reverse-proxy only; 0.0.0.0 exposes the port (auth still always on)',
f_port: 'Port',
h_port: 'Production uses 8808 and Nginx points at it — change the proxy too',
f_timeout: 'Upstream timeout (s)',
h_timeout: 'Per upstream request timeout',
f_retry: 'Retries for direct model id',
h_retry: 'Retries for the same model (incl. the first try)',
f_health_auth: 'Require auth on /health',
// vue-i18n parses {...} as a placeholder: literal braces must be written {'{'} / {'}'},
// otherwise the whole message fails to compile (and the UI using it renders nothing).
// Double quotes: this message needs the {'{'} literal-brace form (braces are vue-i18n placeholders)
h_health_auth: "Off = /health only returns {'{'}\"status\":\"ok\"{'}'} for probes, no dashboard data",
f_hot_reload: 'Config hot reload',
h_hot_reload: 'Reloads hand-edited files by mtime; saving from this page is always immediate',
f_hot_reload_interval: 'Hot reload interval (s)',
h_hot_reload_interval: 'Lower = picks up hand edits sooner, higher = less IO',
f_metrics_enabled: 'Record metrics',
h_metrics_enabled: 'Off = /metrics and dashboard counters stop updating (calls still work)',
f_rate_limit_rps: 'Global QPS per account',
h_rate_limit_rps: 'Empty = unlimited (provider-level limits live in the provider entry)',
f_max_body_size: 'Max request body (bytes)',
h_max_body_size: '~2MB = 2000000; keep it generous if you send images',
f_cors_origins: 'CORS allowed origins',
h_cors_origins: '"*" lets any website drive this gateway from a browser (spending your quota); use trusted domains in production',
f_graceful_shutdown: 'Graceful shutdown wait (s)',
h_graceful_shutdown: 'Seconds to wait for in-flight requests after a stop signal',
f_batch_max_concurrency: '/batch max concurrency',
h_batch_max_concurrency: 'Larger client values are clamped to this',
f_batch_max_items: '/batch max items',
h_batch_max_items: 'Beyond this → 400',
f_webhook_allow_private: 'Allow private webhook callbacks',
h_webhook_allow_private: 'SSRF guard, off by default; enables 192.168./10./loopback callback URLs',
f_docs_enabled: 'Expose /docs',
h_docs_enabled: 'FastAPI built-in API docs — off by default (it lists your endpoints)',
f_auth_fail_limit_per_min: 'Auth failures per minute',
h_auth_fail_limit_per_min: 'Per source IP; beyond this → 429 (brute-force guard)',
f_session_ttl_minutes: 'Web session TTL (minutes)',
h_session_ttl_minutes: 'Login session lifetime, default 1440 = 24h; affects new logins only',
pKey: 'Internal key',
h_pKey: 'Identifier in config (also the /health provider key); renaming creates a new one',
pName: 'Display name',
pBaseUrl: 'Base URL',
pTokenEnv: 'Key env var',
h_pTokenEnv: 'The secret lives in .env; put the variable name here (e.g. AGNES_API_KEY) instead of plaintext',
pToken: 'Plaintext key',
h_pToken: 'Only if you do not use an env var; after saving it is never echoed back',
pRateLimit: 'Provider QPS limit',
h_pRateLimit: 'Empty = unlimited (shared by all models of this provider)',
pHeaders: 'Extra headers',
h_pHeaders: 'Some providers need specific headers (auth/version); leave empty if not',
pMedia: 'Image / video endpoints',
h_pMedia: 'Only for non-standard endpoints (Agnes uses its own paths); all empty = no image/video',
pModels: 'Models',
h_pModels: 'Model ids must match upstream; vision = accepts image input (preferred for image chats)',
mVision: 'vision',
f_o_log_level: 'Log level',
h_o_log_level: 'DEBUG is noisy; INFO is fine for production',
f_o_log_json: 'Structured JSON logs',
h_o_log_json: 'Enable for ELK / CloudWatch; plain text is nicer for humans',
f_o_access_log_maxlen: 'Access log capacity',
h_o_access_log_maxlen: 'Upper bound of "loaded N entries" on the logs page (in-memory ring buffer)',
pricing: 'Model pricing',
h_pricing: 'CNY per million tokens, used for estimated_cost_cny; unset = omitted (calls unaffected)',
priceIn: 'Input price',
priceOut: 'Output price',
dlHosts: 'Allowed download hosts',
h_dlHosts: 'Artifact CDN domains (incl. subdomains); empty = download proxy disabled. Add an entry when the CDN changes',
f_max_bytes: 'Max file size (bytes)',
h_max_bytes: 'Default 67108864 = 64MB',
},
// Round 30: user-visible errors from the frontend upload/compression helpers