mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Use .gettext() instead of .ugettext() on python3
This commit is contained in:
parent
6af81b8506
commit
7f29904551
@ -8,6 +8,7 @@
|
||||
:copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
|
||||
:license: BSD, see LICENSE for details.
|
||||
"""
|
||||
import sys
|
||||
import gettext
|
||||
import UserString
|
||||
|
||||
@ -178,8 +179,12 @@ pairindextypes = {
|
||||
|
||||
translator = None
|
||||
|
||||
def _(message):
|
||||
return translator.ugettext(message)
|
||||
if sys.version_info >= (3, 0):
|
||||
def _(message):
|
||||
return translator.gettext(message)
|
||||
else:
|
||||
def _(message):
|
||||
return translator.ugettext(message)
|
||||
|
||||
def init(locale_dirs, language):
|
||||
global translator
|
||||
|
Loading…
Reference in New Issue
Block a user