summaryrefslogtreecommitdiffstats
path: root/deluge/i18n
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2019-06-11 11:30:55 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2019-06-11 12:35:04 +0100
commitdff778ceebcbc4cc648c543183ff72295beb2f32 (patch)
tree7f44ec359d77511c0312d5e1de865f7c27655971 /deluge/i18n
parentbdadd2b515fbeea6d9a59adeaf3ec6e00ff1988f (diff)
downloaddeluge-dff778ceebcbc4cc648c543183ff72295beb2f32.tar.gz
deluge-dff778ceebcbc4cc648c543183ff72295beb2f32.tar.bz2
deluge-dff778ceebcbc4cc648c543183ff72295beb2f32.zip
[i18n] Try loading intl.dll on Windows
Diffstat (limited to 'deluge/i18n')
-rw-r--r--deluge/i18n/util.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/deluge/i18n/util.py b/deluge/i18n/util.py
index eddd003aa..bd002f7a2 100644
--- a/deluge/i18n/util.py
+++ b/deluge/i18n/util.py
@@ -119,7 +119,18 @@ def setup_translation():
libintl = None
if deluge.common.windows_check():
- libintl = ctypes.cdll.LoadLibrary('libintl-8.dll')
+ for intl in ('libintl-8.dll', 'intl.dll'):
+ try:
+ libintl = ctypes.cdll.LoadLibrary(intl)
+ except OSError as ex:
+ exception = ex
+ else:
+ break
+ finally:
+ if not libintl:
+ log.error('Unable to initialize gettext/locale!')
+ log.error(exception)
+ setup_mock_translation()
elif deluge.common.osx_check():
libintl = ctypes.cdll.LoadLibrary('libintl.dylib')