diff options
author | Andras Timar <andras.timar@collabora.com> | 2018-11-09 21:55:23 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-11-09 21:59:50 +0100 |
commit | 92f3d628829153c1925338aad49ef482df342bee (patch) | |
tree | 36e76abdd033dae4cea483bc0532cceb906a1db7 /scripts | |
parent | Fix JSON syntax error (diff) | |
download | online-92f3d628829153c1925338aad49ef482df342bee.tar.gz online-92f3d628829153c1925338aad49ef482df342bee.zip |
escape double quotes when generating json files from po files
Change-Id: Iacddaf919161b6843dac2190a5072af8a25e8251
Reviewed-on: https://gerrit.libreoffice.org/63218
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/unocommands.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/unocommands.py b/scripts/unocommands.py index d73a5bb9b2..27fca0d846 100755 --- a/scripts/unocommands.py +++ b/scripts/unocommands.py @@ -305,7 +305,7 @@ def writeTranslations(onlineDir, translationsDir, strings): f.write(',\n') else: writeComma = True - f.write(('"' + key + '":"' + translations[key] + '"').encode('utf-8')) + f.write(('"' + key.replace('"','\\\"') + '":"' + translations[key].replace('"','\\\"') + '"').encode('utf-8')) f.write('\n}\n') |