From 3a435a057c691bf9d5936766f54c5f9bd01be176 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Wed, 23 Apr 2014 15:13:15 +0200 Subject: [PATCH] Set compile messages options as class variable Refs #18714. Same logic as options for makemessages commands. --- django/core/management/commands/compilemessages.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/django/core/management/commands/compilemessages.py b/django/core/management/commands/compilemessages.py index 0e55a28888..eaba797aad 100644 --- a/django/core/management/commands/compilemessages.py +++ b/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 @@ class Command(BaseCommand): "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: