Open HarryBurns opened 9 years ago
Have you tried this:
<input id="title" placeholder="'BlahBlahBlah'|translate"/>
?
I think, you need to make Regex for html attributes more 'hungry' in exports.js. For example, by changing this line to start = '^.*';. It works for me, but I don't know about side-effects.
That will cause a lot of problems with multiple matches. Go ahead and try it though.
Do try the code above, that's probably the right fix for your case.
(apologies for the open/close, that was an accident).
Thanks for speedy answer!
Do try the code above, that's probably the right fix for your case.
In current case - yes, it will help. But it was only an example. Angular with Kendo sometimes force me to use tricky expressions inside attributes(with multiple filters, casting and some black kendo magic), that can't be parsed by your engine properly.
I think, there is the way to modify regex to find only "Text"|translate
template from any mess in attribute expression.
Now I'm using a lot of custom directives to avoid such situations... If your RegEx magic is too complex to touch it - it's ok, there is a lot of workarounds for this cases, just a little more tricky.
Well, we have a pretty decent test suite, so you're definitely allowed to modify the Regex.
I'm not going to spend my time debugging Kendo madness, but I'll happily accept any fixes for it.
Hi!
If we'll try to process such html with
angular-gettext-tools
:It will produce duplicate keys:
"BlahBlahBlah"
"{{'BlahBlahBlah"
As you see, in html attribute we have single quotes inside double quotes, and I think that's the problem.
I think, you need to make Regex for html attributes more 'hungry' in
exports.js
. For example, by changing this line tostart = '^.*';
. It works for me, but I don't know about side-effects.