fix-correct-FIRST_NOTICE.md-locale-path-resolution (#5083)#5082
Merged
Soulter merged 2 commits intoAstrBotDevs:masterfrom Feb 13, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Hey - 我在这里给出了一些高层面的反馈:
- 在处理
zh语言环境时,与其完全替换掉FIRST_NOTICE.zh-CN.md这一后备文件,不如考虑在保留FIRST_NOTICE.zh-CN.md的同时,额外追加FIRST_NOTICE.md。这样既能兼容当前的文件名,又能在将来支持 zh-CN 特定的文件。 - 当前逻辑可能会两次将
FIRST_NOTICE.md添加到candidates(一次是在处理zh时,另一次是在通用的extend中),可以考虑对候选列表去重,或重构追加逻辑,以避免重复的文件系统检查。
给 AI Agent 的提示
Please address the comments from this code review:
## Overall Comments
- When handling the `zh` locale, instead of replacing the `FIRST_NOTICE.zh-CN.md` fallback entirely, consider appending `FIRST_NOTICE.md` in addition to `FIRST_NOTICE.zh-CN.md` so that future zh-CN-specific files can be supported while still working with the current filename.
- The current logic can add `FIRST_NOTICE.md` to `candidates` twice (once for `zh` and once in the common `extend`), so consider de-duplicating the candidate list or restructuring the appends to avoid redundant filesystem checks.帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进之后的评审。
Original comment in English
Hey - I've left some high level feedback:
- When handling the
zhlocale, instead of replacing theFIRST_NOTICE.zh-CN.mdfallback entirely, consider appendingFIRST_NOTICE.mdin addition toFIRST_NOTICE.zh-CN.mdso that future zh-CN-specific files can be supported while still working with the current filename. - The current logic can add
FIRST_NOTICE.mdtocandidatestwice (once forzhand once in the commonextend), so consider de-duplicating the candidate list or restructuring the appends to avoid redundant filesystem checks.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- When handling the `zh` locale, instead of replacing the `FIRST_NOTICE.zh-CN.md` fallback entirely, consider appending `FIRST_NOTICE.md` in addition to `FIRST_NOTICE.zh-CN.md` so that future zh-CN-specific files can be supported while still working with the current filename.
- The current logic can add `FIRST_NOTICE.md` to `candidates` twice (once for `zh` and once in the common `extend`), so consider de-duplicating the candidate list or restructuring the appends to avoid redundant filesystem checks.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Contributor
Author
|
这个只是对现在的i18n问题做改动 |
Soulter
approved these changes
Feb 13, 2026
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.
修理的问题是首次页面的文件目录名称问题
v4.16.0访问会出现i18n选择了中文,这个是英文的情况
Fixes #5083
Modifications / 改动点
以下是代码错误的位置
其中
的名称错误了,在文件中为FIRST_NOTICE.md
Screenshots or Test Results / 运行截图或测试结果
首次页面出现这个问题我无法进行测试
这个问题是个很简单的更改,这个修改方案应该是有效的
Checklist / 检查清单
requirements.txt和pyproject.toml文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations inrequirements.txtandpyproject.toml.Summary by Sourcery
Bug Fixes:
FIRST_NOTICE文件路径,使其指向已有的FIRST_NOTICE.md文件,而不是不存在的zh-CN变体。Original summary in English
Summary by Sourcery
Bug Fixes: