Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR localizes the Html2Pdf sample’s FAQ and PdfOptions documentation by replacing hard-coded Chinese text in the Razor component with Localizer-backed strings and adding the corresponding keys to the locale JSON files for en-US and zh-CN. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Pull request overview
Adds localization support for the “Common issues” / troubleshooting sample text in the Html2Pdf demo page, moving previously hardcoded Chinese strings into the localization JSON resources.
Changes:
- Localized the “Common issues” section titles, answers, and tips in
Html2Pdfs.razor. - Added corresponding resource keys for the Html2Pdf sample to both
en-US.jsonandzh-CN.json.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/BootstrapBlazor.Server/Locales/zh-CN.json | Adds zh-CN resource strings for Html2Pdf “Common issues” and PdfOptions tips. |
| src/BootstrapBlazor.Server/Locales/en-US.json | Adds en-US resource strings for Html2Pdf “Common issues” and PdfOptions tips. |
| src/BootstrapBlazor.Server/Components/Samples/Html2Pdfs.razor | Replaces hardcoded sample text with Localizer[...] lookups (using MarkupString where HTML is embedded). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- For the new localized strings, consider using a consistent pattern for
MarkupStringvs plain strings (e.g., only wrapping keys that actually contain HTML) to make the markup intent clearer and reduce unnecessary casting. - Double-check that all newly introduced localization keys (CommonIssuesTitle, Issue1Title, Issue1Answer, Issue2Title, Issue3*, Issue4*, PdfOptions*) are present and aligned in both
en-US.jsonandzh-CN.jsonto avoid runtime missing-key issues. - Where you now reference
Localizer[...]directly inside<p>and<li>elements, ensure the underlying resource text does not contain HTML; if it might, consider usingMarkupStringthere too for consistency with other localized blocks.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- For the new localized strings, consider using a consistent pattern for `MarkupString` vs plain strings (e.g., only wrapping keys that actually contain HTML) to make the markup intent clearer and reduce unnecessary casting.
- Double-check that all newly introduced localization keys (CommonIssuesTitle, Issue1Title, Issue1Answer, Issue2Title, Issue3*, Issue4*, PdfOptions*) are present and aligned in both `en-US.json` and `zh-CN.json` to avoid runtime missing-key issues.
- Where you now reference `Localizer[...]` directly inside `<p>` and `<li>` elements, ensure the underlying resource text does not contain HTML; if it might, consider using `MarkupString` there too for consistency with other localized blocks.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8080 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 766 766
Lines 34171 34171
Branches 4700 4700
=========================================
Hits 34171 34171
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #8079
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Documentation: