mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #25720 -- Made gettext() return bytestring on Python 2 if input is bytestring.
This is consistent with the behavior of Django 1.7.x and earlier.
This commit is contained in:
committed by
Tim Graham
parent
4c593eaa5f
commit
d3e3703a15
@@ -103,6 +103,7 @@ class DjangoTranslation(gettext_module.GNUTranslations):
|
||||
def __init__(self, language):
|
||||
"""Create a GNUTranslations() using many locale directories"""
|
||||
gettext_module.GNUTranslations.__init__(self)
|
||||
self.set_output_charset('utf-8') # For Python 2 gettext() (#25720)
|
||||
|
||||
self.__language = language
|
||||
self.__to_language = to_language(language)
|
||||
|
||||
Reference in New Issue
Block a user