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

Projects
None yet
5 participants
@sudheesh001
Contributor

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

This comment has been minimized.

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Member

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

This comment has been minimized.

Member

sils commented Feb 3, 2016

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

Extract: Add npgettext to default keywords map
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 from Added npgettext to default keywords in extraction to Extract: Add npgettext to default keywords map Feb 3, 2016

@sudheesh001

This comment has been minimized.

Contributor

sudheesh001 commented Feb 3, 2016

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

@akx

This comment has been minimized.

Member

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

Merge pull request #341 from sudheesh001/patch328
Extract: Add npgettext to default keywords map

@akx akx merged commit 3d4b03f into python-babel:master Feb 3, 2016

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

@pyup-bot pyup-bot referenced this pull request Jan 6, 2017

Merged

Update babel to 2.3.4 #13

@pyup-bot pyup-bot referenced this pull request Jan 31, 2017

Open

Update babel to 2.3.4 #28

@pyup-bot pyup-bot referenced this pull request Apr 11, 2017

Open

Initial Update #3

@pyup-bot pyup-bot referenced this pull request May 12, 2017

Closed

Initial Update #43

@pyup-bot pyup-bot referenced this pull request Jul 4, 2017

Merged

Initial Update #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment