Open translate language file as utf8
This commit is contained in:
parent
a3ef3b34e1
commit
56d68ce161
1 changed files with 1 additions and 3 deletions
|
@ -58,7 +58,7 @@ class Translate(dict):
|
|||
self.clear()
|
||||
elif os.path.isfile(self.lang_file):
|
||||
try:
|
||||
data = json.load(open(self.lang_file))
|
||||
data = json.load(open(self.lang_file, encoding="utf8"))
|
||||
logging.debug("Loaded translate file: %s (%s entries)" % (self.lang_file, len(data)))
|
||||
except Exception as err:
|
||||
logging.error("Error loading translate file %s: %s" % (self.lang_file, err))
|
||||
|
@ -102,8 +102,6 @@ class Translate(dict):
|
|||
if not translate_table:
|
||||
translate_table = self
|
||||
|
||||
data = data.decode("utf8")
|
||||
|
||||
patterns = []
|
||||
for key, val in list(translate_table.items()):
|
||||
if key.startswith("_("): # Problematic string: only match if called between _(" ") function
|
||||
|
|
Loading…
Reference in a new issue