Repository navigation
Commit b3bcfef
fix(i18n): the record timeline's events chip reads 事件 / Events, and the Chinese stream says 动态 (#36317)
repo:objectstack#4 · os-project-manager ·
session_01FEkQ5oLLK7uoxp33riiBJL
<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XTRdLmK9YYgMSCJ7NH2PuUY)_
Fixes #36148
Clause-②: no
Metadata-protocol: none
Ruling-ref: 7074372050
## 维护者速读
- 记录页「动态」里的筛选从「全部 · 活动 · 讨论 · 变更」改为「全部 · 事件 · 讨论 · 变更」,英文
Events;中文的空状态改为「暂无动态」,旧标题、无权限、加载失败和筛选读屏标签都改说「动态」。
- 按你 04:45 选的 A(「A 改叫「事件」」)执行;每个筛选装什么不变,「变更」仍只放带前后值的字段变更(#30074 裁定 C)。
- 出错时最坏是某个语言的筛选或空状态字眼不对,不影响数据;只改语言包的值和一处英文兜底,可直接撤回。
- 无
## What changes
- `detail.streamActivity` (the stream's events chip): zh-Hans and
zh-Hant 「事件」, en `Events`, and each other pack's own word for events: de
`Ereignisse`, es `Eventos`, fr `Événements`, ja `イベント`, ko `이벤트`, pt-BR
`Eventos`, ru `События`, ar `الأحداث`. The row reads 「全部 · 事件 · 讨论 ·
变更」. What the chip holds is unchanged (ruling 6649643659 on #30074,
option C).
- zh-Hans and zh-Hant only, the rest of the stream takes the tab's word:
`detail.noActivity` 「暂无动态」 / 「暫無動態」 (the panel's one empty state, drawn
under every chip), `detail.activity` 「动态」 / 「動態」 (now equal to
`detail.timeline`, as in the other nine packs),
`detail.activityAccessDenied`, `detail.activityLoadFailed` and
`detail.filterActivity` say 动态. The other packs keep those four values.
- `RecordActivityTimeline.tsx`: the events chip's in-code English
fallback follows the pack (`'Events'`); comments naming the chip row
updated there and in `recordTimelineStream.ts`.
- Values only: no key added, renamed or removed. zh-Hant matches what
`gen:zh-hant` writes (the generator left the pack unchanged after the
edit).
Read first, by risk:
1. `ui/packages/i18n/src/locales/zh-Hans.ts` — the six `detail` values.
2. `ui/packages/i18n/src/locales/en.ts` — `streamActivity: 'Events'`.
3. `ui/packages/i18n/src/__tests__/timelineFilterWording-36148.test.ts`
— the new pins.
Two-minute verification: `pnpm --dir ui exec vitest run
packages/i18n/src/__tests__/timelineFilterWording-36148.test.ts` from
the repo root; expect 16 passed.
## Tests
- New `timelineFilterWording-36148.test.ts` (i18n): in zh-Hans and
zh-Hant no string the stream draws (title, chips, empty, access-denied,
load-failed, filter label) says 活动 / 活動, and the chip, empty state and
title read 事件 / 暂无动态 / 动态; en names the chip Events; in every pack the
events chip differs from the tab word, the stream title and the
field-history chip.
- Old pins updated to the ruled words: `ActivityTimeline.i18n.test.tsx`
(zh empty state), `ActivityTimeline.remainingLiterals.i18n.test.tsx` (zh
card title, whole zh card text, chip group label),
`detail-landmark-aria-i18n-4645.test.tsx` (zh landmark name).
- Ablation (one-off, not kept): zh-Hans `streamActivity` set back to
「活动」 on disk after the commit: 2 failed / 14 passed ("no string the
stream draws says 活动", "the chip reads 事件 …"); restored with `git
checkout HEAD --`, 16 passed.
## Acceptance notes
- Done-when, measured live: hotcrm (18.6.0 server, `pnpm dev` on a fresh
database) with this branch's Console source (Vite, `DEV_PROXY_TARGET` to
the hotcrm server), a zh-CN browser, admin user, a seeded lead. The
record tab row reads 「线索 · 客户 · 活动 · 活动参与者 · 任务 · 营销活动成员 2 · 动态 2」 and
the stream heads 「动态 (2)」. Every 活动 on the page is one of hotcrm's own
labels (the `crm_event` tab and nav entry, 活动参与者, 营销活动成员, 销售活动). On this
page the 动态 tab is a slotted page's `record:chatter`, which since #36221
lists the system history alone, so no chip row draws there; the chips
and empty state are pinned by the tests above rather than by this page.
- Out of the claim's declared surface (locale packs):
`ui/packages/plugin-detail/src/RecordActivityTimeline.tsx` (the en
fallback, named by the ruling),
`ui/packages/plugin-detail/src/recordTimelineStream.ts` (comments only)
and three plugin-detail pin tests. None is a seat-1 hot file.
- Out of the claim's declared surface, added at `dd26af31`:
`ui/packages/components/src/renderers/layout/containers.tsx`,
`KNOWN_LABEL_DICT` `Activity` 「活动」/「活動」 → 「动态」/「動態」, with
`@object-ui/components` in the changeset. Why: it is the page-tab
strip's own copy of the label, read ahead of the pack, so without it an
authored `Activity` tab kept 活动 and
`page-tabs-builtin-label-i18n-4645.test.tsx` went red on `12a825da`
(Test UI 4/16). Ruling 7074372050 item 3 sets an authored `Activity` tab
to 动态, the same word as `detail.timeline`. Claim amended on #36148 for
this file and `RecordActivityTimeline.tsx`.
- Residual (stated, not a defect): in zh an `Activity` tab and the
`Activity stream` tab both read 动态. Both draw on one strip only when a
page author writes both labels. Measured: the synthesized record page
writes only `Activity stream` (`buildDefaultPageSchema.ts:1094`); no
authored `Activity` page tab in `examples/**` or hotcrm (the
`'Activity'` hits are an object label and a nav group). The equality is
the ruling's choice (item 3).
- Not changed, measured: `useDetailTranslation.ts` has no
`detail.streamActivity` default, so there is no second English fallback
for the chip.
## Verification
Readings at head `12a825da`, taken under `scripts/pm/os-verify-lock.sh`
(shared box).
<details><summary>Packages (green)</summary>
- `pnpm --dir ui exec vitest run packages/i18n/`: Test Files 106 passed
(106); Tests 1978 passed, 13 skipped.
- `pnpm --dir ui exec vitest run packages/plugin-detail/` before the pin
updates: 4 failed in the two `ActivityTimeline` i18n files (old zh
strings), 405 files passed; after the updates those two files: 20 passed
(20).
- `pnpm --filter @object-ui/i18n run type-check` (both projects): exit
0. `eslint` on the 10 touched TS files: 0 errors (one pre-existing
`react-refresh` warning at `RecordActivityTimeline.tsx:263`, an
untouched line).
- `node ui/packages/i18n/scripts/gen-zh-hant.mjs`: no file changed.
</details>
<details><summary>Derived gates</summary>
- `node scripts/pm/dispatch-gates.mjs --commands` derived 41 commands
for this diff; all 41 ran and exited 0, among them `check:nul-bytes`,
`check:published-files`, `check:cross-package-test-inputs`,
`check:test-source-alias`, `check:type-check-coverage`,
`check:type-check-debt` (0 entries re-measured, none above its number),
`check-sdui-manifest`, `check-adr-0087-registration --base origin/main`,
`check-empty-changeset --base origin/main`, `check-changeset-no-major
--base origin/main` and `pnpm --dir ui exec vitest run scripts/` (Test
Files 172 passed, 2 skipped; Tests 5122 passed, 2 skipped).
- `--ran` reconciliation: 41 derived, 41 run, 0 NOT-MEASURED, 0 UNRUN,
every line carrying its exit code.
- `node scripts/pm/overlap-check.mjs
--branch=claude/project-thread-r2g68m`: VERDICT clean against
origin/main and the three open PRs that share the locale files (#36295,
#36288, #36223).
- Type-check lanes, `check:i18n` (its prerequisite is the CLI build
closure; this diff touches no `translations/*.generated.ts`) and the
repo-wide lint are CI's.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5oHi42qJhgAop8CaLs)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01FEkQ5oHi42qJhgAop8CaLs
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent bd22740 commit b3bcfef
19 files changed
Lines changed: 126 additions & 35 deletions
File tree
- .changeset
- ui/packages
- components/src/renderers/layout
- i18n/src
- __tests__
- locales
- plugin-detail/src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1828 | 1828 | | |
1829 | 1829 | | |
1830 | 1830 | | |
1831 | | - | |
| 1831 | + | |
1832 | 1832 | | |
1833 | 1833 | | |
1834 | 1834 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1619 | 1619 | | |
1620 | 1620 | | |
1621 | 1621 | | |
1622 | | - | |
| 1622 | + | |
1623 | 1623 | | |
1624 | 1624 | | |
1625 | 1625 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1821 | 1821 | | |
1822 | 1822 | | |
1823 | 1823 | | |
1824 | | - | |
| 1824 | + | |
1825 | 1825 | | |
1826 | 1826 | | |
1827 | 1827 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1671 | 1671 | | |
1672 | 1672 | | |
1673 | 1673 | | |
1674 | | - | |
| 1674 | + | |
1675 | 1675 | | |
1676 | 1676 | | |
1677 | 1677 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1674 | 1674 | | |
1675 | 1675 | | |
1676 | 1676 | | |
1677 | | - | |
| 1677 | + | |
1678 | 1678 | | |
1679 | 1679 | | |
1680 | 1680 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1418 | 1418 | | |
1419 | 1419 | | |
1420 | 1420 | | |
1421 | | - | |
| 1421 | + | |
1422 | 1422 | | |
1423 | 1423 | | |
1424 | 1424 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1619 | 1619 | | |
1620 | 1620 | | |
1621 | 1621 | | |
1622 | | - | |
| 1622 | + | |
1623 | 1623 | | |
1624 | 1624 | | |
1625 | 1625 | | |
| |||
0 commit comments