[utils] Remove a redundant check in I18N
This commit is contained in:
parent
8a54fa704f
commit
7bdc9cc044
@ -2539,14 +2539,13 @@ class I18N(object):
|
||||
if t is not None:
|
||||
return t
|
||||
|
||||
if t is None:
|
||||
for root in get_root_dirs():
|
||||
try:
|
||||
t = gettext.translation(self.domain, os.path.join(root, 'share', 'locale'), [lang])
|
||||
if t is not None:
|
||||
break
|
||||
except (OSError, IOError): # OSError for 3.3+ and IOError otherwise
|
||||
t = None
|
||||
for root in get_root_dirs():
|
||||
try:
|
||||
t = gettext.translation(self.domain, os.path.join(root, 'share', 'locale'), [lang])
|
||||
if t is not None:
|
||||
break
|
||||
except (OSError, IOError): # OSError for 3.3+ and IOError otherwise
|
||||
t = None
|
||||
|
||||
if t is None and sys.platform == 'win32' and hasattr(sys, 'frozen'):
|
||||
locale_data_zip = _load_exe_resource('LOCALE_DATA', 'LOCALE_DATA.ZIP')
|
||||
|
Loading…
x
Reference in New Issue
Block a user