Skip to content
Snippets Groups Projects
Commit 0627434c authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

make plugins translation work under windows.

parent 10ca93c7
No related branches found
No related tags found
No related merge requests found
......@@ -156,6 +156,11 @@ common.configpaths.gajimpaths.init_profile(profile)
del profile
if os.name == 'nt':
plugins_locale_dir = str(os.path.join(common.configpaths.gajimpaths[
'PLUGINS_USER'], 'locale'))
libintl.bindtextdomain('gajim_plugins', plugins_locale_dir)
libintl.bind_textdomain_codeset('gajim_plugins', 'UTF-8')
class MyStderr(object):
_file = None
_error = None
......
......@@ -27,10 +27,12 @@ from common import gajim
APP = 'gajim_plugins'
plugins_locale_dir = os_path.join(gajim.PLUGINS_DIRS[1], 'locale')
locale.setlocale(locale.LC_ALL, '')
locale.bindtextdomain(APP, plugins_locale_dir)
gettext.bindtextdomain(APP, plugins_locale_dir)
gettext.textdomain(APP)
if os.name != 'nt':
locale.setlocale(locale.LC_ALL, '')
locale.bindtextdomain(APP, plugins_locale_dir)
gettext.bindtextdomain(APP, plugins_locale_dir)
gettext.textdomain(APP)
try:
t = gettext.translation(APP, plugins_locale_dir)
_ = t.gettext
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment