summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2013-11-15 14:39:23 +0100
committerClaude Paroz <claude@2xlibre.net>2013-11-15 15:30:22 +0100
commit115fd140ab9522e6ac688f389db681d79562df74 (patch)
tree8650d39692f9f3cc174ea2b1275979de8aaa38d9
parent8ca3963ab2a2cafb224f04759ec2d6c493fdb99d (diff)
Configure settings sooner in makemessages
As get_text_list is using translations, setup settings before calling it.
-rw-r--r--django/core/management/commands/makemessages.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py
index b0e040fe55..eb7405c04f 100644
--- a/django/core/management/commands/makemessages.py
+++ b/django/core/management/commands/makemessages.py
@@ -230,10 +230,6 @@ class Command(NoArgsCommand):
raise CommandError("Type '%s help %s' for usage information." % (
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
from django.conf import settings
if settings.configured:
@@ -241,6 +237,10 @@ class Command(NoArgsCommand):
else:
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
if os.path.isdir(os.path.join('conf', 'locale')):
localedir = os.path.abspath(os.path.join('conf', 'locale'))