From 50855ec15fb67df6457060b684b87dfdbd3edae7 Mon Sep 17 00:00:00 2001 From: ianshaw Date: Thu, 25 Dec 2025 23:53:22 -0800 Subject: [PATCH] =?UTF-8?q?feat(i18n):=20=E6=B7=BB=E5=8A=A0=20AI=20Studio?= =?UTF-8?q?=20OAuth=20=E9=85=8D=E7=BD=AE=E7=8A=B6=E6=80=81=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 aiStudioNotConfiguredShort/Tip/aiStudioNotConfigured 翻译 - 更新 needsProjectIdDesc/noProjectIdNeededDesc 描述更准确 --- frontend/src/i18n/locales/en.ts | 9 +++++++-- frontend/src/i18n/locales/zh.ts | 7 +++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts index c45b99ff..9e26e99b 100644 --- a/frontend/src/i18n/locales/en.ts +++ b/frontend/src/i18n/locales/en.ts @@ -961,9 +961,14 @@ export default { stateWarningDesc: 'Recommended: paste the full callback URL (includes code & state).', oauthTypeLabel: 'OAuth Type', needsProjectId: 'For GCP Developers', - needsProjectIdDesc: 'Uses built-in client, requires GCP project', + needsProjectIdDesc: 'Requires GCP project', noProjectIdNeeded: 'For Regular Users', - noProjectIdNeededDesc: 'Requires your own OAuth client' + noProjectIdNeededDesc: 'Requires admin-configured OAuth client', + aiStudioNotConfiguredShort: 'Not configured', + aiStudioNotConfiguredTip: + 'AI Studio OAuth is not configured: set GEMINI_OAUTH_CLIENT_ID / GEMINI_OAUTH_CLIENT_SECRET and add Redirect URI: http://localhost:1455/auth/callback (Consent screen scopes must include https://www.googleapis.com/auth/generative-language.retriever)', + aiStudioNotConfigured: + 'AI Studio OAuth is not configured: set GEMINI_OAUTH_CLIENT_ID / GEMINI_OAUTH_CLIENT_SECRET and add Redirect URI: http://localhost:1455/auth/callback' } }, // Gemini specific (platform-wide) diff --git a/frontend/src/i18n/locales/zh.ts b/frontend/src/i18n/locales/zh.ts index 5ffe0d94..b0d3585a 100644 --- a/frontend/src/i18n/locales/zh.ts +++ b/frontend/src/i18n/locales/zh.ts @@ -1069,9 +1069,12 @@ export default { stateWarningDesc: '建议粘贴完整回调链接(包含 code 和 state)。', oauthTypeLabel: 'OAuth 类型', needsProjectId: '适合 GCP 开发者', - needsProjectIdDesc: '使用内置客户端,需 GCP 项目', + needsProjectIdDesc: '需 GCP 项目', noProjectIdNeeded: '适合普通用户', - noProjectIdNeededDesc: '需自建 OAuth Client' + noProjectIdNeededDesc: '需管理员配置 OAuth Client', + aiStudioNotConfiguredShort: '未配置', + aiStudioNotConfiguredTip: 'AI Studio OAuth 未配置:请先设置 GEMINI_OAUTH_CLIENT_ID / GEMINI_OAUTH_CLIENT_SECRET,并在 Google OAuth Client 添加 Redirect URI:http://localhost:1455/auth/callback(Consent Screen scopes 需包含 https://www.googleapis.com/auth/generative-language.retriever)', + aiStudioNotConfigured: 'AI Studio OAuth 未配置:请先设置 GEMINI_OAUTH_CLIENT_ID / GEMINI_OAUTH_CLIENT_SECRET,并在 Google OAuth Client 添加 Redirect URI:http://localhost:1455/auth/callback' } }, // Gemini specific (platform-wide)