summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2018-02-27 14:58:07 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2018-02-27 15:02:52 +0100
commite8fab3e4eaa0ef6ad0dafafd00a53f2b64a28561 (patch)
tree9cecba3f355c4b11c95b8ba764bdc9ff28636b87 /solenv
parent35fc4527210ed4b4faee1802ad23bc8da619a2d0 (diff)
pot creation: don't ignore multiple locations/occurrences…
when making paths relative to SRCDIR 674b1c924966b4a3b6027509a6ab682e7c5aaaea as well as the code before ignored multiple locations in po file Change-Id: Idf5c5ca99d0ec8272e669621e132d7a495ceaff8 Reviewed-on: https://gerrit.libreoffice.org/50439 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'solenv')
-rwxr-xr-xsolenv/bin/hrcex5
-rwxr-xr-xsolenv/bin/uiex5
2 files changed, 4 insertions, 6 deletions
diff --git a/solenv/bin/hrcex b/solenv/bin/hrcex
index 8e897ea1fca3..5d5fffd486d6 100755
--- a/solenv/bin/hrcex
+++ b/solenv/bin/hrcex
@@ -29,7 +29,6 @@ with open(ofile, "a") as output:
for entry in po:
keyid = entry.msgctxt + '|' + entry.msgid
print >> output, '#. ' + polib.genKeyId(keyid)
- location = entry.occurrences[0][0]
- location = os.path.relpath(location, os.environ['SRCDIR'])
- entry.occurrences[0] = location, entry.occurrences[0][1]
+ for i, occurrence in enumerate(entry.occurrences):
+ entry.occurrences[i] = os.path.relpath(occurrence[0], os.environ['SRCDIR']), occurrence[1]
print >> output, entry
diff --git a/solenv/bin/uiex b/solenv/bin/uiex
index bade6149c382..c9b00b2e062c 100755
--- a/solenv/bin/uiex
+++ b/solenv/bin/uiex
@@ -29,7 +29,6 @@ with open(ofile, "a") as output:
for entry in po:
keyid = entry.msgctxt + '|' + entry.msgid
print >> output, '#. ' + polib.genKeyId(keyid)
- location = entry.occurrences[0][0]
- location = os.path.relpath(location, os.environ['SRCDIR'])
- entry.occurrences[0] = location, entry.occurrences[0][1]
+ for i, occurrence in enumerate(entry.occurrences):
+ entry.occurrences[i] = os.path.relpath(occurrence[0], os.environ['SRCDIR']), occurrence[1]
print >> output, entry