summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorFlorian Apolloner <florian@apolloner.eu>2013-05-18 17:36:31 +0200
committerFlorian Apolloner <florian@apolloner.eu>2013-05-18 17:36:31 +0200
commitacd0bb39df5c9ca486e49ec55ae34538242ce071 (patch)
treeef18917134be3e2d3e4bb5192ad0bd8445ed4ca3 /django/utils
parent710c59bf9b09ee5afae2e555c30e13ed59fa4583 (diff)
Fixed #14894 -- Ensure that activating a translation doesn't run into threading issues.
Thanks to maxbublis for the report and sergeykolosov for the patch.
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/translation/trans_real.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py
index f7b1524085..26be0ed729 100644
--- a/django/utils/translation/trans_real.py
+++ b/django/utils/translation/trans_real.py
@@ -140,7 +140,7 @@ def translation(language):
# doesn't affect en-gb), even though they will both use the core "en"
# translation. So we have to subvert Python's internal gettext caching.
base_lang = lambda x: x.split('-', 1)[0]
- if base_lang(lang) in [base_lang(trans) for trans in _translations]:
+ if base_lang(lang) in [base_lang(trans) for trans in list(_translations)]:
res._info = res._info.copy()
res._catalog = res._catalog.copy()