Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.7.x] Set compile messages options as class variable

Refs #18714. Same logic as options for makemessages commands.
Backport of 3a435a0 from master.
  • Loading branch information...
commit 0424c84d541d7b0e23783c33c2db495543e3bd47 1 parent 07235ae
@claudep claudep authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 django/core/management/commands/compilemessages.py
View
4 django/core/management/commands/compilemessages.py
@@ -37,7 +37,9 @@ class Command(BaseCommand):
requires_system_checks = False
leave_locale_alone = True
+
program = 'msgfmt'
+ program_options = ['--check-format']
def handle(self, **options):
locale = options.get('locale')
@@ -92,7 +94,7 @@ def compile_messages(self, locations):
"writable location. mo files will not be updated/created." % dirpath)
return
- args = [self.program, '--check-format', '-o',
+ args = [self.program] + self.program_options + ['-o',
npath(base_path + '.mo'), npath(base_path + '.po')]
output, errors, status = popen_wrapper(args)
if status:
Please sign in to comment.
Something went wrong with that request. Please try again.