fix(prompts): localize web report item labels for English mode#410
Open
nankingjing wants to merge 4 commits into
Open
fix(prompts): localize web report item labels for English mode#410nankingjing wants to merge 4 commits into
nankingjing wants to merge 4 commits into
Conversation
Author
|
Reviewed — itemLabels i18n is cleanly structured, covers all label keys and the empty/no-content messages. Ready for review. |
Author
|
Re-reviewed and fixed the section header spacing: the Chinese |
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.
Problem
buildWebReportPromptinsrc/prompts.tsuses hardcoded Chinese labels for item fields, regardless of thelangparameter. When English reports are generated (lang="en"), the prompt leaks Chinese text:分类,发布/更新,内容节选,未知暂无可供分析的内容(...)This happens inside the
siteSectionsbuilder (lines 593-606), which runs before the language-branching return statement. Thelangparameter is available but not consulted for these strings.Fix
Add English-localized strings for the three affected locations, guarded by the
langparameter:(mode, no content available for analysis.)Category/Published/Updated/Unknown/Excerptwhenlang="en"(...)for EnglishVerification
npx tsx): before fix, English output contained Chinese characters; after fix, clean English.lang="zh"path.npx tsc --noEmitpasses (verified locally).