We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 190f630 commit db3e6cbCopy full SHA for db3e6cb
src/Bridges/ApplicationLatte/TemplateFactory.php
@@ -84,6 +84,12 @@ public function createTemplate(UI\Control $control = NULL)
84
return $time == NULL ? NULL : Nette\Utils\DateTime::from($time)->modify($delta . $unit); // intentionally ==
85
});
86
87
+ if (!isset($latte->getFilters()['translate'])) {
88
+ $latte->addFilter('translate', function () {
89
+ throw new Nette\InvalidStateException('Translator has not been set. Set translator using $template->setTranslator().');
90
+ });
91
+ }
92
+
93
// default parameters
94
$template->control = $template->_control = $control;
95
$template->presenter = $template->_presenter = $presenter;
0 commit comments