mediawiki-extensions-Templa.../includes/TemplateDataMessageLocalizer.php
Thiemo Kreuz a81a8b52bc Improve test coverage for HTML formatter code
… as well as some smaller improvements to the test coverage of other
code.

Change-Id: I5bec9c456fdc597c340dc0b515d23d837a7c5651
2022-02-03 12:45:27 +01:00

29 lines
512 B
PHP

<?php
namespace MediaWiki\Extension\TemplateData;
use Language;
use MessageLocalizer;
/**
* @codeCoverageIgnore Trivial facade
*/
class TemplateDataMessageLocalizer implements MessageLocalizer {
/** @var Language */
private $language;
/**
* @param Language $language
*/
public function __construct( Language $language ) {
$this->language = $language;
}
/** @inheritDoc */
public function msg( $key, ...$params ) {
return wfMessage( $key, ...$params )->inLanguage( $this->language );
}
}