From 85c775322f103fc2c80b28b94e79181950d93576 Mon Sep 17 00:00:00 2001 From: imccyu <276526105+imccyu@users.noreply.github.com> Date: Tue, 3 Nov 2026 14:20:39 +0800 Subject: [PATCH] fix(ui-goal): tell an inactive goal from a paused one in Chinese MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Chinese GoalBar used 已暂停的目标 both for a durably paused goal and for an active goal whose automatic continuation is disarmed, the state every active goal has after a restart. Users could not tell whether a goal had been paused. The disarmed label now reads 待继续的目标; paused goals keep 已暂停的目标. Refs #7757 --- packages/client/ui-goal/src/client/locales.ts | 2 +- packages/client/ui-goal/tests/browser-plugin.client.spec.tsx | 2 +- packages/client/ui-goal/tests/goalbar.client.spec.tsx | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/client/ui-goal/src/client/locales.ts b/packages/client/ui-goal/src/client/locales.ts index f52946329e..089986d91d 100644 --- a/packages/client/ui-goal/src/client/locales.ts +++ b/packages/client/ui-goal/src/client/locales.ts @@ -3,7 +3,7 @@ /** Simplified Chinese dictionary (the key-set source of truth). */ export const zh = { 'phase.active': '进行中的目标', - 'phase.active.disarmed': '已暂停的目标', + 'phase.active.disarmed': '待继续的目标', 'phase.paused': '已暂停的目标', 'phase.blocked': '受阻的目标', 'objective.aria': '目标内容', diff --git a/packages/client/ui-goal/tests/browser-plugin.client.spec.tsx b/packages/client/ui-goal/tests/browser-plugin.client.spec.tsx index 68be693440..e3e57abb59 100644 --- a/packages/client/ui-goal/tests/browser-plugin.client.spec.tsx +++ b/packages/client/ui-goal/tests/browser-plugin.client.spec.tsx @@ -379,7 +379,7 @@ describe('GoalDock adapter', () => { const t = makeTranslate(zh, commonZh) const props = { useProjection, useGoalActivation, ...actions, t } as unknown as Parameters[0] const rendered = render() - expect(rendered.getByText('已暂停的目标')).toBeTruthy() + expect(rendered.getByText('待继续的目标')).toBeTruthy() expect(screen.getByRole('button', { name: '恢复目标' })).toBeTruthy() expect(rendered.queryByRole('button', { name: '暂停目标' })).toBeNull() }) diff --git a/packages/client/ui-goal/tests/goalbar.client.spec.tsx b/packages/client/ui-goal/tests/goalbar.client.spec.tsx index d14f2c854a..cc9dda1c67 100644 --- a/packages/client/ui-goal/tests/goalbar.client.spec.tsx +++ b/packages/client/ui-goal/tests/goalbar.client.spec.tsx @@ -153,10 +153,11 @@ describe('GoalBar', () => { expect(actions.onPause).toHaveBeenCalledTimes(1) }) - it('active disarmed goal: "已暂停的目标" with a resume action instead of pause', () => { + it('active disarmed goal: "待继续的目标" with a resume action instead of pause', () => { const actions = makeActions() render() - expect(screen.getByText('已暂停的目标')).toBeTruthy() + expect(screen.getByText('待继续的目标')).toBeTruthy() + expect(screen.queryByText('已暂停的目标')).toBeNull() fireEvent.click(screen.getByRole('button', { name: '恢复目标' })) expect(actions.onResume).toHaveBeenCalledTimes(1) expect(screen.queryByRole('button', { name: '暂停目标' })).toBeNull()