[dev-v5][Paginator] Add missing localizable strings #4672
Open
[dev-v5][Paginator] Add missing localizable strings #4672
Conversation
Unit Tests
Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 98.9%
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves FluentPaginator localization by replacing the hardcoded default summary text with resource-based strings that vary based on the total item count (none/singular/plural), and updates documentation and tests accordingly (Fix #4658).
Changes:
- Updated
FluentPaginatordefault summary rendering to use localized resources for 0/1/many items. - Added new paginator summary resource keys to
LanguageResource.resxand documented them in the demo docs. - Added/updated bUnit tests and verified HTML snapshots to cover the new summary behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Core/Components/Pagination/FluentPaginator.razor | Switches default summary text to localized strings depending on item count. |
| src/Core/Localization/LanguageResource.resx | Adds new paginator summary localization keys. |
| examples/Demo/FluentUI.Demo.Client/Documentation/Components/Paginator/FluentPaginatorPage.md | Documents the paginator localization keys, including the new summary keys. |
| tests/Core/Components/Paginator/FluentPaginatorTests.razor | Adds tests validating summary output for 0/1/many items using default localization values. |
| tests/Core/Components/Paginator/*.verified.razor.html | Updates snapshots to match new summary markup/output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
This pull request enhances the
FluentPaginatorcomponent by improving its localization support for summary item text and updating related documentation and tests. The changes ensure that the paginator's summary correctly adapts to different item counts (none, one, or many) and that all summary strings are localizable.Fix #4658
Localization improvements:
FluentPaginator.razorto use localized resources based on the item count.Paginator_SummaryItem,Paginator_SummaryItems,Paginator_SummaryNoItems) inLanguageResource.resx.Testing updates:
FluentPaginatorTests.razorto verify correct summary text rendering for zero, one, and multiple items, ensuring localization works as intended.