summaryrefslogtreecommitdiff
path: root/django/templatetags
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2017-01-26 20:58:33 +0100
committerClaude Paroz <claude@2xlibre.net>2017-02-07 09:04:04 +0100
commitc651331b34b7c3841c126959e6e52879bc6f0834 (patch)
tree3f93aeb92fc91dcc61649b46d9f26f7aaaff978b /django/templatetags
parent4353640ea9495d58fabd0357253b82de3b069408 (diff)
Converted usage of ugettext* functions to their gettext* aliases
Thanks Tim Graham for the review.
Diffstat (limited to 'django/templatetags')
-rw-r--r--django/templatetags/i18n.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/django/templatetags/i18n.py b/django/templatetags/i18n.py
index 456c5071ac..8627bf4331 100644
--- a/django/templatetags/i18n.py
+++ b/django/templatetags/i18n.py
@@ -13,7 +13,7 @@ class GetAvailableLanguagesNode(Node):
self.variable = variable
def render(self, context):
- context[self.variable] = [(k, translation.ugettext(v)) for k, v in settings.LANGUAGES]
+ context[self.variable] = [(k, translation.gettext(v)) for k, v in settings.LANGUAGES]
return ''
@@ -142,13 +142,13 @@ class BlockTranslateNode(Node):
result = translation.npgettext(message_context, singular,
plural, count)
else:
- result = translation.ungettext(singular, plural, count)
+ result = translation.ngettext(singular, plural, count)
vars.extend(plural_vars)
else:
if message_context:
result = translation.pgettext(message_context, singular)
else:
- result = translation.ugettext(singular)
+ result = translation.gettext(singular)
default_value = context.template.engine.string_if_invalid
def render_value(key):
@@ -267,7 +267,7 @@ def language_name(lang_code):
@register.filter
def language_name_translated(lang_code):
english_name = translation.get_language_info(lang_code)['name']
- return translation.ugettext(english_name)
+ return translation.gettext(english_name)
@register.filter