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

Extract: Add npgettext to default keywords map #341

Merged
merged 2 commits into from Feb 3, 2016

Conversation

@sudheesh001
Copy link
Contributor

@sudheesh001 sudheesh001 commented Feb 3, 2016

Add the npgettext as a default keyword in the keywords map.
Create test_npgettext in test_extract showing the passing tests.

Fixes #281
Fixes #328

@gitmate-bot gitmate-bot added the size/S label Feb 3, 2016
@codecov-io
Copy link

@codecov-io codecov-io commented Feb 3, 2016

Current coverage is 89.47%

Merging #341 into master will increase coverage by +0.02% as of a9a9ccd

@@            master    #341   diff @@
======================================
  Files           23      23       
  Stmts         3747    3752     +5
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit           3352    3357     +5
  Partial          0       0       
  Missed         395     395       

Review entire Coverage Diff as of a9a9ccd

Powered by Codecov. Updated on successful CI builds.

@sudheesh001
Copy link
Contributor Author

@sudheesh001 sudheesh001 commented Feb 3, 2016

@akx I hope this is the fix that's expected.
I closed #337 and opened this pull request.

@akx akx self-assigned this Feb 3, 2016
@akx
Copy link
Member

@akx akx commented Feb 3, 2016

@sudheesh001 Thanks! I'll take a closer look later tonight.

@@ -38,7 +38,8 @@
'dgettext': (2,),
'dngettext': (2, 3),
'N_': None,
'pgettext': ((1, 'c'), 2)
'pgettext': ((1, 'c'), 2),
'npgettext': ((1, 'c', 2, 3))

This comment has been minimized.

@akx

akx Feb 3, 2016
Member

I think the tuple should be ((1, 'c'), 2, 3)?

I.e. that the first argument is context and 2 and 3 are messages.

@@ -60,6 +60,15 @@ def test_nested_comments(self):
['TRANSLATORS:'], {}))
self.assertEqual([(1, 'ngettext', (u'pylon', u'pylons', None), [])],
messages)
buf = BytesIO(b"""\

This comment has been minimized.

@akx

akx Feb 3, 2016
Member

These tests are nice enough, but can you move them to another function, def test_npgettext(self): for instance? :)

@@ -131,6 +140,17 @@ def test_multiline(self):
self.assertEqual([(1, 'ngettext', (u'pylon', u'pylons', None), []),
(3, 'ngettext', (u'elvis', u'elvises', None), [])],
messages)
buf = BytesIO(b"""\

This comment has been minimized.

@akx

akx Feb 3, 2016
Member

These tests are nice enough, but can you move them to another function, def test_npgettext(self): for instance? :)

@sils
Copy link
Member

@sils sils commented Feb 3, 2016

@sudheesh001 also the same commit message guidelines apply here too (although they're not that strictly enforced)

Add the npgettext as a default keyword in the keywords map.
Create test_npgettext in test_extract showing the passing tests.

Fixes #281
Fixes #328
@sudheesh001 sudheesh001 changed the title Added npgettext to default keywords in extraction Extract: Add npgettext to default keywords map Feb 3, 2016
@sudheesh001
Copy link
Contributor Author

@sudheesh001 sudheesh001 commented Feb 3, 2016

@akx @sils1297 I hope i've fixed it, i've rebased and updated this PR.

@akx
Copy link
Member

@akx akx commented Feb 3, 2016

This looks good!

Thank you for the patch, @sudheesh001 !

akx added a commit that referenced this pull request Feb 3, 2016
Extract: Add npgettext to default keywords map
@akx akx merged commit 3d4b03f into python-babel:master Feb 3, 2016
5 of 6 checks passed
5 of 6 checks passed
review/gitmate/manual This commit needs review.
Details
codecov/patch 100.00% of diff hit (target 80.00%)
Details
codecov/project 89.47% (+0.02%) compared to edd83c4 at 89.45%
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
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