GeezerVison is showing github.com — i18n D2 (#86): review fixes——8 裸串定性与补 wrap、whitelist 并集重建、483 模板盲区拆直、… · dioskuroi/t3code@734a6d6
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/updates/DesktopUpdatePolicy.ts +5-1Lines changed: 5 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 5 | 5 | * | 6 | 6 | * @module DesktopUpdatePolicy | 7 | 7 | */ | | 8 | +import { tr } from "@t3tools/shared/i18n"; | 8 | 9 | import { | 9 | 10 | managedUpdatesMessage, | 10 | 11 | type ManagedPolicyDocument, | @@ -76,7 +77,10 @@ const make = Effect.gen(function* () { | 76 | 77 | mode: "off", | 77 | 78 | feedUrl: undefined, | 78 | 79 | allowNightly: false, | 79 | | - message: `Updates are off because T3 Code cannot use the managed policy at ${error.path}. Contact your administrator.`, | | 80 | + message: tr( | | 81 | + "Updates are off because T3 Code cannot use the managed policy at {path}. Contact your administrator.", | | 82 | + { path: error.path }, | | 83 | + ), | 80 | 84 | }), | 81 | 85 | ), | 82 | 86 | }), | |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/updates/DesktopUpdates.ts +4-1Lines changed: 4 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -480,7 +480,10 @@ export const make = Effect.gen(function* () { | 480 | 480 | const channelBlockedReason = (channel: DesktopUpdateChannel): Option.Option<string> => | 481 | 481 | channel === "nightly" && !policy.allowNightly | 482 | 482 | ? Option.some( | 483 | | - `${policy.message ?? tr("Nightly updates are turned off on this machine.")} ${tr("Switch to the stable channel to keep getting updates.")}`, | | 483 | + [ | | 484 | + policy.message ?? tr("Nightly updates are turned off on this machine."), | | 485 | + tr("Switch to the stable channel to keep getting updates."), | | 486 | + ].join(" "), | 484 | 487 | ) | 485 | 488 | : Option.none(); | 486 | 489 |
| |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/wsl/DesktopWslServerTree.test.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -348,7 +348,7 @@ describe("DesktopWslServerTree", () => { | 348 | 348 | }); | 349 | 349 | assert.isFalse(result.ok); | 350 | 350 | if (!result.ok) { | 351 | | - assert.include(result.reason, "could not be extracted"); | | 351 | + assert.include(result.reason, "WSL 服务器文件无法解压到"); | 352 | 352 | assert.isFalse(result.fatal); | 353 | 353 | } | 354 | 354 | const treeRoot = path.join(tempDir, "userdata", "wsl-server-tree"); | |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/wsl/DesktopWslServerTree.ts +5-3Lines changed: 5 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | import * as Context from "effect/Context"; | | 2 | +import { tr } from "@t3tools/shared/i18n"; | 2 | 3 | import * as Effect from "effect/Effect"; | 3 | 4 | import * as FileSystem from "effect/FileSystem"; | 4 | 5 | import * as Layer from "effect/Layer"; | @@ -180,9 +181,10 @@ export const make = Effect.gen(function* () { | 180 | 181 | Effect.catch((error) => | 181 | 182 | Effect.succeed({ | 182 | 183 | ok: false, | 183 | | - reason: `WSL server files could not be extracted to ${versionDir}: ${ | 184 | | - error.cause instanceof Error ? error.cause.message : String(error.cause) | 185 | | - }`, | | 184 | + reason: tr("WSL server files could not be extracted to {dir}: {cause}", { | | 185 | + dir: versionDir, | | 186 | + cause: error.cause instanceof Error ? error.cause.message : String(error.cause), | | 187 | + }), | 186 | 188 | fatal: false, | 187 | 189 | } as const), | 188 | 190 | ), | |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/src/i18n.zh.json +6-2Lines changed: 6 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1249 | 1249 | "Next reconnect at": "下次重连时间", | 1250 | 1250 | "Next send compacts {compactTokens} tokens first.": "下次发送将先压缩 {compactTokens} 个 token。", | 1251 | 1251 | "Next send keeps all {compactTokens} tokens.": "下次发送保留全部 {compactTokens} 个 token。", | | 1252 | + "Nightly updates are turned off on this machine.": "本机已关闭 Nightly 更新。", | 1252 | 1253 | "Niri activation cancelled.": "Niri 激活已取消。", | 1253 | 1254 | "Niri capture shortcut registration timed out.": "Niri 捕获快捷键注册超时。", | 1254 | 1255 | "Niri connection closed.": "Niri 连接已关闭。", | | 2036 | 2037 | "Switch to": "切换到", | 2037 | 2038 | "Switch to default mode": "切换到默认模式", | 2038 | 2039 | "Switch to plan mode": "切换到计划模式", | | 2040 | + "Switch to the stable channel to keep getting updates.": "切换到稳定版通道以继续获取更新。", | 2039 | 2041 | "Switch to {targetLabel}": "切换到 {targetLabel}", | 2040 | 2042 | "Switches to {target}": "切换到{target}", | 2041 | 2043 | "Switching branch": "正在切换分支", | | 2444 | 2446 | "Update to {version}": "更新到 {version}", | 2445 | 2447 | "Update {version} did not apply on this machine. Retry it from the desktop app there.": "更新 {version} 未在此机器上生效。请在那边的桌面应用中重试。", | 2446 | 2448 | "Updated": "已更新", | | 2449 | + "Updates are off because T3 Code cannot use the managed policy at {path}. Contact your administrator.": "更新已关闭,因为 T3 Code 无法读取位于 {path} 的受管策略。请联系你的管理员。", | 2447 | 2450 | "Updates are turned off on this machine.": "此机器已关闭更新。", | 2448 | 2451 | "Updates unavailable": "暂无可用更新", | 2449 | 2452 | "Updating": "正在更新", | | 2474 | 2477 | "Used": "已使用", | 2475 | 2478 | "User input needed": "需要你输入", | 2476 | 2479 | "User message": "用户消息", | 2477 | | - "User-configured HTTPS endpoint for this desktop backend.": "为此桌面后端用户配置的 HTTPS 端点。", | 2478 | | - "User-configured endpoint for this desktop backend.": "为此桌面后端用户配置的端点。", | | 2480 | + "User-configured HTTPS endpoint for this desktop backend.": "为此桌面后端配置的用户 HTTPS 端点。", | | 2481 | + "User-configured endpoint for this desktop backend.": "为此桌面后端配置的用户端点。", | 2479 | 2482 | "Using": "正在使用", | 2480 | 2483 | "Using ChatGPT plan": "正在使用 ChatGPT 套餐", | 2481 | 2484 | "Using {fallbackModelName}": "正在使用 {fallbackModelName}", | | 2528 | 2531 | "WSL runtime installation timed out. Check that the distro has free disk space, then retry.": "WSL 运行时安装超时。请检查发行版的可用磁盘空间后重试。", | 2529 | 2532 | "WSL runtime unavailable: {reason}": "WSL 运行时不可用:{reason}", | 2530 | 2533 | "WSL server dependencies could not be loaded (for example \"node-pty\"). The native packages the server needs are not unpacked where the WSL distro's Node can read them. This is a packaging problem with this build. Please report it.": "无法加载 WSL 服务器依赖(例如 node-pty)。服务器所需的本地包未解包到 WSL 发行版中 Node 可读取的位置。这是此版本的打包问题,请报告。", | | 2534 | + "WSL server files could not be extracted to {dir}: {cause}": "WSL 服务器文件无法解压到 {dir}:{cause}", | 2531 | 2535 | "WSL support is missing from this T3 Code build: the packaged Linux node-pty binary was not included. Install a build that includes WSL support.": "此 T3 Code 版本缺少 WSL 支持:未包含打包的 Linux node-pty 二进制文件。请安装包含 WSL 支持的版本。", | 2532 | 2536 | "WSL-only backend requested but WSL is unavailable; starting the Windows primary instead.": "请求了仅 WSL 后端,但 WSL 不可用;改为启动 Windows 主后端。", | 2533 | 2537 | "Wait": "等待", | |
Collapse file Copy file name to clipboardExpand all lines: scripts/whitelist.json +9-2Lines changed: 9 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 479 | 479 | "AddMatch", | 480 | 480 | "Response", | 481 | 481 | "CaptureWithFeedback", | 482 | | - "EventStream" | | 482 | + "EventStream", | | 483 | + "Failed to read desktop network interfaces on .", | | 484 | + "Could not read Chromium cookies at : .", | | 485 | + "Could not read Firefox cookies at .", | | 486 | + "Could not read Safari cookies: .", | | 487 | + "Could not read Safari cookies at : .", | | 488 | + "Failed to extract the WSL server tree to ." | 483 | 489 | ], | 484 | 490 | "contains": ["/side", "@container", "update-desktop-database exit code", "xdg-mime exit code"], | 485 | 491 | "globs": [ | | 838 | 844 | "M2 (#78) 补充:文件容器路径片段 <app>/Documents 与菜单 ID 后缀 :menu,均为标识符片段非展示文案。", | 839 | 845 | "M2 (#78) words 增补:pt(终端字号单位,随 §3.6 单位精神)、Beta(版本品牌,§3.7 同类)、PDF/Safari(产品与格式名)、Build/Plan(模式显示名 Plan Mode 内的保留标识词)。", | 840 | 846 | "M2 (#78) review 补充:outbox 系诊断串(console.error / TaggedError.message / AggregateError,不进 UI)与剪贴板写失败 console.error——确不翻,白名单豁免。", | 841 | | - "批 D2(#86,桌面壳 snapshot/preview/updates/backend/wsl/ssh/telemetry)新增:exact 为批内日志/错误 getter 语句、Effect/状态 _tag 哨兵、键名与键盘键、品牌/路径/钥匙串标识、SVG/样式值、Niri/Hyprland 配置片段、PowerShell/SQL/CDP 协议串(均为非显示层,不翻);words 新增品牌与技术词(GNOME/Hyprland/Niri/KDE/Wayland/X11/AppImage/KDL/D-Bus/gdbus/hyprctl/portal/Omarchy/Lua、MagicDNS/Tailscale Serve、cookie/webview/node-pty/glibc/arm64、Ubuntu/System32/Win/Super、键名 Enter 等),供译文内容面豁免(术语表 §3 品牌/技术词精神)。" | | 847 | + "批 D2(#86,桌面壳 snapshot/preview/updates/backend/wsl/ssh/telemetry)新增:exact 为批内日志/错误 getter 语句、Effect/状态 _tag 哨兵、键名与键盘键、品牌/路径/钥匙串标识、SVG/样式值、Niri/Hyprland 配置片段、PowerShell/SQL/CDP 协议串(均为非显示层,不翻);words 新增品牌与技术词(GNOME/Hyprland/Niri/KDE/Wayland/X11/AppImage/KDL/D-Bus/gdbus/hyprctl/portal/Omarchy/Lua、MagicDNS/Tailscale Serve、cookie/webview/node-pty/glibc/arm64、Ubuntu/System32/Win/Super、键名 Enter 等),供译文内容面豁免(术语表 §3 品牌/技术词精神)。", | | 848 | + "批 D2 review 修复(#86):BrowserImport/WslServerTree/NetworkInterfaces 的 Schema TaggedError message getter 为诊断面(IPC 失败详情由 reason token 在渲染层另行成文),日志语境不翻,exact 豁免。" | 842 | 849 | ] | 843 | 850 | } |
|