Add context as a comment string for Transifex

This commit is contained in:
Jordy Ruiz 2018-12-03 18:12:08 +01:00
parent c5af2a77a5
commit 7021a1c632

View file

@ -110,7 +110,10 @@ if __name__ == '__main__':
'Content-Transfer-Encoding': '8bit',
}
for (msg, ctxt), occurrences in l10n_src.items():
po.append(polib.POEntry(msgid=msg, msgstr="", occurrences=occurrences, msgctxt=ctxt))
commenttxt = ctxt
if(commenttxt):
commenttxt = 'Context: '+commenttxt
po.append(polib.POEntry(msgid=msg, msgstr="", occurrences=occurrences, msgctxt=ctxt, comment=commenttxt))
po.save('data/languages/base.pot')
for filename in os.listdir("data/languages"):