Removed a Python 2.4 try/except no longer necessary in django.utils.translation.trans_real
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15934 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
0fdabe885b
commit
b4f0c1a775
|
@ -68,13 +68,7 @@ class DjangoTranslation(gettext_module.GNUTranslations):
|
||||||
"""
|
"""
|
||||||
def __init__(self, *args, **kw):
|
def __init__(self, *args, **kw):
|
||||||
gettext_module.GNUTranslations.__init__(self, *args, **kw)
|
gettext_module.GNUTranslations.__init__(self, *args, **kw)
|
||||||
# Starting with Python 2.4, there's a function to define
|
|
||||||
# the output charset. Before 2.4, the output charset is
|
|
||||||
# identical with the translation file charset.
|
|
||||||
try:
|
|
||||||
self.set_output_charset('utf-8')
|
self.set_output_charset('utf-8')
|
||||||
except AttributeError:
|
|
||||||
pass
|
|
||||||
self.django_output_charset = 'utf-8'
|
self.django_output_charset = 'utf-8'
|
||||||
self.__language = '??'
|
self.__language = '??'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue