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

Flask-Babel=0.10.0 breaks cyrillic translations for ngettext #92

Closed
georgthegreat opened this issue May 16, 2016 · 3 comments
Closed

Flask-Babel=0.10.0 breaks cyrillic translations for ngettext #92

georgthegreat opened this issue May 16, 2016 · 3 comments

Comments

@georgthegreat
Copy link

georgthegreat commented May 16, 2016

Even if the formula for nplurals returns 2, ngettext uses 1st template for substitution.

Everything returns to normal upon reverting back to 0.9.

Here is the MWE: https://github.com/georgthegreat/mwe

Run it using make debug (you have to setup virtualenv using provided requirements.txt).
Open you browser using http://localhost:5000
The result with Flask-Babel==0.9.0 is:

Format according to rule #0 using locale=ru: 1
Format according to rule #1 using locale=ru: 3
Format according to rule #2 using locale=ru: 8

The result with Flask-Babel==0.10.0 is:

Format according to rule #0 using locale=ru: 1
Format according to rule #1 using locale=ru: 3
Format according to rule #1 using locale=ru: 8

Third line differs and this is the bug introduced.

@TkTech
Copy link
Contributor

TkTech commented May 22, 2016

Thank you for the ticket, I'm taking a look at this.

TkTech added a commit that referenced this issue May 26, 2016
@TkTech
Copy link
Contributor

TkTech commented May 26, 2016

So that required diving into the cpython and babel gettext implementations. Fun times.

@georgthegreat give the master branch a try.

@TkTech TkTech closed this as completed May 27, 2016
@georgthegreat
Copy link
Author

Thanks!
I've checked version 0.11.1 - works fine for me.

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