jenkins-bot has submitted this change and it was merged. Change subject: Make redlink tooltip be content language to stop cache pollution. ......................................................................
Make redlink tooltip be content language to stop cache pollution. Redlink tooltips end up in parser cache! This is not ideal, as ideally it would be in the page's language, not the content language and it would be user language for things outside of pages, but that's not easy to do the way the code is structured, and this is much better than the alternative. Other possibilities include: * Splitting parser cache (Previously been reverted, and doesn't seem worth it given the feature in question) * Post-processing step after parsing (Really complicated. Doesn't seem worth it) Bug: T34686 Change-Id: Id632f8ef59d1c762aed1867a708c569cbff5f0dd --- M includes/Linker.php 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Nikerabbit: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Linker.php b/includes/Linker.php index 0dd4c47..3ba472ba 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -346,7 +346,10 @@ } elseif ( in_array( 'known', $options ) ) { $defaults['title'] = $target->getPrefixedText(); } else { - $defaults['title'] = wfMessage( 'red-link-title', $target->getPrefixedText() )->text(); + // This ends up in parser cache! + $defaults['title'] = wfMessage( 'red-link-title', $target->getPrefixedText() ) + ->inContentLanguage() + ->text(); } # Finally, merge the custom attribs with the default ones, and iterate -- To view, visit https://gerrit.wikimedia.org/r/258736 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id632f8ef59d1c762aed1867a708c569cbff5f0dd Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brian Wolff <bawolff...@gmail.com> Gerrit-Reviewer: Brian Wolff <bawolff...@gmail.com> Gerrit-Reviewer: Jackmcbarn <jackmcb...@gmail.com> Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits