aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/mg_globals.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2013-03-01 16:29:22 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2013-03-01 16:29:22 -0600
commited6344009abb31326acabe95449aaa449f66f4b4 (patch)
tree03d65052d550b890074dde3c18857371be974f5c /mediagoblin/mg_globals.py
parent5c754fdaeeddb1bbeff165bbecb77e33b75b3c7d (diff)
parentb7a3798e1806eb52a244088fb600376ff25e0de9 (diff)
downloadmediagoblin-ed6344009abb31326acabe95449aaa449f66f4b4.tar.lz
mediagoblin-ed6344009abb31326acabe95449aaa449f66f4b4.tar.xz
mediagoblin-ed6344009abb31326acabe95449aaa449f66f4b4.zip
Merge branch 'master' into joar-skip_transcoding
Conflicts: mediagoblin/config_spec.ini
Diffstat (limited to 'mediagoblin/mg_globals.py')
-rw-r--r--mediagoblin/mg_globals.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/mediagoblin/mg_globals.py b/mediagoblin/mg_globals.py
index 8c7c64c2..e4b94bdc 100644
--- a/mediagoblin/mg_globals.py
+++ b/mediagoblin/mg_globals.py
@@ -42,8 +42,13 @@ workbench_manager = None
# A thread-local scope
thread_scope = threading.local()
-# gettext (this will be populated on demand with gettext.Translations)
-thread_scope.translations = None
+# gettext (this needs to default to English so it doesn't break
+# in case we're running a script without the app like
+# ./bin/gmg theme assetlink)
+thread_scope.translations = gettext.translation(
+ 'mediagoblin',
+ pkg_resources.resource_filename(
+ 'mediagoblin', 'i18n'), ['en'], fallback=True)
# app and global config objects
app_config = None