-
Notifications
You must be signed in to change notification settings - Fork 453
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
Allow last_translator to be passed as an option to extract_message #1044
Allow last_translator to be passed as an option to extract_message #1044
Conversation
tests/messages/test_frontend.py
Outdated
def test_extract_cli_knows_dash_dash_last_dash_translator(): | ||
cmdinst = configure_cli_command("extract --last-translator e-mail -o foo babel") | ||
assert isinstance(cmdinst, ExtractMessages) | ||
assert cmdinst.last_translator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should presumably check that it was assigned to e-mail
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure you are right. Actually it can be not only an e-mail, fixed.
babel/messages/frontend.py
Outdated
@@ -339,6 +339,8 @@ class ExtractMessages(CommandMixin): | |||
'Separate multiple patterns with spaces (default ".* ._")'), | |||
('header-comment=', None, | |||
'header comment for the catalog'), | |||
('last-translator=', 'T', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe skip the shortname?
('last-translator=', 'T', | |
('last-translator=', None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with that. Changed.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1044 +/- ##
=======================================
Coverage 91.34% 91.34%
=======================================
Files 26 26
Lines 4415 4416 +1
=======================================
+ Hits 4033 4034 +1
Misses 382 382 ☔ View full report in Codecov by Sentry. |
4f6b2bb
to
fa0fe87
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
fa0fe87
to
2126403
Compare
Commit allows to pass last translator to the CLI.
For example,
pybabel extract [email protected]