Skip to content

Commit

Permalink
Allow header_comment to be passed as an option to extract_message
Browse files Browse the repository at this point in the history
Fixes #82
  • Loading branch information
muhamed-hafez authored and akx committed Apr 11, 2022
1 parent 20352cc commit 7af8937
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion babel/messages/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,8 @@ class extract_messages(Command):
('ignore-dirs=', None,
'Patterns for directories to ignore when scanning for messages. '
'Separate multiple patterns with spaces (default ".* ._")'),
('header-comment=', None,
'header comment for the catalog'),
]
boolean_options = [
'no-default-keywords', 'no-location', 'omit-header', 'no-wrap',
Expand Down Expand Up @@ -394,6 +396,7 @@ def initialize_options(self):
self.strip_comments = False
self.include_lineno = True
self.ignore_dirs = None
self.header_comment = None

def finalize_options(self):
if self.input_dirs:
Expand Down Expand Up @@ -478,7 +481,8 @@ def run(self):
version=self.version,
msgid_bugs_address=self.msgid_bugs_address,
copyright_holder=self.copyright_holder,
charset=self.charset)
charset=self.charset,
header_comment=self.header_comment)

for path, method_map, options_map in mappings:
def callback(filename, method, options):
Expand Down

0 comments on commit 7af8937

Please sign in to comment.