[Libreoffice-commits] core.git: solenv/bin
Gabor Kelemen
kelemeng at ubuntu.com
Sun Jan 14 12:07:51 UTC 2018
solenv/bin/hrcex | 2 +-
solenv/bin/uiex | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 674b1c924966b4a3b6027509a6ab682e7c5aaaea
Author: Gabor Kelemen <kelemeng at ubuntu.com>
Date: Sat Dec 16 08:59:12 2017 +0100
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 at libreoffice.org>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
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
More information about the Libreoffice-commits
mailing list