solenv/bin/hrcex |    5 ++---
 solenv/bin/uiex  |    5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit e8fab3e4eaa0ef6ad0dafafd00a53f2b64a28561
Author: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
Date:   Tue Feb 27 14:58:07 2018 +0100

    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+libreoff...@googlemail.com>
    Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to