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

Allow last_translator to be passed as an option to extract_message #1044

Merged
merged 1 commit into from Nov 28, 2023

Conversation

koldakov
Copy link
Contributor

Commit allows to pass last translator to the CLI.

For example,
pybabel extract --last-translator=test@test.test

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
Copy link
Member

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?

Copy link
Contributor Author

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.

@@ -339,6 +339,8 @@ class ExtractMessages(CommandMixin):
'Separate multiple patterns with spaces (default ".* ._")'),
('header-comment=', None,
'header comment for the catalog'),
('last-translator=', 'T',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe skip the shortname?

Suggested change
('last-translator=', 'T',
('last-translator=', None,

Copy link
Contributor Author

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.

Copy link

codecov bot commented Nov 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5dff607) 91.34% compared to head (2126403) 91.34%.

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.
📢 Have feedback on the report? Share it here.

@koldakov koldakov force-pushed the feature/propagate-last-translator branch from 4f6b2bb to fa0fe87 Compare November 27, 2023 19:11
@koldakov koldakov requested a review from akx November 27, 2023 21:00
Copy link
Member

@akx akx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@akx akx force-pushed the feature/propagate-last-translator branch from fa0fe87 to 2126403 Compare November 28, 2023 08:41
@akx akx enabled auto-merge (squash) November 28, 2023 08:42
@akx akx merged commit d4e65e2 into python-babel:master Nov 28, 2023
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants