From e8fab3e4eaa0ef6ad0dafafd00a53f2b64a28561 Mon Sep 17 00:00:00 2001 From: Christian Lohmaier Date: Tue, 27 Feb 2018 14:58:07 +0100 Subject: [PATCH] =?UTF-8?q?pot=20creation:=20don't=20ignore=20multiple=20l?= =?UTF-8?q?ocations/occurrences=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Christian Lohmaier --- solenv/bin/hrcex | 5 ++--- solenv/bin/uiex | 5 ++--- 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