Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on group action confirmation, when num of elements is over 4 #904

Closed
timurib opened this issue Jul 26, 2012 · 4 comments
Closed

Error on group action confirmation, when num of elements is over 4 #904

timurib opened this issue Jul 26, 2012 · 4 comments

Comments

@timurib
Copy link

timurib commented Jul 26, 2012

I get this exception when I choose over 4 elements in list and call group action (delete)

An exception has been thrown during the rendering of a template ("Unable to choose a translation for "Вы действительно хотите произвести выбранное действие для данных элементов?|Вы действительно хотите произвести выбранное действие для %count% выбранных элементов?" with locale "ru". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %count% apples").") in SonataAdminBundle:CRUD:batch_confirmation.html.twig at line 37.

@stof
Copy link
Contributor

stof commented Jul 26, 2012

This is because the Russian translation is wrong: pluralizing the message does not require 2 alternatives (as in English) but 3. and btw, the logic used to select the right alternative can be found in the translator component

@timurib
Copy link
Author

timurib commented Jul 26, 2012

Both message variants in exception message —

Вы действительно хотите произвести выбранное действие для данных элементов?
Вы действительно хотите произвести выбранное действие для %count% выбранных элементов?

— is correct (for 5 or more elements).

Sorry, but i don't understand why this exception is thrown. What mean «Double check that this translation has the correct plural options»?

@stof
Copy link
Contributor

stof commented Jul 26, 2012

@timurib the message available in the exception has 2 variantes. Russian needs 3 variantes (some of them may be the same for a particular message eventually)

@timurib
Copy link
Author

timurib commented Jul 27, 2012

thanks @stof

fixed

@timurib timurib closed this as completed Jul 31, 2012
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

No branches or pull requests

2 participants