summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2017-12-16 08:59:12 +0100
committerAndras Timar <andras.timar@collabora.com>2018-01-14 13:07:20 +0100
commit674b1c924966b4a3b6027509a6ab682e7c5aaaea (patch)
treee72adf12c08ff65df701c4b3ec284bdee40fe582 /solenv
parente16668e16441406db20f2adf587a9e1fed75b9aa (diff)
Save full file path to pot files
As requested here: http://nabble.documentfoundation.org/libreoffice-l10n-Pootle-source-file-paths-not-available-anymore-td4229127.html This adds the full source file path in case of .hrc and .ui files to the generated pot, relatie to srcdir. So instead of personalization.hrc:31 we can have cui/inc/personalization.hrc:31 for better context for translators. Since this is only in comment this will not change the translated status of strings. TODO: the other file formats we use are not affected by this. Change-Id: Id436d66698c93e07c46bf9c20601c5b480eadd0b Reviewed-on: https://gerrit.libreoffice.org/46591 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'solenv')
-rwxr-xr-xsolenv/bin/hrcex2
-rwxr-xr-xsolenv/bin/uiex2
2 files changed, 2 insertions, 2 deletions
diff --git a/solenv/bin/hrcex b/solenv/bin/hrcex
index 2a657290ed88..8e897ea1fca3 100755
--- a/solenv/bin/hrcex
+++ b/solenv/bin/hrcex
@@ -30,6 +30,6 @@ with open(ofile, "a") as output:
keyid = entry.msgctxt + '|' + entry.msgid
print >> output, '#. ' + polib.genKeyId(keyid)
location = entry.occurrences[0][0]
- location = os.path.basename(location)
+ location = os.path.relpath(location, os.environ['SRCDIR'])
entry.occurrences[0] = location, entry.occurrences[0][1]
print >> output, entry
diff --git a/solenv/bin/uiex b/solenv/bin/uiex
index 0f086a20c6c7..bade6149c382 100755
--- a/solenv/bin/uiex
+++ b/solenv/bin/uiex
@@ -30,6 +30,6 @@ with open(ofile, "a") as output:
keyid = entry.msgctxt + '|' + entry.msgid
print >> output, '#. ' + polib.genKeyId(keyid)
location = entry.occurrences[0][0]
- location = os.path.basename(location)
+ location = os.path.relpath(location, os.environ['SRCDIR'])
entry.occurrences[0] = location, entry.occurrences[0][1]
print >> output, entry