mirror of
https://github.com/pulb/mailnag.git
synced 2026-05-07 10:05:27 +02:00
make gettext return strings in unicode
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user