Repository navigation
feat(domains): 新增五个只含“不翻译”术语的内置领域(通用、游戏、编程语言、科技公司与 AI、Web3),各自预置常见站点;编程语言名同时并入“软件开发(简体中文)” - #1178
Merged
Merged
Conversation
…编程语言名同时并入“软件开发(简体中文)” - 五个领域均为 zh-CN,排在“软件开发(简体中文)”之后,共 51 条“不翻译”术语 - 一个页面只启用一个领域,github.com 等站点只命中“软件开发”,所以编程语言名也并入它 - 各内置领域的适用网址按站点名单的主域名归一语义互不命中(单测断言) - 原先假定只有一个内置领域的单测与 e2e 改按内置领域个数断言;排序类用例只留“软件开发”或预置顺序 - 版本 2.1.245 → 2.1.246
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.
问题
五份只含“不翻译”术语的词表(default / game / programming / tech / web3,共 51 条)此前只能由用户在设置页手动导入 CSV。改为随扩展内置。
修改
src/storage/builtin-domains.ts:新增五个 zh-CN 内置领域,排在“软件开发(简体中文)”之后,术语全部为“不翻译”,各自预置常见站点:domains-builtin-no-translate.test.ts,断言术语与 CSV 一致、预置站点命中对应领域,并按站点名单的主域名归一语义断言各内置领域的网址互不命中。原先假定只有一个内置领域的单测与 e2e 改为按内置领域个数断言;排序类用例只留“软件开发”,或在种子数据里预置顺序。需要留意
developer.mozilla.org实际命中整个 mozilla.org,news.ycombinator.com命中整个 ycombinator.com。pnpm check:changelog不通过,上架前需在src/changelog/data.ts补充。验证
pnpm typecheck、pnpm check:e2e-cjk通过。pnpm test:216 个文件、2636 条全部通过。