| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
LGTM, thanks!
Sorry, something went wrong.
When a gettext call had a nested function call on a new line, the extract function would use that nested call's line number when extracting the terms for the gettext call. The reason is that we set the line number on any encounter of an opening parenthesis after a gettext keyword. This does not work if either we have a nested call, or our first term starts on a new line. This commit fixes that by only setting the line number when we encounter the first argument inside a gettext call. Existing tests were adapted to work according to `xgettext` with regards to the line numbers. Fixes python-babel#1123
Codecov ReportAll modified and coverable lines are covered by tests ✅ Additional details and impacted files @@ Coverage Diff @@
## master #1126 +/- ##
=======================================
Coverage 91.30% 91.31%
=======================================
Files 27 27
Lines 4610 4615 +5
=======================================
+ Hits 4209 4214 +5
Misses 401 401
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
When a gettext call had a nested function call on a new line, the extract function would use that nested call's line number when extracting the terms for the gettext call.
The reason is that we set the line number on any encounter of an opening parenthesis after a gettext keyword. This does not work if either we have a nested call, or our first term starts on a new line.
This commit fixes that by only setting the line number when we encounter the first argument inside a gettext call.
Existing tests were adapted to work according to xgettext with regards to the line numbers.
Fixes #1123