Skip to content

Commit

Permalink
Latte: removed error message for missing |translate
Browse files Browse the repository at this point in the history
Warning doesn't catch that {_} doesn't work either
  • Loading branch information
dg committed Apr 19, 2024
1 parent 90e3e0c commit c86bdbe
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/Bridges/ApplicationLatte/TemplateFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ public function createTemplate(?UI\Control $control = null, ?string $class = nul
}
}

if (!isset($latte->getFilters()['translate'])) {
$latte->addFilter('translate', function (Latte\Runtime\FilterInfo $fi): void {
throw new Nette\InvalidStateException('Translator has not been set. Set translator using $template->setTranslator().');
});
}

// default parameters
$baseUrl = $this->httpRequest
? rtrim($this->httpRequest->getUrl()->withoutUserInfo()->getBaseUrl(), '/')
Expand Down

0 comments on commit c86bdbe

Please sign in to comment.