summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2021-01-25 16:31:29 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2021-01-27 14:42:16 +0100
commitd5c2ae6031ff075aad0705c1955f82f59e331769 (patch)
tree9e0f597bcd6c3aeaeef5e6d3b033cc95331f6ff0 /l10ntools
parente65376ecd6e4356686927a5daeb845faf1fc4a42 (diff)
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@googlemail.com>
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/po.cxx7
1 files changed, 5 insertions, 2 deletions
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();
}