mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	[1.7.x] Set compile messages options as class variable
Refs #18714. Same logic as options for makemessages commands.
Backport of 3a435a057 from master.
			
			
This commit is contained in:
		| @@ -37,7 +37,9 @@ class Command(BaseCommand): | |||||||
|  |  | ||||||
|     requires_system_checks = False |     requires_system_checks = False | ||||||
|     leave_locale_alone = True |     leave_locale_alone = True | ||||||
|  |  | ||||||
|     program = 'msgfmt' |     program = 'msgfmt' | ||||||
|  |     program_options = ['--check-format'] | ||||||
|  |  | ||||||
|     def handle(self, **options): |     def handle(self, **options): | ||||||
|         locale = options.get('locale') |         locale = options.get('locale') | ||||||
| @@ -92,7 +94,7 @@ class Command(BaseCommand): | |||||||
|                                   "writable location. mo files will not be updated/created." % dirpath) |                                   "writable location. mo files will not be updated/created." % dirpath) | ||||||
|                 return |                 return | ||||||
|  |  | ||||||
|             args = [self.program, '--check-format', '-o', |             args = [self.program] + self.program_options + ['-o', | ||||||
|                     npath(base_path + '.mo'), npath(base_path + '.po')] |                     npath(base_path + '.mo'), npath(base_path + '.po')] | ||||||
|             output, errors, status = popen_wrapper(args) |             output, errors, status = popen_wrapper(args) | ||||||
|             if status: |             if status: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user