mirror of https://github.com/django/django.git
Fixed #20990 -- Ensured unicode paths in compilemessages
Thanks Gregoire Astruc for the report and furins for the review.
This commit is contained in:
parent
2397daab4a
commit
dffcc5e979
|
@ -6,7 +6,7 @@ from optparse import make_option
|
||||||
|
|
||||||
from django.core.management.base import BaseCommand, CommandError
|
from django.core.management.base import BaseCommand, CommandError
|
||||||
from django.core.management.utils import find_command, popen_wrapper
|
from django.core.management.utils import find_command, popen_wrapper
|
||||||
from django.utils._os import npath
|
from django.utils._os import npath, upath
|
||||||
|
|
||||||
|
|
||||||
def has_bom(fn):
|
def has_bom(fn):
|
||||||
|
@ -25,7 +25,7 @@ def compile_messages(stdout, locale=None):
|
||||||
basedirs = [os.path.join('conf', 'locale'), 'locale']
|
basedirs = [os.path.join('conf', 'locale'), 'locale']
|
||||||
if os.environ.get('DJANGO_SETTINGS_MODULE'):
|
if os.environ.get('DJANGO_SETTINGS_MODULE'):
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
basedirs.extend(settings.LOCALE_PATHS)
|
basedirs.extend([upath(path) for path in settings.LOCALE_PATHS])
|
||||||
|
|
||||||
# Gather existing directories.
|
# Gather existing directories.
|
||||||
basedirs = set(map(os.path.abspath, filter(os.path.isdir, basedirs)))
|
basedirs = set(map(os.path.abspath, filter(os.path.isdir, basedirs)))
|
||||||
|
|
Loading…
Reference in New Issue