make gettext return strings in unicode

This commit is contained in:
Patrick Ulbrich
2012-05-15 19:08:03 +02:00
parent 42a82b04d0
commit e57c5f6495

View File

@@ -21,12 +21,14 @@
# MA 02110-1301, USA.
#
LOCALE_DIR = './locale'
import locale
import gettext
from common.utils import PACKAGE_NAME
locale.bindtextdomain(PACKAGE_NAME, './locale')
gettext.bindtextdomain(PACKAGE_NAME, './locale')
gettext.textdomain(PACKAGE_NAME)
# bind textdomain for GTK Builder
locale.bindtextdomain(PACKAGE_NAME, LOCALE_DIR)
_ = gettext.gettext
# add gettext shortcut "_" for string translations
_ = gettext.translation(PACKAGE_NAME, LOCALE_DIR).ugettext