Skip to content

[UiTranslations] Pluralize the pagination results count - #398

Merged
loic425 merged 1 commit into
Sylius:mainfrom
Rafikooo:fix/fr-pagination-plural
Nov 23, 2026
Merged

loic425 merged 1 commit into
Sylius:mainfrom
Rafikooo:fix/fr-pagination-plural

Conversation

@Rafikooo

@Rafikooo Rafikooo commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

The grid footer never picks a plural form, because pagination.html.twig passes only %total% and the Symfony translator selects the form by %count%. On top of that the French string left "items" untranslated. The template now also passes %count%, and every locale that has the key gets both forms.

Locale Before (1 / 6 results) After
fr Affiche de 1 à 1 sur 1 items / … sur 6 items Affichage de 1 à 1 sur 1 élément / … sur 6 éléments
en Showing 1 to 1 of 1 entries / … of 6 entries Showing 1 to 1 of 1 entry / … of 6 entries
de Zeigt 1 - 1 von 1 Einträgen / … von 6 Einträgen Zeigt 1 - 1 von 1 Eintrag / … von 6 Einträgen
nl Toont 1 tot 1 van 1 resultaten / … van 6 resultaten Toont 1 tot 1 van 1 resultaat / … van 6 resultaten

Captured with the Symfony translator against the changed files. es and pl don't define the key and fall back to en.

Heads-up: Sylius core's AdminBundle has its own copy of this template and of the key and doesn't use these packages, so it's not affected.

@Prometee

Copy link
Copy Markdown
Contributor

Does the other translations have to be updated ?

@loic425

loic425 commented Nov 18, 2026

Copy link
Copy Markdown
Member

@Rafikooo We have more translation on UiTranslations package (https://github.com/Sylius/Stack/tree/main/src/UiTranslations/translations).
Could you update your PR please?

@Rafikooo
Rafikooo force-pushed the fix/fr-pagination-plural branch from b34e0b2 to b53e6fb Compare November 18, 2026 08:45
@loic425
loic425 merged commit 3bd8903 into Sylius:main Nov 23, 2026
7 checks passed
@loic425

loic425 commented Nov 23, 2026

Copy link
Copy Markdown
Member

Thx @Rafikooo 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants