From 38c36debdec8bff96ff9215f9edc1e2465fe33ba Mon Sep 17 00:00:00 2001 From: mcocdaa <2021137961@qq.com> Date: Sat, 17 Oct 2026 12:09:54 +0200 Subject: [PATCH] fix(i18n): resolve forward/reverse i18n leaks, bare layout locale toggle, and README hygiene --- README.md | 2 +- README_CN.md | 2 +- README_EN.md | 171 ------------------ packages/client-core/src/http/apiError.ts | 26 ++- .../src/components/agent/AgentChatSession.vue | 2 +- .../src/components/agent/AgentPartsList.vue | 4 +- .../agent/AgentSensitiveReauthDialog.vue | 2 +- .../components/agent/TerminalAgentToggle.vue | 4 +- .../computers/DeleteComputerDialog.vue | 4 +- .../src/components/dashboard/ComputerCard.vue | 2 +- .../components/dashboard/DeleteTermDialog.vue | 4 +- .../settings/AuthorizedClientsPanel.vue | 4 +- .../DeviceAuthorizationApprovalDialog.vue | 2 +- .../settings/ServerConnectionPanel.test.ts | 2 +- .../settings/ServerConnectionPanel.vue | 2 +- .../src/components/settings/TotpPanel.test.ts | 2 +- .../src/components/settings/TotpPanel.vue | 2 +- .../settings/TotpProtectionDialog.vue | 2 +- .../src/composables/useTerminalSession.ts | 9 +- packages/client-ui/src/i18n/index.ts | 28 +++ .../client-ui/src/views/AgentChatView.vue | 2 +- .../client-ui/src/views/AgentPreviewView.vue | 2 +- packages/client-ui/src/views/AgentView.vue | 4 +- .../src/views/DeviceAuthorizeView.vue | 21 ++- .../client-ui/src/views/LoginView.test.ts | 24 +++ packages/client-ui/src/views/LoginView.vue | 19 +- .../src/views/NativeAuthorizeView.vue | 16 +- .../client-ui/src/views/SettingsView.test.ts | 2 +- packages/client-ui/src/views/SettingsView.vue | 6 +- packages/client-ui/src/views/TerminalView.vue | 7 +- .../src/views/TotpActivationView.vue | 2 +- 31 files changed, 168 insertions(+), 213 deletions(-) delete mode 100644 README_EN.md diff --git a/README.md b/README.md index f30809c8..0bc141c9 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ curl -fsS http://127.0.0.1:8765/healthz ```bash curl -fsSL \ - https://github.com/mcocdaa/TermFlow/releases/download/v0.1.0/install-termflow-node.sh \ + https://github.com/mcocdaa/TermFlow/releases/download/v0.2.0/install-termflow-node.sh \ | bash termflow login \ diff --git a/README_CN.md b/README_CN.md index ec6eaa71..8f8c9157 100644 --- a/README_CN.md +++ b/README_CN.md @@ -60,7 +60,7 @@ curl -fsS http://127.0.0.1:8765/healthz ```bash curl -fsSL \ - https://github.com/mcocdaa/TermFlow/releases/download/v0.1.0/install-termflow-node.sh \ + https://github.com/mcocdaa/TermFlow/releases/download/v0.2.0/install-termflow-node.sh \ | bash termflow login \ diff --git a/README_EN.md b/README_EN.md deleted file mode 100644 index f30809c8..00000000 --- a/README_EN.md +++ /dev/null @@ -1,171 +0,0 @@ -
-
-Agent Chat
+{{ t('agent.chat.eyebrow') }}
{{ bindingLabel }}
- {{ t('agent.chat.toolDefaultsOmitted', { items: part.input_omitted.join('、') }) }} + {{ t('agent.chat.toolDefaultsOmitted', { items: part.input_omitted.join(locale === 'en' ? ', ' : '、') }) }}
{{ t('agent.chat.toolOutput') }}
@@ -63,7 +63,7 @@ import { Sparkles, Wrench } from '@lucide/vue' import { useI18n } from '../../i18n' import AgentCollapsibleOutput from './AgentCollapsibleOutput.vue' -const { t } = useI18n() +const { t, locale } = useI18n() export interface AgentConversationPart { type: string diff --git a/packages/client-ui/src/components/agent/AgentSensitiveReauthDialog.vue b/packages/client-ui/src/components/agent/AgentSensitiveReauthDialog.vue index 3d92a432..a63060e6 100644 --- a/packages/client-ui/src/components/agent/AgentSensitiveReauthDialog.vue +++ b/packages/client-ui/src/components/agent/AgentSensitiveReauthDialog.vue @@ -3,7 +3,7 @@Security Check
+{{ t('settings.totp.securityCheckEyebrow') }}