Skip to content

Commit

Permalink
add translation for name
Browse files Browse the repository at this point in the history
  • Loading branch information
ArrayIterator committed Oct 15, 2023
1 parent 3858ffb commit c70f252
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Benchmarks/CoreModuleAggregator.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ public function getCore(): ?Core
return $this->core;
}

private bool $translated = false;

public function getName(): string
{
if ($this->translated) {
return $this->name;
}
$this->translated = true;
return $this->name = $this
->getCore()
?->translate('Event', context: 'benchmark')??$this->name;
}

public function accepted(RecordInterface $record): bool
{
if ($record->getGroup()->getName() === $this->groupName) {
Expand Down

0 comments on commit c70f252

Please sign in to comment.