feat(core): convert tagline to langauage variant when appliable

This commit is contained in:
alistair3149 2023-02-16 12:23:03 -05:00
parent af41f98935
commit 0c23e50d62
No known key found for this signature in database

View file

@ -25,6 +25,7 @@ declare( strict_types=1 );
namespace MediaWiki\Skins\Citizen\Partials;
use MediaWiki\MediaWikiServices;
use Title;
use User;
use Wikimedia\IPUtils;
@ -83,6 +84,15 @@ final class Tagline extends Partial {
}
}
// Apply language variant conversion
if ( !empty( $tagline ) ) {
$services = MediaWikiServices::getInstance();
$langConv = $services
->getLanguageConverterFactory()
->getLanguageConverter( $services->getContentLanguage() );
$tagline = $langConv->convert( $tagline );
}
return $tagline;
}