aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/globals.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/globals.py')
-rw-r--r--mediagoblin/globals.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/mediagoblin/globals.py b/mediagoblin/globals.py
index 59a94558..80d1f01d 100644
--- a/mediagoblin/globals.py
+++ b/mediagoblin/globals.py
@@ -2,6 +2,9 @@
In some places, we need to access the database, public_store, queue_store
"""
+import gettext
+import pkg_resources
+
#############################
# General mediagoblin globals
#############################
@@ -16,6 +19,12 @@ database = None
public_store = None
queue_store = None
+# gettext
+translations = gettext.find(
+ 'mediagoblin',
+ pkg_resources.resource_filename(
+ 'mediagoblin', 'translations'), ['en'])
+
def setup_globals(**kwargs):
from mediagoblin import globals as mg_globals