mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 03:24:54 +00:00
[i18n] Try loading intl.dll on Windows
This commit is contained in:
parent
bdadd2b515
commit
dff778ceeb
1 changed files with 12 additions and 1 deletions
|
@ -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')
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue