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

Compile noninteger TR35 operands to zeroes when emitting Gettext #295

Merged
merged 4 commits into from Feb 8, 2016

Conversation

@akx akx added the bug label Dec 21, 2015
@gitmate-bot gitmate-bot added the size/M label Dec 21, 2015
@codecov-io
Copy link

@codecov-io codecov-io commented Dec 21, 2015

Current coverage is 88.47%

Merging #295 into master will increase coverage by +0.09% as of 8a1e889

@@            master    #295   diff @@
======================================
  Files           23      23       
  Stmts         3626    3635     +9
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit           3205    3216    +11
  Partial          0       0       
+ Missed         421     419     -2

Review entire Coverage Diff as of 8a1e889

Powered by Codecov. Updated on successful CI builds.

@akx akx added this to the Babel 2.3/3.0 milestone Jan 3, 2016
@akx akx force-pushed the akx:gettext-tr35-ops branch from 7b771bf to 1090e42 Jan 4, 2016
@gitmate-bot gitmate-bot added size/S and removed size/M labels Jan 4, 2016
@akx akx force-pushed the akx:gettext-tr35-ops branch from 1090e42 to e31156f Jan 22, 2016
@sils

This comment has been minimized.

Copy link
Member

@sils sils commented on 0e48c5e Jan 22, 2016

ack

@sils

This comment has been minimized.

Copy link
Member

@sils sils commented on a4ed4e0 Jan 22, 2016

ack

@akx
Copy link
Member Author

@akx akx commented Feb 3, 2016

@imankulov: If you're around, could you give this a review?

@imankulov
Copy link
Contributor

@imankulov imankulov commented Feb 8, 2016

@akx I'm sorry for delay.

I finally managed to test it, and it works as expected! Rules for Russian and other languages involving variables other than n, can be simplified, of course, but I guess this is not the goal of this PR, and they are technically correct.

That's how Russian rule looks like, for example:

nplurals=4; plural=(((((0 == 0)) && (((n % 10) >= 2 && (n % 10) <= 4))) && (!(((n % 100) >= 12 && (n % 100) <= 14)))) ? 1 : (((((0 == 0)) && (((n % 10) == 0))) || (((0 == 0)) && (((n % 10) >= 5 && (n % 10) <= 9)))) || (((0 == 0)) && (((n % 100) >= 11 && (n % 100) <= 14)))) ? 2 : ((((0 == 0)) && (((n % 10) == 1))) && (!(((n % 100) == 11)))) ? 0 : 3)

Have nothing against merging it. Thank you for the fix!

@akx
Copy link
Member Author

@akx akx commented Feb 8, 2016

Great! Yeah, expression simplification is probably a little out of scope (though I have to admit it would be interesting...)

Merging this, thank you!

akx added a commit that referenced this pull request Feb 8, 2016
Compile noninteger TR35 operands to zeroes when emitting Gettext
@akx akx merged commit d9780a6 into python-babel:master Feb 8, 2016
6 of 7 checks passed
6 of 7 checks passed
review/gitmate/manual This commit needs review.
Details
Scrutinizer 2 updated code elements
Details
codecov/patch 100.00% of diff hit (target 80.00%)
Details
codecov/project 88.47% (+0.09%) compared to 459d30f at 88.38%
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
review/gitmate/commit All is well! :)
Details
@akx akx deleted the akx:gettext-tr35-ops branch Feb 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants