Fix compatibility with Python 2.6 (does not support the set syntax).

This commit is contained in:
Valentin Lorentz 2014-01-26 21:13:06 +01:00
parent b026cfd197
commit eaed281de7

View File

@ -161,7 +161,7 @@ def parse(translationFile):
if len(data) == 0: # Multiline mode if len(data) == 0: # Multiline mode
step = IN_MSGSTR step = IN_MSGSTR
else: else:
translations |= {(untranslated, data)} translations |= set[((untranslated, data)])
step = WAITING_FOR_MSGID step = WAITING_FOR_MSGID
@ -172,11 +172,11 @@ def parse(translationFile):
step = WAITING_FOR_MSGID step = WAITING_FOR_MSGID
if translated == '': if translated == '':
translated = untranslated translated = untranslated
translations |= {(untranslated, data)} translations |= set[((untranslated, data)])
if step is IN_MSGSTR: if step is IN_MSGSTR:
if translated == '': if translated == '':
translated = untranslated translated = untranslated
translations |= {(untranslated, data)} translations |= set[((untranslated, data)])
return translations return translations