Adapt locorestrings.py for Python 3

Signed-off-by: Cosmin Humeniuc <cosmin.humeniuc@1and1.ro>
Change-Id: I0328dc4cb97aa143fc2911255817b7cc636b5bec
pull/7356/head
Cosmin Humeniuc 2023-10-02 15:00:29 +03:00 committed by Andras Timar
parent bd9266f6fa
commit 1d25188821
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
#
# This Source Code Form is subject to the terms of the Mozilla Public
@ -105,7 +105,7 @@ if __name__ == "__main__":
poFile = dir + lang + '/svtools/messages.po'
extractFromPo(poFile, ["STR_ARR_SVT_LANGUAGE_TABLE"], translations)
f = open(onlineDir + '/browser/l10n/locore/' + lang + '.json', 'w')
f = open(onlineDir + '/browser/l10n/locore/' + lang + '.json', 'w', encoding='utf-8')
f.write('{\n')
writeComma = False
@ -115,7 +115,7 @@ if __name__ == "__main__":
else:
writeComma = True
f.write(
('"' + key + '":"' + translations[key] + '"').encode('utf-8'))
('"' + key + '":"' + translations[key] + '"'))
f.write('\n}\n')