Skip to content

Commit

Permalink
BaseControl::getLabel() IHtmlString are not translated (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
MilanPala authored and dg committed Jul 8, 2019
1 parent b3356d0 commit 4876961
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Forms/Controls/BaseControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ public function getLabel($caption = null)
$label->for = $this->getHtmlId();
$caption = $caption === null ? $this->caption : $caption;
$translator = $this->getForm()->getTranslator();
$label->setText($translator ? $translator->translate($caption) : $caption);
$label->setText($translator && !$caption instanceof Nette\Utils\IHtmlString ? $translator->translate($caption) : $caption);
return $label;
}

Expand Down

0 comments on commit 4876961

Please sign in to comment.