Repository navigation
[ShadcnAdminUi] Pass %count% to the pagination results count translation - #419
Merged
Merged
Conversation
camilleislasse
approved these changes
Nov 25, 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.
The ShadcnAdminUi grid footer shows both plural forms of the results count, e.g.:
sylius.ui.pagination.number_of_resultsis asingular|pluralmessage, and Symfony's translator only picks a form when a%count%parameter is given. The Shadcnresults_countmacro passed only%from%,%to%and%total%. BootstrapAdminUi already passes%count%and renders correctly.'%count%': paginator.nbResultsin@SyliusShadcnAdminUi/shared/helper/pagination.html.twig, like BootstrapAdminUi.PaginationMacroTest, which renders the macro and checks both the plural and the singular form. It fails without the fix.%count%-based plural form, and no other Shadcn template is affected.Example (test app,
frlocale): before,Affichage de 11 à 20 sur 25 élément|Affichage de 11 à 20 sur 25 éléments; after,Affichage de 11 à 20 sur 25 éléments.BC: none. The macro's signature is unchanged; only the rendered text is fixed.