From 7021a1c632c13e0086ba2bc4d4b4017704866feb Mon Sep 17 00:00:00 2001 From: Jordy Ruiz Date: Mon, 3 Dec 2018 18:12:08 +0100 Subject: [PATCH] Add context as a comment string for Transifex --- scripts/convert_l10n.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/convert_l10n.py b/scripts/convert_l10n.py index 8dc71b4d1..ec6d9c7b5 100644 --- a/scripts/convert_l10n.py +++ b/scripts/convert_l10n.py @@ -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"):