mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-13 04:54:23 +00:00
Fix locale stuff on OS X
This commit is contained in:
parent
ff6906997b
commit
759bb8cc5d
@ -113,7 +113,7 @@ class Core(
|
||||
self.register_introspection_functions()
|
||||
|
||||
# Initialize gettext
|
||||
if deluge.common.windows_check():
|
||||
if deluge.common.windows_check() or deluge.common.osx_check():
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
else:
|
||||
locale.setlocale(locale.LC_MESSAGES, '')
|
||||
|
@ -125,7 +125,7 @@ class GtkUI:
|
||||
gobject.threads_init()
|
||||
|
||||
# Initialize gettext
|
||||
if deluge.common.windows_check():
|
||||
if deluge.common.windows_check() or deluge.common.osx_check():
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
else:
|
||||
locale.setlocale(locale.LC_MESSAGES, '')
|
||||
|
@ -31,6 +31,7 @@ import web
|
||||
import random
|
||||
import gettext
|
||||
import locale
|
||||
import deluge.common
|
||||
from deluge.configmanager import ConfigManager
|
||||
import pkg_resources
|
||||
from deluge.ui.client import sclient
|
||||
@ -38,11 +39,15 @@ import components
|
||||
from deluge.log import LOG as log
|
||||
|
||||
# Initialize gettext
|
||||
if deluge.common.windows_check() or deluge.common.osx_check():
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
else:
|
||||
locale.setlocale(locale.LC_MESSAGES, '')
|
||||
locale.bindtextdomain("deluge",
|
||||
pkg_resources.resource_filename(
|
||||
"deluge", "i18n"))
|
||||
locale.textdomain("deluge")
|
||||
|
||||
gettext.bindtextdomain("deluge",
|
||||
pkg_resources.resource_filename(
|
||||
"deluge", "i18n"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user