pot creation: don't ignore multiple locations/occurrences…
when making paths relative to SRCDIR
674b1c9249 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>
This commit is contained in:
+2
-3
@@ -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
|
||||
|
||||
+2
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user