Configure settings sooner in makemessages
As get_text_list is using translations, setup settings before calling it.
This commit is contained in:
parent
8ca3963ab2
commit
115fd140ab
|
@ -230,10 +230,6 @@ class Command(NoArgsCommand):
|
||||||
raise CommandError("Type '%s help %s' for usage information." % (
|
raise CommandError("Type '%s help %s' for usage information." % (
|
||||||
os.path.basename(sys.argv[0]), sys.argv[1]))
|
os.path.basename(sys.argv[0]), sys.argv[1]))
|
||||||
|
|
||||||
if self.verbosity > 1:
|
|
||||||
self.stdout.write('examining files with the extensions: %s\n'
|
|
||||||
% get_text_list(list(self.extensions), 'and'))
|
|
||||||
|
|
||||||
# Need to ensure that the i18n framework is enabled
|
# Need to ensure that the i18n framework is enabled
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
if settings.configured:
|
if settings.configured:
|
||||||
|
@ -241,6 +237,10 @@ class Command(NoArgsCommand):
|
||||||
else:
|
else:
|
||||||
settings.configure(USE_I18N=True)
|
settings.configure(USE_I18N=True)
|
||||||
|
|
||||||
|
if self.verbosity > 1:
|
||||||
|
self.stdout.write('examining files with the extensions: %s\n'
|
||||||
|
% get_text_list(list(self.extensions), 'and'))
|
||||||
|
|
||||||
self.invoked_for_django = False
|
self.invoked_for_django = False
|
||||||
if os.path.isdir(os.path.join('conf', 'locale')):
|
if os.path.isdir(os.path.join('conf', 'locale')):
|
||||||
localedir = os.path.abspath(os.path.join('conf', 'locale'))
|
localedir = os.path.abspath(os.path.join('conf', 'locale'))
|
||||||
|
|
Loading…
Reference in New Issue