Allow last_translator to be passed as an option to extract_message by koldakov · Pull Request #1044 · python-babel/babel
Conversation
Commit allows to pass last translator to the CLI.
For example,
pybabel extract --last-translator=test@test.test
akx requested changes Nov 27, 2023
| 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 |
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?
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.
| 'Separate multiple patterns with spaces (default ".* ._")'), | ||
| ('header-comment=', None, | ||
| 'header comment for the catalog'), | ||
| ('last-translator=', 'T', |
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, |
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 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.
akx approved these changes Nov 28, 2023
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
enabled auto-merge (squash)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters