summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Bauer <gb@hugo.westfalen.de>2005-10-14 23:47:35 +0000
committerGeorg Bauer <gb@hugo.westfalen.de>2005-10-14 23:47:35 +0000
commite02e1e4f49873e6cfb45725dd082e8060f1be5df (patch)
tree3b317eea8714908d187bd980536bf218bd5dba78
parentcde24debb7c91b7ace343f215e0cb8585470fdaa (diff)
i18n: fixed a bug with Python 2.3 support (double encoding of stuff)
git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@875 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/utils/translation.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/django/utils/translation.py b/django/utils/translation.py
index 5c648ae3c0..f3e6aedd0d 100644
--- a/django/utils/translation.py
+++ b/django/utils/translation.py
@@ -76,16 +76,12 @@ class DjangoTranslation23(DjangoTranslation):
"""
def gettext(self, msgid):
- res = DjangoTranslation.gettext(self, msgid)
- if self.charset() != self.django_output_charset:
- res = res.decode(self.charset()).encode(self.django_output_charset)
- return res
+ res = self.ugettext(msgid)
+ return res.encode(self.django_output_charset)
def ngettext(self, msgid1, msgid2, n):
- res = DjangoTranslation.ngettext(self, msgid1, msgid2, n)
- if self.charset() != self.django_output_charset:
- res = res.decode(self.charset()).encode(self.django_output_charset)
- return res
+ res = self.ungettext(msgid1, msgid2, n)
+ return res.encode(self.django_output_charset)
def translation(appname, language):
"""