another adaption for ts2appinfo

This commit is contained in:
Juergen E. Fischer 2018-09-30 18:32:49 +02:00
parent bb0c629355
commit 9af3c49651

View File

@ -96,7 +96,11 @@ for line in lines:
t = line.strip()[len(prefix) + 1:]
for lang in strings[t]:
f.write("{}[{}]={}\n".format(prefix, lang, strings[t][lang].decode("utf-8")))
l = "{}[{}]={}\n".format(prefix, lang, strings[t][lang])
try:
f.write(l.decode("utf-8"))
except AttributeError:
f.write(l)
elif line.startswith(prefix + "["):
skip = True