Skip to content

Commit ef97807

Browse files
committed
Translate displayed text
1 parent ff7dc90 commit ef97807

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

library/Cube/Web/Widget/DimensionWidget.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@
1717
use ipl\Html\HtmlDocument;
1818
use ipl\Html\HtmlElement;
1919
use ipl\Html\Text;
20+
use ipl\I18n\Translation;
2021
use ipl\Stdlib\Filter\Rule;
2122
use ipl\Web\Url;
2223

2324
abstract class DimensionWidget extends BaseHtmlElement
2425
{
26+
use Translation;
27+
2528
protected $tag = 'div';
2629

2730
public function __construct(
@@ -71,7 +74,7 @@ public function assemble(): void
7174
new Attributes([
7275
'href' => $this->getDetailsUrl(),
7376
'title' => sprintf(
74-
'Show details for %s: %s',
77+
$this->translate('Show details for %s: %s'),
7578
$this->cube->getDimension($this->dimension['name'])->getLabel(),
7679
$this->dimension['row']->{$this->dimension['name']}
7780
),
@@ -82,7 +85,7 @@ public function assemble(): void
8285
new HtmlElement('a', new Attributes([
8386
'class' => 'icon-filter',
8487
'href' => $this->getSliceUrl(),
85-
'title' => 'Slice this cube'
88+
'title' => $this->translate('Slice this cube')
8689
]))
8790
)
8891
);

0 commit comments

Comments
 (0)