mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Remove Python 2 monkey patch for Unicode ugettext
In Python 3, gettext always returns a Unicode text string.
This commit is contained in:
parent
30ec4b6bba
commit
90b44f4d86
@ -190,8 +190,6 @@ def init(locale_dirs, language, catalog='sphinx', namespace='general'):
|
|||||||
translator = NullTranslations()
|
translator = NullTranslations()
|
||||||
has_translation = False
|
has_translation = False
|
||||||
translators[(namespace, catalog)] = translator
|
translators[(namespace, catalog)] = translator
|
||||||
if hasattr(translator, 'ugettext'):
|
|
||||||
translator.gettext = translator.ugettext # type: ignore
|
|
||||||
return translator, has_translation
|
return translator, has_translation
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user