You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Localize the remaining Chat markup for the English render - #3439
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.
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 mainee8ae6df3e3ee10af8cad63e5e7e078db4fc9bd8. 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
risk:T1Risk tier T1 (client, tests, generated files), set by the controller from the diff
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Localize the remaining Chat markup for the English render
flybot_workspace/static/chat/index.htmlhad 43 phrases with nodata-ui-*marker, sothey 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; thecatalog had no English for those phrases before.
Measured, local (not CI): the English render of
/chatcarries 231 Han charactersoutside
<script>/<style>before this change and 0 after. The Chinese render keeps thesame 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.mjsgains one assertion that renders/chatin English andfails 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/240pass, 0 fail, run on tree
14f749d49489e253a067d92aa10c2e73dddb41ef(commit
52773c4d6ece7555afbd137a6e1b4e3ae7b57988, the head of this PR), whose parent is currentmainee8ae6df3e3ee10af8cad63e5e7e078db4fc9bd8. Theflybot_workspace/staticsubtree of thatmain is still
634956966a3e1e10dac9d2a54998b73d0827be94, the same subtree the rendermeasurements 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 Chinesearia-labelvalues in.mjsmodules stay in their own slices.Related #3438.