-
Notifications
You must be signed in to change notification settings - Fork 460
Extract: Merge in per-format keywords and auto_comments #1243
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1243 +/- ##
==========================================
- Coverage 92.07% 92.05% -0.03%
==========================================
Files 27 27
Lines 4692 4717 +25
==========================================
+ Hits 4320 4342 +22
- Misses 372 375 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull request overview
This PR adds support for specifying per-extractor keywords and auto_comments in mapping configuration files (both .cfg and .toml formats), fixing long-standing issues #1224 and #71 where keywords and comment tags specified in configuration files were being ignored.
Key changes:
- Keywords and comment tags from mapping files are now parsed and merged with global settings during extraction
- Both
.cfg(INI-style) and.tomlconfiguration formats are supported for these options - Per-file options override/merge with global command-line options appropriately
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
babel/messages/extract.py |
Adds logic to merge per-file keywords and comment tags with global settings before extraction |
babel/messages/frontend.py |
Implements parsing of keywords and add_comments options from both CFG and TOML config formats |
tests/messages/test_toml_config.py |
Adds unit tests for parsing keywords and add_comments from TOML configurations |
tests/messages/frontend/test_extract.py |
Adds integration tests for end-to-end extraction with keywords and comments from config files |
tests/messages/data/project/issue_1224_test.py |
Test fixture with translatable strings and special comments for validation |
tests/messages/data/mapping_with_keywords_and_comments.toml |
TOML config file test fixture with keywords and add_comments options |
tests/messages/data/mapping_with_keywords.cfg |
CFG config file test fixture with keywords option |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR adds support for adding additional per-extractor keywords in addition to the default set.
Fixes #1224
Fixes #71 (yes, you read that right, a double-digit issue that had still been open)