From fc7e27671d473a8d5fb8ff8f0dd6b7a9ff109daa Mon Sep 17 00:00:00 2001 From: mini Date: Tue, 21 Apr 2026 01:30:23 +0800 Subject: [PATCH] feat(landing): extract i18n keys + add English translations Replaces all rendered Chinese strings in LandingView with $t() calls and interpolation components; adds landing namespace (62 leaf keys) to both zh.ts and en.ts. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/i18n/locales/en.ts | 82 +++++++++++++ frontend/src/i18n/locales/zh.ts | 82 +++++++++++++ frontend/src/views/landing/LandingView.vue | 127 +++++++++++---------- 3 files changed, 233 insertions(+), 58 deletions(-) diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts index d1def45c..a3008136 100644 --- a/frontend/src/i18n/locales/en.ts +++ b/frontend/src/i18n/locales/en.ts @@ -5598,4 +5598,86 @@ export default { }, }, + landing: { + nav: { + products: 'Products', + docs: 'Docs', + login: 'Sign in', + signup: 'Free trial →', + }, + hero: { + badgeNew: 'NEW', + eyebrow: 'Unified access to multiple AI platforms · Zero code change', + title1: 'Your AI subscriptions,', + title2: 'are already paid for.', + sub1: 'Claude Pro · ChatGPT Plus · Codex · Gemini subscriptions', + sub2: 'Aggregated into one unified API — drop-in {openai} / {anthropic} SDK', + ctaLogin: 'Sign in →', + ctaContact: 'Contact us', + micro: 'Verified with Codex CLI · Claude Code · curl · Server egress: Singapore', + }, + models: { + kicker: '// providers', + title: 'Reuse your subscriptions directly via OAuth', + sub: 'No official API key needed. No account switching.', + more: 'More', + morePlanned: 'Planned', + }, + features: { + kicker: '// capabilities', + title1: 'One subscription,', + title2: 'one unified model pool', + sub: 'Consolidate subscriptions scattered across platforms into infrastructure developers can actually use', + f1Title: 'One key for all models', + f1Desc: 'No more requesting API keys or configuring base_url per provider. One {sk} routes to Claude / GPT / Gemini, auto-dispatched by model to the right account pool.', + f1b1: 'OpenAI Responses API compatible', + f1b2: 'Anthropic Messages API compatible', + f1b3: 'Smart model → provider routing', + f2Title: 'Highly available account pool', + f2Desc: 'Multi-account auto-scheduling with failover. When an upstream hits rate limits or cooldown, traffic switches to the next healthy account — token refresh is fully automatic.', + f2b1: 'Rate-limit / 5xx auto failover', + f2b2: 'OAuth token auto-refresh', + f2b3: 'Weighted round-robin · least connections', + f3Title: 'Usage dashboard', + f3Desc: 'Tokens, cost, upstream account, and latency visualized per request. Model distribution pie + trend curve + top rankings.', + f3b1: 'Per-request audit log', + f3b2: 'Multi-dimension tokens / cost stats', + f3b3: 'Export CSV / Webhook integration', + }, + codeDemo: { + kicker: '// integration', + title: 'Change base_url. That\'s it.', + sub: 'Compatible with OpenAI / Anthropic / Gemini SDK — {highlight}', + subHighlight: 'zero code changes', + foot: 'Supports OpenAI Responses API · Anthropic Messages API · Gemini generateContent · Streaming SSE & WebSocket', + }, + dashboard: { + kicker: '// observability', + title: 'Every request, fully visible', + sub: 'Unlike opaque third-party API pools — see exactly which account was charged, which model ran, how many tokens were used, and upstream response time at a glance.', + statToday: "Today's requests", + statTokensIn: 'Input tokens', + statTokensOut: 'Output tokens', + statCost: "Today's cost", + chartTrend: 'Usage trend — last 30 days', + tableTime: 'Time', + tableModel: 'Model', + tableUpstream: 'Upstream', + tableStatus: 'Status', + tableUsage: 'Usage', + }, + footer: { + tagline1: 'Aggregate multiple AI subscriptions into one unified API.', + tagline2: 'Put your already-paid subscriptions to work.', + colProducts: 'Products', + colAccount: 'Account', + colContact: 'Contact', + linkDocs: 'Docs', + linkFeatures: 'Features', + linkChangelog: 'Changelog', + linkLogin: 'Sign in', + linkRegister: 'Register', + }, + }, + } diff --git a/frontend/src/i18n/locales/zh.ts b/frontend/src/i18n/locales/zh.ts index ca242070..43168bd0 100644 --- a/frontend/src/i18n/locales/zh.ts +++ b/frontend/src/i18n/locales/zh.ts @@ -5791,4 +5791,86 @@ export default { }, }, + landing: { + nav: { + products: '产品', + docs: '文档', + login: '登录', + signup: '免费试用 →', + }, + hero: { + badgeNew: 'NEW', + eyebrow: '统一接入多个 AI 平台 · 零改动切换', + title1: '你的 AI 订阅,', + title2: '已经付过钱了。', + sub1: 'Claude Pro · ChatGPT Plus · Codex · Gemini 订阅', + sub2: '聚合成统一 API,零改动接入 {openai} / {anthropic} SDK', + ctaLogin: '登录 →', + ctaContact: '联系咨询', + micro: '已验证可用 Codex CLI · Claude Code · curl · 服务器出口新加坡', + }, + models: { + kicker: '// providers', + title: '通过 OAuth 直接复用你的订阅', + sub: '无需申请官方 API key,也无需切换账号', + more: '更多', + morePlanned: '规划中', + }, + features: { + kicker: '// capabilities', + title1: '付一次订阅,', + title2: '用起一整个模型池', + sub: '把散落在各个平台的订阅,整合成开发者真正能用的基础设施', + f1Title: '一个 key 接所有模型', + f1Desc: '不再为每个 provider 申请 API key、配置 base_url。统一 {sk} 走 Claude / GPT / Gemini,按 model 自动路由到对应账号池。', + f1b1: 'OpenAI Responses API 兼容', + f1b2: 'Anthropic Messages API 兼容', + f1b3: '智能 model → provider 路由', + f2Title: '账号池高可用', + f2Desc: '支持多账号自动调度与 failover。某个上游触发限流 / 冷却时,流量切到下一个健康账号,token 刷新全自动。', + f2b1: '限流/5xx 自动 failover', + f2b2: 'OAuth token 自动刷新', + f2b3: '加权轮询 · 最少连接', + f3Title: '用量看板', + f3Desc: '每条请求的 tokens、费用、上游账号、延迟全可视化。模型分布饼图 + 趋势曲线 + Top 排行。', + f3b1: '逐请求审计日志', + f3b2: '多维度 tokens / cost 统计', + f3b3: '导出 CSV / 接 Webhook', + }, + codeDemo: { + kicker: '// integration', + title: '把 base_url 一改,就能用', + sub: '兼容 OpenAI / Anthropic / Gemini SDK,{highlight}', + subHighlight: '零代码改动', + foot: '支持 OpenAI Responses API · Anthropic Messages API · Gemini generateContent · 流式 SSE & WebSocket', + }, + dashboard: { + kicker: '// observability', + title: '每条请求都看得见', + sub: '不像第三方 API 池子那种"扣了多少不告诉你"——扣哪个账号、跑哪个模型、用了多少 tokens、上游响应几秒,一目了然。', + statToday: '今日请求', + statTokensIn: '输入 Tokens', + statTokensOut: '输出 Tokens', + statCost: '今日费用', + chartTrend: '近 30 天用量趋势', + tableTime: '时间', + tableModel: '模型', + tableUpstream: '上游', + tableStatus: '状态', + tableUsage: '用量', + }, + footer: { + tagline1: '把多个 AI 订阅聚合成统一 API。', + tagline2: '让「已经付过钱」的订阅真正为你工作。', + colProducts: '产品', + colAccount: '账户', + colContact: '联系', + linkDocs: '文档', + linkFeatures: '功能', + linkChangelog: '更新日志', + linkLogin: '登录', + linkRegister: '注册', + }, + }, + } diff --git a/frontend/src/views/landing/LandingView.vue b/frontend/src/views/landing/LandingView.vue index ce84a2c2..f40dc691 100644 --- a/frontend/src/views/landing/LandingView.vue +++ b/frontend/src/views/landing/LandingView.vue @@ -13,13 +13,13 @@ PURO AI @@ -27,32 +27,35 @@
- NEW - 统一接入多个 AI 平台 · 零改动切换 + {{ $t('landing.hero.badgeNew') }} + {{ $t('landing.hero.eyebrow') }}

