Skip to content

Commit 3a435a0

Browse files
committed
Set compile messages options as class variable
Refs django#18714. Same logic as options for makemessages commands.
1 parent af5f688 commit 3a435a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

django/core/management/commands/compilemessages.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ class Command(BaseCommand):
3737

3838
requires_system_checks = False
3939
leave_locale_alone = True
40+
4041
program = 'msgfmt'
42+
program_options = ['--check-format']
4143

4244
def handle(self, **options):
4345
locale = options.get('locale')
@@ -92,7 +94,7 @@ def compile_messages(self, locations):
9294
"writable location. mo files will not be updated/created." % dirpath)
9395
return
9496

95-
args = [self.program, '--check-format', '-o',
97+
args = [self.program] + self.program_options + ['-o',
9698
npath(base_path + '.mo'), npath(base_path + '.po')]
9799
output, errors, status = popen_wrapper(args)
98100
if status:

0 commit comments

Comments
 (0)