lajax / yii2-translate-manager

Translation Manager
MIT License
227 stars 90 forks source link

Frontend translation of strings in hidden tags corrupts HTML #45

Closed maxxer closed 8 years ago

maxxer commented 8 years ago

Given this code in frontend:

<input id="sys_txt_keyword" class="txt-keyword" type="text" placeholder="<?=Lx::t("trusthau", "Search Actions")?>"/>

the resulting HTML is

<input id="sys_txt_keyword" class="txt-keyword" type="text" placeholder="<span class="language-item" data-category="trusthau" data-hash="5fdaa9de184eb548e41805c2be378e9d" data-language_id="it-IT" data-params="[]">Search Actions</span>"/>

which is invalid...

I don't know if you want to fix Lx::t or just add in the documentation not to use it in non viewable strings

lajax commented 8 years ago

Thanks!