- 你的 AI 订阅,
- 已经付过钱了。 + {{ $t('landing.hero.title1') }}
+ {{ $t('landing.hero.title2') }}

- Claude Pro · ChatGPT Plus · Codex · Gemini 订阅
- 聚合成统一 API,零改动接入 OpenAI / Anthropic SDK + {{ $t('landing.hero.sub1') }}
+ + + +

- 登录 → - 联系咨询 + {{ $t('landing.hero.ctaLogin') }} + {{ $t('landing.hero.ctaContact') }}
- 已验证可用 Codex CLI · Claude Code · curl · 服务器出口新加坡 + {{ $t('landing.hero.micro') }}
-
// providers
-

通过 OAuth 直接复用你的订阅

-

无需申请官方 API key,也无需切换账号

+
{{ $t('landing.models.kicker') }}
+

{{ $t('landing.models.title') }}

+

{{ $t('landing.models.sub') }}

@@ -100,8 +103,8 @@
-
更多
-
规划中
+
{{ $t('landing.models.more') }}
+
{{ $t('landing.models.morePlanned') }}
@@ -110,39 +113,43 @@
-
// capabilities
-

付一次订阅,
用起一整个模型池

-

把散落在各个平台的订阅,整合成开发者真正能用的基础设施

+
{{ $t('landing.features.kicker') }}
+

