doc: fix translate calls w/ sprintf
This commit is contained in:
parent
f49a34625e
commit
8c02f140c3
|
@ -44,13 +44,13 @@ class Doc_ModuleController extends DocController
|
|||
$moduleManager = Icinga::app()->getModuleManager();
|
||||
if (! $moduleManager->hasInstalled($moduleName)) {
|
||||
throw new Zend_Controller_Action_Exception(
|
||||
$this->translate(sprintf('Module \'%s\' is not installed', $moduleName)),
|
||||
sprintf($this->translate('Module \'%s\' is not installed'), $moduleName),
|
||||
404
|
||||
);
|
||||
}
|
||||
if (! $moduleManager->hasEnabled($moduleName)) {
|
||||
throw new Zend_Controller_Action_Exception(
|
||||
$this->translate(sprintf('Module \'%s\' is not enabled', $moduleName)),
|
||||
sprintf($this->translate('Module \'%s\' is not enabled'), $moduleName),
|
||||
404
|
||||
);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ class DocController extends ModuleActionController
|
|||
$this->view->tocRenderer = new TocRenderer($parser->getDocTree(), $url, $urlParams);
|
||||
$name = ucfirst($name);
|
||||
$this->view->docName = $name;
|
||||
$this->view->title = $this->translate(sprintf('%s Documentation', $name));
|
||||
$this->view->title = sprintf($this->translate('%s Documentation'), $name);
|
||||
$this->_helper->viewRenderer('toc', null, true);
|
||||
}
|
||||
|
||||
|
|
|
@ -41,23 +41,23 @@ class DocParser
|
|||
{
|
||||
if (! is_dir($path)) {
|
||||
throw new DocException(
|
||||
mt('doc', sprintf('Documentation directory \'%s\' does not exist', $path))
|
||||
sprintf(mt('doc', 'Documentation directory \'%s\' does not exist'), $path)
|
||||
);
|
||||
}
|
||||
if (! is_readable($path)) {
|
||||
throw new DocException(
|
||||
mt('doc', sprintf('Documentation directory \'%s\' is not readable', $path))
|
||||
sprintf(mt('doc', 'Documentation directory \'%s\' is not readable'), $path)
|
||||
);
|
||||
}
|
||||
$docIterator = new DocIterator($path);
|
||||
if ($docIterator->count() === 0) {
|
||||
throw new DocEmptyException(
|
||||
mt(
|
||||
'doc',
|
||||
sprintf(
|
||||
'Documentation directory \'%s\' does not contain any non-empty Markdown file (\'.md\' suffix)',
|
||||
$path
|
||||
)
|
||||
sprintf(
|
||||
mt(
|
||||
'doc',
|
||||
'Documentation directory \'%s\' does not contain any non-empty Markdown file (\'.md\' suffix)'
|
||||
),
|
||||
$path
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ class DocTree extends Node
|
|||
}
|
||||
if (! isset($this->nodes[$parentId])) {
|
||||
throw new LogicException(
|
||||
mt('doc', sprintf('Can\'t add child node: there\'s no parent node having the id \'%s\'', $parentId))
|
||||
sprintf(mt('doc', 'Can\'t add child node: there\'s no parent node having the id \'%s\''), $parentId)
|
||||
);
|
||||
}
|
||||
$this->nodes[$childId] = $this->nodes[$parentId]->appendChild($child);
|
||||
|
|
|
@ -134,7 +134,7 @@ class SectionRenderer extends Renderer
|
|||
$filter = new SectionFilterIterator($docTree, $chapterId);
|
||||
if ($filter->count() === 0) {
|
||||
throw new ChapterNotFoundException(
|
||||
mt('doc', sprintf('Chapter \'%s\' not found', $chapterId))
|
||||
sprintf(mt('doc', 'Chapter \'%s\' not found'), $chapterId)
|
||||
);
|
||||
}
|
||||
parent::__construct(
|
||||
|
|
Loading…
Reference in New Issue