if PY3:
from email.mime.text import MIMEText
from urllib import parse as urlparse
+ # TODO(berker): Rename to gettext and ungettext instead?
ugettext = mg_globals.thread_scope.translations.gettext
ungettext = mg_globals.thread_scope.translations.ngettext
else:
from babel.support import LazyProxy
from mediagoblin import mg_globals
+from mediagoblin._compat import ugettext, ungettext
###################
# Translation tools
The reason we can't have a global ugettext method is because
mg_globals gets swapped out by the application per-request.
"""
- return mg_globals.thread_scope.translations.ugettext(
- *args, **kwargs)
+ return ugettext(*args, **kwargs)
def pass_to_ungettext(*args, **kwargs):
"""
The reason we can't have a global ugettext method is because
mg_globals gets swapped out by the application per-request.
"""
- return mg_globals.thread_scope.translations.ungettext(
- *args, **kwargs)
+ return ungettext(*args, **kwargs)
def lazy_pass_to_ugettext(*args, **kwargs):