Problem/Motivation
Reported by davituri in the security advisory coverage application (#3608067, comment 7). VocabularyConditionBase::summary() builds the summary from separately translated fragments cast to strings and joins them with a hard-coded English " or " that never reaches translators. The joined string is then passed through the @criteria placeholder, so the vocabulary and term labels are escaped a second time: for a vocabulary named Q&A the summary renders "Q&A". Finally the summary ignores the negate option, so a negated condition still reads "Applies when the vocabulary is Tags".
Steps to reproduce
Configure the "Vocabulary or term" block visibility condition with a vocabulary named "Q&A", enable "Negate the condition" and look at the summary shown in the block form: the ampersand is double escaped and the sentence still says "Applies when".
Proposed resolution
Return one complete translatable string per case (vocabularies, terms, both, with and without descendants, each with a negated variant) using @bundles and @terms placeholders, so translators get the full sentence and labels are escaped exactly once. Extend the summary kernel test with negated cases, the combined case with descendants and a label containing an ampersand.
Comments
Comment #3
trebormc