summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2020-04-10 20:37:22 +0300
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-04-15 11:44:35 +0200
commitf516f6753d87d963c06953c60e6ad56112c191be (patch)
tree68cc52cc6774920059c581cf7d7663a22863a74c /solenv
parent3cd3ae30217a80449799d7d9426c3756c572712e (diff)
Handle desktop files with multiline entries.
This fixes a regression mentioned e.g. here: https://bugs.documentfoundation.org/show_bug.cgi?id=130911#c6 Change-Id: Ic1a826ba933b8387d39aa25245095f27b0237801 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92050 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/bin/desktop-translate.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/solenv/bin/desktop-translate.py b/solenv/bin/desktop-translate.py
index 3ae49ae576ee..6d5c074de7b0 100644
--- a/solenv/bin/desktop-translate.py
+++ b/solenv/bin/desktop-translate.py
@@ -74,13 +74,15 @@ for line in source:
if locale != line:
# replace en-US with en
- locale.replace('en-US', 'en')
+ locale = locale.replace('en-US', 'en')
# use just anything inside the ""
- value = value.strip()
assert(value[0] == '"')
- assert(value[-1] == '"')
- value = value[1:-1]
+ # Some entries span multiple lines.
+ # An entry will always end on a double quote.
+ while not value.endswith('"\n'):
+ value += source.readline()
+ value = value[1:-2]
# replace resource placeholder
value = value.replace('%PRODUCTNAME', o.productname)