[Libreoffice-commits] core.git: l10ntools/source
Christian Lohmaier (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jan 27 13:42:54 UTC 2021
l10ntools/source/po.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit d5c2ae6031ff075aad0705c1955f82f59e331769
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
AuthorDate: Mon Jan 25 16:31:29 2021 +0100
Commit: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Wed Jan 27 14:42:16 2021 +0100
pocheck: don't require reference for stock labels
See d5d905b480c2a9b1db982f2867e87b5c230d1ab9 and related commits for the
rationale on why those are not extracted like other strings.
Change-Id: I2a339747626e0fb314cac7f57bccb2b91853249c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109916
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 5269b5e0f7f3..7b8a1cacb3c1 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -541,8 +541,11 @@ namespace
// Check the validity of read entry
bool lcl_CheckInputEntry(const GenPoEntry& rEntry)
{
- return !rEntry.getReference().empty() &&
- !rEntry.getMsgCtxt().isEmpty() &&
+ // stock button labels don't have a reference/sourcefile - they are not extracted from ui files
+ // (explicitly skipped by solenv/bin/uiex) but instead inserted by l10ntools/source/localize.cxx
+ // into all module templates (see d5d905b480c2a9b1db982f2867e87b5c230d1ab9)
+ return !rEntry.getMsgCtxt().isEmpty() &&
+ (rEntry.getMsgCtxt() == "stock" || !rEntry.getReference().empty()) &&
!rEntry.getMsgId().isEmpty();
}
More information about the Libreoffice-commits
mailing list