summaryrefslogtreecommitdiff
path: root/django/utils/translation/trans_null.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils/translation/trans_null.py')
-rw-r--r--django/utils/translation/trans_null.py27
1 files changed, 9 insertions, 18 deletions
diff --git a/django/utils/translation/trans_null.py b/django/utils/translation/trans_null.py
index 21097244d3..72af147351 100644
--- a/django/utils/translation/trans_null.py
+++ b/django/utils/translation/trans_null.py
@@ -3,7 +3,13 @@
# settings.USE_I18N = False can use this module rather than trans_real.py.
from django.conf import settings
-from django.utils.encoding import force_text
+
+
+def gettext(message):
+ return message
+
+
+gettext_noop = gettext_lazy = _ = gettext
def ngettext(singular, plural, number):
@@ -15,16 +21,12 @@ def ngettext(singular, plural, number):
ngettext_lazy = ngettext
-def ungettext(singular, plural, number):
- return force_text(ngettext(singular, plural, number))
-
-
def pgettext(context, message):
- return ugettext(message)
+ return gettext(message)
def npgettext(context, singular, plural, number):
- return ungettext(singular, plural, number)
+ return ngettext(singular, plural, number)
def activate(x):
@@ -50,17 +52,6 @@ def check_for_language(x):
return True
-def gettext(message):
- return message
-
-
-def ugettext(message):
- return force_text(gettext(message))
-
-
-gettext_noop = gettext_lazy = _ = gettext
-
-
def to_locale(language):
p = language.find('-')
if p >= 0: