Fix encoding
This commit is contained in:
parent
4c03ee943f
commit
790add3911
1 changed files with 3 additions and 3 deletions
|
@ -65,11 +65,11 @@ for lang in languages:
|
||||||
'resources',
|
'resources',
|
||||||
'language',
|
'language',
|
||||||
'resource.language.%s' % lang,
|
'resource.language.%s' % lang,
|
||||||
'strings.po'), 'rb') as f:
|
'strings.po'), 'r', encoding='utf-8') as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
if line.strip() in addon:
|
if line.strip() in addon:
|
||||||
msg = ''
|
msg = ''
|
||||||
key = str(line.strip())
|
key = line.strip()
|
||||||
# Advance to the line msgstr ""
|
# Advance to the line msgstr ""
|
||||||
part = ''
|
part = ''
|
||||||
while not part.startswith('msgstr'):
|
while not part.startswith('msgstr'):
|
||||||
|
@ -83,7 +83,7 @@ for lang in languages:
|
||||||
print(msg)
|
print(msg)
|
||||||
etree.SubElement(root,
|
etree.SubElement(root,
|
||||||
addon[key],
|
addon[key],
|
||||||
attrib={'lang': lang}).text = msg.decode('utf-8')
|
attrib={'lang': lang}).text = msg
|
||||||
except IOError:
|
except IOError:
|
||||||
print('Missing file %s' % os.path.join(PKC_dir,
|
print('Missing file %s' % os.path.join(PKC_dir,
|
||||||
'resources',
|
'resources',
|
||||||
|
|
Loading…
Reference in a new issue