Skip to content
This repository was archived by the owner on Feb 27, 2019. It is now read-only.

Commit faca9a7

Browse files
committed
Merge pull request #49 from willkg/dev-languages-fix
Fix DEV_LANGUAGES
2 parents 2e845d5 + 6bd39f4 commit faca9a7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

funfactory/settings_base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
# testing the localization on the dev server.
9090
import glob
9191
import itertools
92+
DEV_LANGUAGES = None
9293
try:
9394
DEV_LANGUAGES = [
9495
os.path.basename(loc).replace('_', '-')
@@ -97,6 +98,11 @@
9798
if (os.path.isdir(loc) and os.path.basename(loc) != 'templates')
9899
]
99100
except OSError:
101+
pass
102+
103+
# If the locale/ directory isn't there or it's empty, we make sure that
104+
# we always have at least 'en-US'.
105+
if not DEV_LANGUAGES:
100106
DEV_LANGUAGES = ('en-US',)
101107

102108
# On stage/prod, the list of accepted locales is manually maintained. Only

0 commit comments

Comments
 (0)