Skip to content

[UiTranslations] Pluralize the pagination results count - #398

Open
Rafikooo wants to merge 1 commit into
Sylius:mainfrom
Rafikooo:fix/fr-pagination-plural
Open

Rafikooo wants to merge 1 commit into
Sylius:mainfrom
Rafikooo:fix/fr-pagination-plural

Conversation

@Rafikooo

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 fr/en get 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

Captured with the Symfony translator against the changed files. The other locales keep a single form: with no | the extra parameter changes nothing for them, so they can add a plural later.

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 ?

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.

2 participants