translation icon indicating copy to clipboard operation
translation copied to clipboard

<button> element in forms is not translated properly

Open zraly opened this issue 1 year ago • 0 comments

When I use <button> element instead of <input>, it translates value parameter instead of the body of the button:

presenter:

$form->setTranslator($this->translator->createPrefixedTranslator('admin.myForm'));
$form->addSubmit('sub', 'update');

latte:

<input n:name="sub"> // generates <input type="submit" name="sub" value="Aktualizovat">

<button n:name="sub" /> // generates <button type="submit" name="sub" value="Aktualizovat">update</button>

zraly avatar Sep 14 '23 14:09 zraly