mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Fix compatibility with Windows ('u' flag not supported by open())
This commit is contained in:
parent
ce29bf8b5c
commit
8979475e13
@ -146,9 +146,12 @@ class _PluginInternationalization:
|
||||
self._loadL10nCode()
|
||||
|
||||
try:
|
||||
translationFile = open(getLocalePath(self.name, localeName, 'po'),
|
||||
'ru') # ru is the mode, not the beginning
|
||||
# of 'russian' ;)
|
||||
try:
|
||||
translationFile = open(getLocalePath(self.name,
|
||||
localeName, 'po'), 'ru')
|
||||
except ValueError: # We are using Windows
|
||||
translationFile = open(getLocalePath(self.name,
|
||||
localeName, 'po'), 'r')
|
||||
self._parse(translationFile)
|
||||
except IOError: # The translation is unavailable
|
||||
self.translations = {}
|
||||
|
Loading…
Reference in New Issue
Block a user