Merge/Comment not working win32 translation code
This commit is contained in:
parent
9b0be66b50
commit
a6bda765eb
|
@ -22,6 +22,7 @@ import sys
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
import signal
|
import signal
|
||||||
|
import locale
|
||||||
from gi.repository import GLib, Gio, Gtk
|
from gi.repository import GLib, Gio, Gtk
|
||||||
from common import i18n
|
from common import i18n
|
||||||
from common import logging_helpers
|
from common import logging_helpers
|
||||||
|
@ -122,8 +123,9 @@ class GajimApplication(Gtk.Application):
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
import locale
|
|
||||||
import gettext
|
import gettext
|
||||||
|
# needed for docutils
|
||||||
|
sys.path.append('.')
|
||||||
APP = 'gajim'
|
APP = 'gajim'
|
||||||
DIR = '../po'
|
DIR = '../po'
|
||||||
lang, enc = locale.getdefaultlocale()
|
lang, enc = locale.getdefaultlocale()
|
||||||
|
@ -132,6 +134,8 @@ class GajimApplication(Gtk.Application):
|
||||||
gettext.textdomain(APP)
|
gettext.textdomain(APP)
|
||||||
gettext.install(APP, DIR)
|
gettext.install(APP, DIR)
|
||||||
|
|
||||||
|
# This is for Windows translation which is currently not
|
||||||
|
# working on GTK 3.18.9
|
||||||
# locale.setlocale(locale.LC_ALL, '')
|
# locale.setlocale(locale.LC_ALL, '')
|
||||||
# import ctypes
|
# import ctypes
|
||||||
# import ctypes.util
|
# import ctypes.util
|
||||||
|
@ -145,16 +149,8 @@ class GajimApplication(Gtk.Application):
|
||||||
# libintl = ctypes.cdll.LoadLibrary(libintl_path)
|
# libintl = ctypes.cdll.LoadLibrary(libintl_path)
|
||||||
# libintl.bindtextdomain(APP, DIR)
|
# libintl.bindtextdomain(APP, DIR)
|
||||||
# libintl.bind_textdomain_codeset(APP, 'UTF-8')
|
# libintl.bind_textdomain_codeset(APP, 'UTF-8')
|
||||||
|
# plugins_locale_dir = os.path.join(common.configpaths.gajimpaths[
|
||||||
if os.name == 'nt':
|
# 'PLUGINS_USER'], 'locale').encode(locale.getpreferredencoding())
|
||||||
# needed for docutils
|
|
||||||
sys.path.append('.')
|
|
||||||
|
|
||||||
import locale
|
|
||||||
|
|
||||||
if os.name == 'nt':
|
|
||||||
plugins_locale_dir = os.path.join(common.configpaths.gajimpaths[
|
|
||||||
'PLUGINS_USER'], 'locale').encode(locale.getpreferredencoding())
|
|
||||||
# libintl.bindtextdomain('gajim_plugins', plugins_locale_dir)
|
# libintl.bindtextdomain('gajim_plugins', plugins_locale_dir)
|
||||||
# libintl.bind_textdomain_codeset('gajim_plugins', 'UTF-8')
|
# libintl.bind_textdomain_codeset('gajim_plugins', 'UTF-8')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue