From d5c2ae6031ff075aad0705c1955f82f59e331769 Mon Sep 17 00:00:00 2001 From: Christian Lohmaier Date: Mon, 25 Jan 2021 16:31:29 +0100 Subject: 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 --- l10ntools/source/po.cxx | 7 +++++-- 1 file 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(); } -- cgit