diff options
Diffstat (limited to 'mediagoblin/mg_globals.py')
-rw-r--r-- | mediagoblin/mg_globals.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mediagoblin/mg_globals.py b/mediagoblin/mg_globals.py index 3bd2070d..fffa1dda 100644 --- a/mediagoblin/mg_globals.py +++ b/mediagoblin/mg_globals.py @@ -19,6 +19,7 @@ In some places, we need to access the database, public_store, queue_store import gettext import pkg_resources +import threading ############################# @@ -41,8 +42,11 @@ queue_store = None # A WorkBenchManager workbench_manager = None +# A thread-local scope +thread_scope = threading.local() + # gettext -translations = gettext.find( +thread_scope.translations = gettext.find( 'mediagoblin', pkg_resources.resource_filename( 'mediagoblin', 'translations'), ['en']) |