Add support for variables in translation (#250)
This commit is contained in:
parent
6fb1cbaa6c
commit
850fc80622
8 changed files with 145 additions and 101 deletions
|
@ -167,11 +167,19 @@ class FrontController extends BaseController
|
|||
$template = 'info.tpl';
|
||||
}
|
||||
$title = $this->localeManager->t('Video download');
|
||||
$description = $this->localeManager->t('Download video from ') . $this->video->extractor_key;
|
||||
$description = $this->localeManager->t(
|
||||
'Download video from @extractor',
|
||||
['@extractor' => $this->video->extractor_key]
|
||||
);
|
||||
if (isset($this->video->title)) {
|
||||
$title = $this->video->title;
|
||||
$description = $this->localeManager->t('Download') . ' "' . $this->video->title . '" ' .
|
||||
$this->localeManager->t('from') . ' ' . $this->video->extractor_key;
|
||||
$description = $this->localeManager->t(
|
||||
'Download @title from @extractor',
|
||||
[
|
||||
'@title' => $this->video->title,
|
||||
'@extractor' => $this->video->extractor_key
|
||||
]
|
||||
);
|
||||
}
|
||||
$this->view->render(
|
||||
$response,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue