@@ -339,6 +339,8 @@ class ExtractMessages(CommandMixin):
339
339
'Separate multiple patterns with spaces (default ".* ._")' ),
340
340
('header-comment=' , None ,
341
341
'header comment for the catalog' ),
342
+ ('last-translator=' , None ,
343
+ 'set the name and email of the last translator in output' ),
342
344
]
343
345
boolean_options = [
344
346
'no-default-keywords' , 'no-location' , 'omit-header' , 'no-wrap' ,
@@ -355,6 +357,7 @@ class ExtractMessages(CommandMixin):
355
357
'mapping-file' : ('--mapping' ,),
356
358
'output-file' : ('--output' ,),
357
359
'strip-comments' : ('--strip-comment-tags' ,),
360
+ 'last-translator' : ('--last-translator' ,),
358
361
}
359
362
option_choices = {
360
363
'add-location' : ('full' , 'file' , 'never' ),
@@ -384,6 +387,7 @@ def initialize_options(self):
384
387
self .include_lineno = True
385
388
self .ignore_dirs = None
386
389
self .header_comment = None
390
+ self .last_translator = None
387
391
388
392
def finalize_options (self ):
389
393
if self .input_dirs :
@@ -488,7 +492,8 @@ def run(self):
488
492
msgid_bugs_address = self .msgid_bugs_address ,
489
493
copyright_holder = self .copyright_holder ,
490
494
charset = self .charset ,
491
- header_comment = (self .header_comment or DEFAULT_HEADER ))
495
+ header_comment = (self .header_comment or DEFAULT_HEADER ),
496
+ last_translator = self .last_translator )
492
497
493
498
for path , method_map , options_map in mappings :
494
499
callback = self ._build_callback (path )
0 commit comments