$tag['name'] = $tagName;
if ( $fld_displayname ) {
- $tag['displayname'] = ChangeTags::tagDescription( $tagName );
+ $tag['displayname'] = ChangeTags::tagDescription( $tagName, $this );
}
if ( $fld_description ) {
if ( !$tag ) {
continue;
}
- $description = self::tagDescription( $tag );
+ $description = self::tagDescription( $tag, $context );
if ( $description === false ) {
continue;
}
* we consider the tag hidden, and return false.
*
* @param string $tag Tag
+ * @param IContextSource $context
* @return string|bool Tag description or false if tag is to be hidden.
* @since 1.25 Returns false if tag is to be hidden.
*/
- public static function tagDescription( $tag ) {
- $msg = wfMessage( "tag-$tag" );
+ public static function tagDescription( $tag, IContextSource $context ) {
+ $msg = $context->msg( "tag-$tag" );
if ( !$msg->exists() ) {
// No such message, so return the HTML-escaped tag name.
return htmlspecialchars( $tag );
$newRow .= Xml::tags( 'td', null, Xml::element( 'code', null, $tag ) );
$linkRenderer = $this->getLinkRenderer();
- $disp = ChangeTags::tagDescription( $tag );
+ $disp = ChangeTags::tagDescription( $tag, $this->getContext() );
if ( $showEditLinks ) {
$disp .= ' ';
$editLink = $linkRenderer->makeLink(