Repository navigation
i18n: 自报段标签 chip 三语适配(zh-CN 逐字还原 / zh-TW OpenCC 派生 / en 英文) - #221
Draft
steponeerror wants to merge 1 commit into
Draft
steponeerror wants to merge 1 commit into
steponeerror wants to merge 1 commit into
Conversation
标签列 chip 与证人行 native chip 经 localizeScannerLabel 跟 locale 走; zh-CN 逐字还原后端冻结字面量,zh-TW OpenCC 派生,en 英文; 计数形/未知形状原样透传。vitest 441/441 + tsc + build。
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.
自报段标签 chip 多语言适配 / Vendor self-declared-range chips localized
问题 / Problem
昨天合入的厂商自报段 chip(PR #220)与证人行 native chip(scanner_ranges 批 #216)渲染的是后端冻结的简体数据「研究扫描 · X(自报段)」,在任何语言界面都直出简体——zh-TW 界面里整页繁体唯独这颗 chip 是简体,en 界面则是一颗中文 chip。
变更 / Change
frontend/src/components/threatDisplay.ts新增localizeScannerLabel(label, t):命中冻结模式^研究扫描 · (.+)\(自报段\)$→ 拆厂商名经 i18n 键class.scannerSelfDeclared重组;不命中原样透传。ResultTable.tsx)、展开面板证人行 native chip(SourceDetailRow.tsx)。zh-CN = "研究扫描 · {vendor}(自报段)"(插值结果与后端原字面量逐字一致,scanner_ranges: 厂商自报段接入 + eval 真值层排除 + 自报段标签呈现 #216 契约不变),en = "Research scanning · {vendor} (self-declared range)",zh-TW 由 OpenCC 从 zh-CN 派生。顺带审计(用户令:检查最近 PR 是否都适配了多语言)
验证 / Validation
ensureOpenCC()同步就绪)+ tsc + build 绿。