Commits

DasIch  committed 4f15e4f

Use .gettext() instead of .ugettext() on python3

  • Participants
  • Parent commits c6f1df3

Comments (0)

Files changed (1)

File sphinx/locale/__init__.py

     :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
+import sys
 import gettext
 import UserString
 
 
 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