{{ $t('landing.features.title1') }}
{{ $t('landing.features.title2') }}

+

{{ $t('landing.features.sub') }}

-

一个 key 接所有模型

-

不再为每个 provider 申请 API key、配置 base_url。统一 sk- 走 Claude / GPT / Gemini,按 model 自动路由到对应账号池。

+

{{ $t('landing.features.f1Title') }}

+

+ + + +

    -
  • OpenAI Responses API 兼容
  • -
  • Anthropic Messages API 兼容
  • -
  • 智能 model → provider 路由
  • +
  • {{ $t('landing.features.f1b1') }}
  • +
  • {{ $t('landing.features.f1b2') }}
  • +
  • {{ $t('landing.features.f1b3') }}
🔄
-

账号池高可用

-

支持多账号自动调度与 failover。某个上游触发限流 / 冷却时,流量切到下一个健康账号,token 刷新全自动。

+

{{ $t('landing.features.f2Title') }}

+

{{ $t('landing.features.f2Desc') }}

    -
  • 限流/5xx 自动 failover
  • -
  • OAuth token 自动刷新
  • -
  • 加权轮询 · 最少连接
  • +
  • {{ $t('landing.features.f2b1') }}
  • +
  • {{ $t('landing.features.f2b2') }}
  • +
  • {{ $t('landing.features.f2b3') }}
📊
-

用量看板

-

每条请求的 tokens、费用、上游账号、延迟全可视化。模型分布饼图 + 趋势曲线 + Top 排行。

+

{{ $t('landing.features.f3Title') }}

+

{{ $t('landing.features.f3Desc') }}

    -
  • 逐请求审计日志
  • -
  • 多维度 tokens / cost 统计
  • -
  • 导出 CSV / 接 Webhook
  • +
  • {{ $t('landing.features.f3b1') }}
  • +
  • {{ $t('landing.features.f3b2') }}
  • +
  • {{ $t('landing.features.f3b3') }}
@@ -151,9 +158,13 @@
-
// integration
-

把 base_url 一改,就能用

-

兼容 OpenAI / Anthropic / Gemini SDK,零代码改动

+
{{ $t('landing.codeDemo.kicker') }}
+

{{ $t('landing.codeDemo.title') }}

+

+ + + +

@@ -186,15 +197,15 @@ requires_openai_auth = true -d '{"model":"gpt-5.4","input":"hello"}'
-
支持 OpenAI Responses API · Anthropic Messages API · Gemini generateContent · 流式 SSE & WebSocket
+
{{ $t('landing.codeDemo.foot') }}
-
// observability
-

每条请求都看得见

-

不像第三方 API 池子那种"扣了多少不告诉你"——扣哪个账号、跑哪个模型、用了多少 tokens、上游响应几秒,一目了然。

+
{{ $t('landing.dashboard.kicker') }}
+

{{ $t('landing.dashboard.title') }}

+

{{ $t('landing.dashboard.sub') }}

@@ -225,15 +236,15 @@ requires_openai_auth = true
-
今日请求
1,842
+12.3%
-
输入 Tokens
2.1M
+8.1%
-
输出 Tokens
485K
+15.6%
-
今日费用
$1.23
-4.2%
+
{{ $t('landing.dashboard.statToday') }}
1,842
+12.3%
+
{{ $t('landing.dashboard.statTokensIn') }}
2.1M
+8.1%
+
{{ $t('landing.dashboard.statTokensOut') }}
485K
+15.6%
+
{{ $t('landing.dashboard.statCost') }}
$1.23
-4.2%
- 近 30 天用量趋势 + {{ $t('landing.dashboard.chartTrend') }}
Claude GPT @@ -278,7 +289,7 @@ requires_openai_auth = true
- + @@ -302,24 +313,24 @@ requires_openai_auth = truePURO AI - +
时间模型上游状态用量
{{ $t('landing.dashboard.tableTime') }}{{ $t('landing.dashboard.tableModel') }}{{ $t('landing.dashboard.tableUpstream') }}{{ $t('landing.dashboard.tableStatus') }}{{ $t('landing.dashboard.tableUsage') }}
12:34:07gpt-5.4ChatGPT #12002,341