mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-24 14:34:09 +00:00
feat(core): ✨ convert tagline to langauage variant when appliable
This commit is contained in:
parent
af41f98935
commit
0c23e50d62
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue