Skip to content

Commit

Permalink
Revert "DefaultFormRenderer: added error message translation (#145)" [C…
Browse files Browse the repository at this point in the history
…loses #162]

This reverts commit 7c4e4ca.
  • Loading branch information
dg committed Aug 17, 2017
1 parent 1888029 commit 860c8b7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Forms/Rendering/DefaultFormRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,6 @@ public function renderEnd(): string
*/
public function renderErrors(Nette\Forms\IControl $control = null, bool $own = true): string
{
$translator = $control
? ($control instanceof \Nette\Forms\Controls\BaseControl ? $control->getTranslator() : null)
: $this->form->getTranslator();

$errors = $control
? $control->getErrors()
: ($own ? $this->form->getOwnErrors() : $this->form->getErrors());
Expand All @@ -229,7 +225,7 @@ public function renderErrors(Nette\Forms\IControl $control = null, bool $own = t
if ($error instanceof IHtmlString) {
$item->addHtml($error);
} else {
$item->setText($translator ? $translator->translate($error) : $error);
$item->setText($error);
}
$container->addHtml($item);
}
Expand Down

0 comments on commit 860c8b7

Please sign in to comment.