Skip to content

Localize the remaining Chat markup for the English render - #3439

Merged
Birfy merged 2 commits into
mainfrom
dev/3438-chat-markup-en-render
Nov 29, 2026
Merged

Birfy merged 2 commits into
mainfrom
dev/3438-chat-markup-en-render

Conversation

@Birfy

@Birfy Birfy commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Localize the remaining Chat markup for the English render

flybot_workspace/static/chat/index.html had 43 phrases with no data-ui-* marker, so
they stayed Chinese in the English document: 35 leaf texts (已归档, 重命名, 恢复对话,
生成群邀请链接, the whole prompt-template dialog, the call-recording consent block, ...)
and 10 attribute values (Bot 电脑 ×3, 提示词模板 ×2, 关闭, 归档对话, 群邀请链接,
群聊待处理卡片, 私聊待处理卡片).

Marking them reuses 5 keys that already existed and adds 34 pairs to CHAT_MESSAGES; the
catalog had no English for those phrases before.

Measured, local (not CI): the English render of /chat carries 231 Han characters
outside <script>/<style> before this change and 0 after
. The Chinese render keeps the
same visible text and the same attributes; it differs only by the added data-ui-*
markers and by the content-derived asset URL hash.

tests/system_locale_chat.test.mjs gains one assertion that renders /chat in English and
fails on any surviving Chinese phrase, so the next unmarked string cannot land silently.
It fails on the base markup (231 leftovers) and passes on this commit.

Local suites on node v22.23.5, --test-concurrency=2:
tests/chat_language|chat_page|chat_reminder|system_locale|system_locale_chat = 240/240
pass, 0 fail, run on tree 14f749d49489e253a067d92aa10c2e73dddb41ef
(commit 52773c4d6ece7555afbd137a6e1b4e3ae7b57988, the head of this PR), whose parent is current main
ee8ae6df3e3ee10af8cad63e5e7e078db4fc9bd8. The flybot_workspace/static subtree of that
main is still 634956966a3e1e10dac9d2a54998b73d0827be94, the same subtree the render
measurements above were taken on, so the 231 → 0 reading carries over unchanged.

No UI surface is added or restyled: every change is a marker, a catalog pair, or a test.
Screenshots are not applicable for the same reason; the render check above is the
equivalent evidence.

Non-goals: /settings (164 text nodes, 57 attributes) and the runtime-assigned Chinese
aria-label values in .mjs modules stay in their own slices.

Related #3438.

@github-actions github-actions Bot added the risk:T1 Risk tier T1 (client, tests, generated files), set by the controller from the diff label Nov 29, 2026
@Birfy

Birfy commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator Author

Lead review — slice check for head 8c79571c8ff270e5f975491613ee6b6731098d27

Scope: the /chat markup half only — 43 unmarked Chinese phrases (35 leaf texts, 10 attribute values) marked with data-ui-*, 34 new CHAT_MESSAGES pairs, one new render assertion, plus the regenerated docs/inventory/visible-controls.json. /settings and the runtime-assigned aria-label values in .mjs modules are declared non-goals and are not in this PR.

Coordinates (read from this head, not carried over): 2 commits, 4 files, +120/−70, base main ee8ae6df3e3ee10af8cad63e5e7e078db4fc9bd8. I unpacked the codeload tarball for this head, cleared interpreter caches, and git write-tree gives 92aff11533e84609e6423ba857cf4bc8d369d057 — the same content tree QA reported.

Local readings (this machine, node v22.23.5; not CI):

  • English render of /chat, <script>/<style> stripped: 119,884 B, 0 Han characters, 0 lines.
  • A/B on the same tree, swapping only flybot_workspace/static/chat/index.html for the base blob 0f6aa33ff020a8a437271d523f656013ab030285: 118,172 B, 231 Han characters spread over 43 lines (45 contiguous runs); swapping back returns 0. So the disappearance is caused by this slice's markup, not by the renderer.
  • python3 scripts/visible_inventory.py on this head reproduces docs/inventory/visible-controls.json byte for byte and leaves the tree at 92aff115; python3 -m unittest tests.test_visible_inventory is 1/1 OK.
  • QA re-verified the same three blobs (afeb9735, d635a1fa, d70d707f) and the census test on this head; the 240/240 result for chat_language|chat_page|chat_reminder|system_locale|system_locale_chat was measured at 52773c4d and the second commit touches only the census JSON, so that reading still describes this head's code — but it is a local single-host result, not a CI result.

CI on this head (read from the check-runs API, not inferred): total_count 18 == returned 18, all completed + success, all head_sha equal to this head, no failures, no cancellations. The earlier red at 52773c4d was tests/test_visible_inventory.py::test_checked_in_census_matches_source_and_keeps_unverified_states on both Management API jobs, caused by this PR's own markers staling the checked-in census; the second commit regenerates it and both jobs are green here. That red was cleared before this PR was queued.

Rules: only Related #3438 is used; the PR body and this comment carry no closing trailer. Risk label risk:T1 was applied by the workflow, not by hand. One reviewable slice only.

Not claimed: parity with the Chinese render beyond the visible text and attributes measured above; acceptance sign-off; any coverage of /settings or runtime aria-label values.

Enqueueing this head as 8c79571c8ff270e5f975491613ee6b6731098d27.

Related #3438.

@Birfy
Birfy added this pull request to the merge queue Nov 29, 2026
Merged via the queue into main with commit 3f9b8ab Nov 29, 2026
18 checks passed
@Birfy
Birfy deleted the dev/3438-chat-markup-en-render branch November 29, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:T1 Risk tier T1 (client, tests, generated files), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant