mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
makemessages now requires a configured Django
This commit is contained in:
parent
066283a11d
commit
ebdfd656b4
@ -22,6 +22,8 @@ import os
|
|||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from subprocess import PIPE, Popen, call
|
from subprocess import PIPE, Popen, call
|
||||||
|
|
||||||
|
import django
|
||||||
|
from django.conf import settings
|
||||||
from django.core.management import call_command
|
from django.core.management import call_command
|
||||||
|
|
||||||
HAVE_JS = ['admin']
|
HAVE_JS = ['admin']
|
||||||
@ -83,6 +85,8 @@ def update_catalogs(resources=None, languages=None):
|
|||||||
Update the en/LC_MESSAGES/django.po (main and contrib) files with
|
Update the en/LC_MESSAGES/django.po (main and contrib) files with
|
||||||
new/updated translatable strings.
|
new/updated translatable strings.
|
||||||
"""
|
"""
|
||||||
|
settings.configure()
|
||||||
|
django.setup()
|
||||||
if resources is not None:
|
if resources is not None:
|
||||||
print("`update_catalogs` will always process all resources.")
|
print("`update_catalogs` will always process all resources.")
|
||||||
contrib_dirs = _get_locale_dirs(None, include_core=False)
|
contrib_dirs = _get_locale_dirs(None, include_core=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user