You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to automatically replace the translate tag with translation="unique id" so the id's match the id's in the exported json file?
So to extract something like this: <h1 translate>Etiam rhoncus. Maecenas tempus</h1> <h2 translate>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</h2>
And automatically replace translate with a attribute + id: <h1 t="211d76eec">Etiam rhoncus. Maecenas tempus</h1> <h2 t="96f37e421">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</h2>
This way I can easily combine it with aurelia-i18n which looks for the "t" attribute.
Thanks,
PP
The text was updated successfully, but these errors were encountered:
Hi @pptimmermans,
This is a very good idea, and something I've actually had on my own wish list for a while too.
You can already get some of what you are looking for today, by specifying this export option:
While this should work perfectly for static text, I think you might run into some issues if you have binding expressions within your text, as it seems Aurelia then also needs a t-params attribute added.
I'll look into it a bit more in the very near future, and see if I can come up with something - maybe a hook where you can specify a custom function, which receives the element and annotation info, and then has the opportunity to manipulate the element and its attributes in any way it wants. I'll have to look into this a bit more before promising too much though :-)
Is it possible to automatically replace the translate tag with translation="unique id" so the id's match the id's in the exported json file?
So to extract something like this:
<h1 translate>Etiam rhoncus. Maecenas tempus</h1> <h2 translate>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</h2>
And automatically replace translate with a attribute + id:
<h1 t="211d76eec">Etiam rhoncus. Maecenas tempus</h1> <h2 t="96f37e421">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</h2>
This way I can easily combine it with aurelia-i18n which looks for the "t" attribute.
Thanks,
PP
The text was updated successfully, but these errors were encountered: