forms-bootstrap icon indicating copy to clipboard operation
forms-bootstrap copied to clipboard

Translation issue with wrappers

Open darkWolf-PR opened this issue 3 years ago • 2 comments

Hi, I´m having an issue with translation (using Contributte Translation package).

This wrappers\message (from Contributte Translation documentation):

->setOption('description', new Contributte\Translation\Wrappers\Message('form.mail.description', [...]);

Does exactly nothing.

Works fine with just simple translation string, after adding new Message, whole text disappear. Tracy shows no missing translation, no errors, like it doesn´t exist. Tried also the NotTranslate wrapper and that one seems to work.

I had to change hell a lot of code to try it with just base Nette Forms and it does work normally, so the problem lies somewhere within forms-bootstrap.

darkWolf-PR avatar Apr 26 '21 10:04 darkWolf-PR

@darkWolf-PR I do not use contributte/translation... Can U prepare PR with tests? Or if not can U provide me sandbox package with this issue so I can easily debug and fix it? Thanks

dakorpar avatar Apr 30 '21 10:04 dakorpar

@dakorpar

I had no time till now, I´ve updated my sandbox I had for other problem with Ublaboo Datagrid with new "Forms" presenter where u can look on the problem.

https://github.com/darkWolf-PR/DatagridDetailTest

1st form has 2 fields:

  • field name has added wrapper to setOption, which causes the "description" text to dissapear.
  • field surname has setOption with "description", but without wrapper for variables - works normally

2nd form is made by base Nette Forms, shows how it should be working with variables inserted in "description"

darkWolf-PR avatar May 19 '21 16:05 darkWolf-PR