Repository navigation
加 AGENTS.md 和英文 README - #35
Merged
Merged
Conversation
i18n.py 新增只提醒不失败的检查:代码块数量、链接的网址或页面不同,以及一边的最近改动晚于另一边。附单元测试,CI 里跑。 Refs ModAVD/ModAVD#261
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.
改了什么
ModAVD/ModAVD#261 的一部分(只读英文的开发者还会碰到的中文)。这个仓库这次做的:
AGENTS.md和AGENTS.en.md,互相链接;对照仓库核对过目录、构建命令、scripts/和 CI 的写法。README.en.md(合并 main 时以 main 上已有的为准),与README.md互链。scripts/i18n.py新增三类只提醒、不让 CI 失败的检查:两边代码块数量不同;两边链到的网址、页面、图片不同(网址去掉#锚点,README 的中英文件名视为同一个);一边的最近改动晚于另一边(用git log -1 --format=%ct比,提示 "English page older than Chinese since <提交>" 或反过来)。新增scripts/test_i18n.py,CI 里跑。AGENTS.md、AGENTS.en.md、README、「参与开发 → 文档和本站」(中英)里写明这几项检查。新检查定为提醒,不是错误:在今天的 main 上先跑过,原有检查 0 个问题;先后提醒大约有二十几条(多是英文页后来单独修过),链接差异在把 README 中英文件名和锚点视为相同之后为 0。若定成错误,今天的 main 就过不了。
通用的参与、分支、提交、隐私和发版规矩不在这里重复,指回 ModAVD 主仓库的
AGENTS.md。测过什么
npm ci --ignore-scripts后npm run build:通过。python scripts/i18n.py:31 个中文页、31 个英文页,0 个问题。python -I -X utf8 scripts/test_i18n.py:7 个测试通过。python scripts/privacy.py .和私有规则扫描:0 个失败。还没做的
Refs ModAVD/ModAVD#261