mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-06-09 08:42:14 -04:00
Host-|ServiceSummaryDonut: Make the *Total 42* label properly localizable
refs https://github.com/Icinga/ipl-html/issues/33
This commit is contained in:
parent
016b9f3f17
commit
1bbbaa96ce
2 changed files with 12 additions and 10 deletions
|
|
@ -10,9 +10,9 @@ use Icinga\Module\Icingadb\Common\BaseFilter;
|
|||
use Icinga\Module\Icingadb\Common\Links;
|
||||
use Icinga\Module\Icingadb\Model\HoststateSummary;
|
||||
use ipl\Html\BaseHtmlElement;
|
||||
use ipl\Html\Html;
|
||||
use ipl\Html\HtmlElement;
|
||||
use ipl\Html\HtmlString;
|
||||
use ipl\Html\TemplateString;
|
||||
use ipl\Web\Filter\QueryString;
|
||||
|
||||
class HostSummaryDonut extends Card
|
||||
|
|
@ -61,10 +61,11 @@ class HostSummaryDonut extends Card
|
|||
{
|
||||
$header->add([
|
||||
new HtmlElement('h2', null, t('Hosts')),
|
||||
Html::tag('span', ['class' => 'meta'], [
|
||||
Html::tag('span', t('Total')),
|
||||
' ' . $this->summary->hosts_total
|
||||
])
|
||||
new HtmlElement('span', ['class' => 'meta'], TemplateString::create(
|
||||
t('{{#total}}Total{{/total}} %d'),
|
||||
['total' => new HtmlElement('span')],
|
||||
(int) $this->summary->hosts_total
|
||||
))
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ use Icinga\Module\Icingadb\Common\BaseFilter;
|
|||
use Icinga\Module\Icingadb\Common\Links;
|
||||
use Icinga\Module\Icingadb\Model\ServicestateSummary;
|
||||
use ipl\Html\BaseHtmlElement;
|
||||
use ipl\Html\Html;
|
||||
use ipl\Html\HtmlElement;
|
||||
use ipl\Html\HtmlString;
|
||||
use ipl\Html\TemplateString;
|
||||
use ipl\Web\Filter\QueryString;
|
||||
|
||||
class ServiceSummaryDonut extends Card
|
||||
|
|
@ -63,10 +63,11 @@ class ServiceSummaryDonut extends Card
|
|||
{
|
||||
$header->add([
|
||||
new HtmlElement('h2', null, t('Services')),
|
||||
Html::tag('span', ['class' => 'meta'], [
|
||||
Html::tag('span', t('Total')),
|
||||
' ' . $this->summary->services_total
|
||||
])
|
||||
new HtmlElement('span', ['class' => 'meta'], TemplateString::create(
|
||||
t('{{#total}}Total{{/total}} %d'),
|
||||
['total' => new HtmlElement('span')],
|
||||
(int) $this->summary->services_total
|
||||
))
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue