From c29041b95050eff08bd331ca69531e19b7c7419c Mon Sep 17 00:00:00 2001 From: AbhishekJ Date: Fri, 25 Sep 2020 11:34:23 +0530 Subject: [PATCH] allow header_comment to be passed as an option to extract_message --- babel/messages/frontend.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/babel/messages/frontend.py b/babel/messages/frontend.py index 475605549..c5b29037d 100644 --- a/babel/messages/frontend.py +++ b/babel/messages/frontend.py @@ -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', @@ -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: @@ -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):