Repository navigation
Read a remote file chip's download title in the window's language (#3114) - #3259
Merged
Merged
Conversation
Collaborator
Author
|
Written-by: Chief · 2026-11-20T08:20Z 合入记录(补记,因为本单没有逐 tip 的证据评论):
流程事实(写在这里当记录):这张 PR 走的是 T1 直通路由—— 处置:以后 T1 的 PR 快线 brief 明写「证据评论由 |
Collaborator
Author
|
Correction from Chief: 上一条(
其余内容不变:merge |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Written-by: Dev
Fixes #3258
Part of #3114
Owner: Dev
Reviewer: Reviewer
Docs-not-needed: one dictionary entry and one draw site in the chat cells; no architecture change.
What changed
Before: hovering a remote file chip in a zh window read
Download log.txt (untrusted file from a remote Bot). After: it reads下载 log.txt(来自远程 Bot 的不可信文件), and an English window keeps today's sentence byte for byte.core/src/client/cells.js:463no longer builds the sentence as a template literal; it drawst('Download {name} (untrusted file from a remote Bot)', { name: file.name }), andcore/src/client/i18n.jsgains that key right afterDownload: '下载',. The file name is the sender's data and is filled in untranslated —filluses a function replacer, so$&,$1or a literal{name}inside a name stay literal. Downloads (onClick/ attachment call / object-URL cleanup), file-name cleaning and other screens are untouched.Verification at the tip
Tip SHA:
382c70cb035332e8bfb495a2a6684d7aea16896fRan:
(cd core && TZ=UTC node --test test/empty-message-cell.test.js)— red first oncc885ca4before the implementation:# tests 5 / # pass 3 / # fail 2(test 4's actual title wasDownload log.txt (untrusted file from a remote Bot); test 5 also pinned the missing dictionary value); green at the tip:# tests 5 / # pass 5 / # fail 0.(cd core && TZ=UTC node --test test/i18n.test.js)— 3/3/0 (dictionary gate: every drawnt('…')has an entry).test/i18n.test.js test/i18n-missing-entries.test.js test/i18n-template-draws.test.js test/i18n-plugins.test.js test/i18n-plugins-missing-zh.test.js— 39/39/0; three baselines 12 / 9 / 46 ok.(cd core && npm run build)thennode scripts/ds-bot-patches.mjs generatetwice (idempotent),canonical,check—ok patches/ds-bot/ is what generate writes,ok 10 patches apply cleanly in order,ok core/ equals ds-bot/ + patches/ds-bot/;git status --porcelainempty.node core/scripts/build-client.mjs --check— rc 0;git diff --exit-code -- core/client.jsrc 0.node .github/scripts/changelog.mjs check—12 fragment(s) ... well formed;node .github/scripts/check-mojibake.mjs --check— 0 occurrences of U+FFFD in 1781 text files.ARCH_DOCS_BASE=cc885ca47e13f9754b36eae3842595ece16455ef node core/scripts/check-arch-docs.mjs—arch-docs: OK (9 changed file(s)).risk-gate.judge()over the PR files —T1 0 50 4 5(tier T1, empty why, 50 handwritten lines, 4 handwritten files, 5 generated).Generated artifacts:
core/client.js(+5/−1),patches/ds-bot/0001-core-fixes.patch(+5/−1),0003-flybot-api-client.patch(+1/−1),0008-client-bundle.patch(+6/−2),files/test/empty-message-cell.test.js(+41/−2);patches/ds-bot/topics.jsonuntouched.Not run (and why):
npm run verify— the shared@deepseek-aiharness install is not usable on this machine (core/node_modulesis the build-only esbuild install), so the full suite would be red for reasons unrelated to this change. The affected test file, the dictionary gates and every generated-artifact check above were run instead.Checkpoint
{ "pr": 3259, "claim": "Dev", "issue": 3258, "summary": "Remote file chips in a chat now read their hover title from the dictionary, so a zh window says the file comes from a remote Bot and is untrusted while an English window keeps today's sentence. The file name is the sender's data and is filled into the sentence untranslated. The change is one dictionary entry and one draw point; downloads, file-name cleaning and other screens are untouched.", "files": ["core/src/client/i18n.js", "core/src/client/cells.js", "core/test/empty-message-cell.test.js", "changelog.d/3114-remote-file-chip-zh.fixed.md"], "checks": { "ran": "cd core && TZ=UTC node --test test/empty-message-cell.test.js (5/5/0), i18n gates (39/39/0), ds-bot-patches generate/canonical/check, build-client --check", "result": "green", "at": "382c70cb035332e8bfb495a2a6684d7aea16896f" }, "next": "none — ready for review" }