From 4247f5870175c94f2b75fb05161c7419dfdd0b85 Mon Sep 17 00:00:00 2001 From: Jack Phoenix Date: Fri, 24 Nov 2017 14:37:18 +0200 Subject: [PATCH] LanguageConverter support for [[MediaWiki:Timeless-sitetitle]] Bug: T181260 Change-Id: Ife63a96ad9b38345abff508cbdaeaf70a3663ac7 --- TimelessTemplate.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/TimelessTemplate.php b/TimelessTemplate.php index d035e3b..7f89511 100644 --- a/TimelessTemplate.php +++ b/TimelessTemplate.php @@ -250,6 +250,7 @@ class TimelessTemplate extends BaseTemplate { */ protected function getLogo( $id = 'p-logo', $part = 'both' ) { $html = ''; + $language = $this->getSkin()->getLanguage(); $html .= Html::openElement( 'div', @@ -261,7 +262,11 @@ class TimelessTemplate extends BaseTemplate { ); if ( $part !== 'image' ) { $titleClass = ''; - $siteTitle = $this->getMsg( 'timeless-sitetitle' )->escaped(); + if ( $language->hasVariants() ) { + $siteTitle = $language->convert( $this->getMsg( 'timeless-sitetitle' )->escaped() ); + } else { + $siteTitle = $this->getMsg( 'timeless-sitetitle' )->escaped(); + } // width is 11em; 13 characters will probably fit? if ( mb_strlen( $siteTitle ) > 13 ) { $titleClass = 'long';