Remove Config dependency on LocaleManager

This commit is contained in:
Pierre Rudloff 2020-10-21 22:38:09 +02:00
parent 5c75dc2bb0
commit 5b0ee7651b
3 changed files with 32 additions and 32 deletions

View file

@ -124,7 +124,11 @@ class Config
*
* @var string[]
*/
public $genericFormats = [];
public $genericFormats = [
'best/bestvideo' => 'Best',
'bestvideo+bestaudio' => 'Remux best video with best audio',
'worst/worstvideo' => 'Worst',
];
/**
* Enable debug mode.
@ -158,16 +162,6 @@ class Config
$this->applyOptions($options);
$this->getEnv();
$this->validateOptions();
$localeManager = new LocaleManager();
if (empty($this->genericFormats)) {
// We don't put this in the class definition so it can be detected by xgettext.
$this->genericFormats = [
'best/bestvideo' => $localeManager->t('Best'),
'bestvideo+bestaudio' => $localeManager->t('Remux best video with best audio'),
'worst/worstvideo' => $localeManager->t('Worst'),
];
}
foreach ($this->genericFormats as $format => $name) {
if (strpos($format, '+') !== false) {