Conversation
zh-TW: 补齐缺失的 93 个键(含 Error 命名空间,经 opencc 转繁体) en/vi: 新增 Error 命名空间 36 键翻译 + 补齐 3 个非 Error 缺失键 en: prune 49 个代码未引用的死键(别名键,已 verify_en_extra 校验 0 引用) src/i18n/request.ts: 落地 fallbackLocale 深合并回退(阶段1) 孤儿 key 精扫: diagnose_i18n_keys + i18n-key-check --unused(zh-CN 5646 孤儿键待清理;226 缺失含 73 嵌套误报)
从 git 历史父版本恢复 48 个键的原始中文(46 直接恢复 + 2 消歧:k_1cy20k0=新建评审、k_1wtck8n=余料)。 其余 79 个为 Dcprint 自描述英文键(cardSelected/scanQR/uvInk 等)、Common.activate/deactivate、Hr.fillMonth、SalesReturn.selectOrder,按键名+代码上下文推断中文;仅 k_1gfnr28(成本表空态)、k_sfsp66(仓库名称) 为上下文推断待复核。 验证:i18n-key-check 代码→zh-CN 真实扁平缺失键归零(剩余 73 为脚本浅校验嵌套键误报,非真实缺口);CRLF 行尾保留;JSON 可解析。
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
概要
补齐代码引用但 zh-CN 缺失的 127 个键(canonical locale 缺口),消除默认中文界面里出现的裸
Namespace.key。来源与可信度
git show <codemod提交>~1:<file>取 codemod 替换前的原始中文。含 2 个需消歧的键——k_1cy20k0=新建评审(editItem.id 三元运算 FALSE 分支)、k_1wtck8n=余料(isRem 分支)。cardSelected/scanQR/uvInk/burdened等)、Common.activate/deactivate、Hr.fillMonth、SalesReturn.selectOrder,按键名 + 代码上下文(setSuccess/setError/label/placeholder)推断。Warehouse.k_1gfnr28(成本表空态,推断“暂无成本数据”)、Warehouse.k_sfsp66(仓库设置必填 label,推断“仓库名称”)。根因
这些键由 P2 codemod (
scripts/i18n-codemod-p2.cjs) 在源码插入ts('k_xxx')/t('ns.key')调用,但写入 messages 的步骤在提交前被回退/重置,导致中文原文丢失(提交73a2e8f9含一个损坏的 PDF blob,会令git log -S的 diff 中断,需core.attributesfile=/dev/null规避)。验证
i18n-key-check代码→zh-CN 真实扁平缺失键 归零(剩余 73 条为脚本按命名空间顶层浅校验、无法识别trace.timeline.x式嵌套键的误报,非真实缺口)。messages/zh-CN.jsonCRLF 行尾保留、JSON 可解析。src/i18n/request.ts的 fallbackLocale 深合并已自动对齐。后续建议
k_1gfnr28/k_sfsp66两处推断值。scripts/i18n-key-check.mjs的浅校验 bug(识别嵌套键),使孤儿/缺失扫描准确。k_xxxxxx孤儿键(含 codemod 占位)。🤖 Generated with CodeBuddy