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
This fixes #82
  • Loading branch information
muhamed-hafez committed Jul 16, 2020
1 parent e7e4265 commit 45e7175
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion babel/messages/frontend.py
Expand Up @@ -327,6 +327,8 @@ class extract_messages(Command):
'files or directories with commas(,)'), # TODO: Support repetition of this argument
('input-dirs=', None, # TODO (3.x): Remove me.
'alias for input-paths (does allow files as well as directories).'),
('header-comment=', None,
'header comment for the catelog'),
]
boolean_options = [
'no-default-keywords', 'no-location', 'omit-header', 'no-wrap',
Expand Down Expand Up @@ -366,6 +368,7 @@ def initialize_options(self):
self.add_comments = None
self.strip_comments = False
self.include_lineno = True
self.header_comment = None

def finalize_options(self):
if self.input_dirs:
Expand Down Expand Up @@ -441,7 +444,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 45e7175

Please sign in to comment.