From fa1b8a905dcece661f7f5a21cac39776a8c80610 Mon Sep 17 00:00:00 2001 From: Lemon-miaow Date: Mon, 5 Oct 2026 23:07:59 +0800 Subject: [PATCH] fix(panel): standardize operational copy to documentation style --- CONTRIBUTING.md | 11 +++++++++++ panel/src/i18n/resources/en-US/servers.json | 12 ++++++------ panel/src/i18n/resources/zh-CN/servers.json | 10 +++++----- panel/src/pages/ServerConsole.test.tsx | 2 +- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ca35761..b9dbd95 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,6 +23,17 @@ The codebase is intentionally split by responsibility. Prefer changing the smallest owning module instead of adding broad abstractions or rebuilding nearby code. +## Interface Copy + +Interface copy must use a formal documentation style: objective, concise, and +precise. State the current condition, its cause or impact, and the available +action. Describe confirmed facts only; avoid conversational phrasing, +personification, and unsupported duration estimates. Chinese instructions should +use explicit verbs such as “执行”, “选择”, “查看”, and “配置”, with operation names +matching the actual UI labels. English and Chinese copy must retain the same +meaning and degree of formality. Update existing translation entries rather than +adding duplicate messages or components. + ## Local Development You can do most day-to-day development on macOS or Linux without a full cluster. diff --git a/panel/src/i18n/resources/en-US/servers.json b/panel/src/i18n/resources/en-US/servers.json index 4c07b5b..a43418f 100644 --- a/panel/src/i18n/resources/en-US/servers.json +++ b/panel/src/i18n/resources/en-US/servers.json @@ -27,17 +27,17 @@ "retry_start": "Retry start", "retrying_start": "Retrying…", "server_asleep_title": "Server is asleep", - "server_asleep_body": "Wake it to boot a pod — the live console attaches automatically the moment it starts up.", + "server_asleep_body": "Starting the server creates a runtime instance. The live console connects automatically.", "server_shutting_down_title": "Server is shutting down", - "server_shutting_down_body": "The pod is terminating, so the live console has detached. It will be asleep in a moment.", + "server_shutting_down_body": "The Pod is terminating and the live console has disconnected. The server will enter the stopped state after termination.", "server_waking_title": "Server is starting", - "server_waking_body": "This usually takes a minute or two. The page switches over by itself once the server is running.", + "server_waking_body": "Startup duration depends on resource allocation and service initialization. The page updates the startup status automatically.", "server_stopping_title": "Server is shutting down", - "server_stopping_body": "Once it is down you can wake it again from here.", + "server_stopping_body": "The server can be started again after shutdown completes.", "server_failed_title": "Server failed to start", - "server_failed_body": "Its automatic retries are spent. The console holds the log of the last attempt; fix the cause, then press Retry start.", + "server_failed_body": "The automatic retry limit has been reached. Review startup logs and diagnostic information, resolve the fault, then select Retry start.", "server_failed_retrying_title": "Start timed out — retrying", - "server_failed_retrying_body": "The operator recreates the pod and tries again ({{used}} of {{max}} retries used). Press Retry start to go now instead.", + "server_failed_retrying_body": "The system will recreate the runtime instance and retry startup ({{used}} of {{max}} retries used). Select Retry start to initiate a new startup attempt immediately.", "console_offline_title": "Console is offline", "console_offline_body": "The live console attaches automatically as soon as the server is running.", "my_servers_breadcrumb": "My servers", diff --git a/panel/src/i18n/resources/zh-CN/servers.json b/panel/src/i18n/resources/zh-CN/servers.json index 0a1c593..780da04 100644 --- a/panel/src/i18n/resources/zh-CN/servers.json +++ b/panel/src/i18n/resources/zh-CN/servers.json @@ -27,17 +27,17 @@ "retry_start": "重试启动", "retrying_start": "重试中…", "server_asleep_title": "服务器已休眠", - "server_asleep_body": "启动后将拉起 Pod,实时控制台会自动连接。", + "server_asleep_body": "启动后将创建运行实例,实时控制台将自动连接。", "server_shutting_down_title": "服务器正在关闭", "server_shutting_down_body": "Pod 正在终止,实时控制台已断开。关闭完成后将进入休眠。", "server_waking_title": "服务器正在启动", - "server_waking_body": "一般需要一两分钟。服务器运行后,这个页面会自动切换过来。", + "server_waking_body": "启动耗时取决于资源分配与服务初始化。页面将自动更新启动状态。", "server_stopping_title": "服务器正在关闭", - "server_stopping_body": "关闭完成后可以在这里重新启动。", + "server_stopping_body": "关闭完成后可重新启动服务器。", "server_failed_title": "服务器启动失败", - "server_failed_body": "自动重试已用完。控制台里是最后一次启动的日志,找到原因修好后点「重试启动」。", + "server_failed_body": "自动重试次数已达上限。请检查启动日志及异常信息,排除故障后执行「重试启动」。", "server_failed_retrying_title": "启动超时,正在自动重试", - "server_failed_retrying_body": "operator 会重建 Pod 再试(已重试 {{used}}/{{max}} 次)。不想等可以点「重试启动」立即再来。", + "server_failed_retrying_body": "系统将重建运行实例并重新尝试启动,已执行 {{used}}/{{max}} 次自动重试。执行「重试启动」可立即发起新的启动尝试。", "console_offline_title": "控制台未连接", "console_offline_body": "服务器运行后,实时控制台将自动连接。", "my_servers_breadcrumb": "我的服务器", diff --git a/panel/src/pages/ServerConsole.test.tsx b/panel/src/pages/ServerConsole.test.tsx index 284297c..2d5bb96 100644 --- a/panel/src/pages/ServerConsole.test.tsx +++ b/panel/src/pages/ServerConsole.test.tsx @@ -72,7 +72,7 @@ describe("ServerConsole failed start", () => { renderConsole(); const notice = await screen.findByRole("status", { name: "Server failed to start" }); - expect(within(notice).getByText(/automatic retries are spent/)).toBeTruthy(); + expect(within(notice).getByText(/automatic retry limit has been reached/)).toBeTruthy(); expect(await screen.findByTestId("log-stream")).toBeTruthy(); expect(screen.getByRole("button", { name: /Retry start/ })).toBeTruthy(); });