WebReflection / i18n-utils

The i18n tag function utilitities
75 stars 5 forks source link

i18n calls inside hyper.wire() not recognized #8

Closed jaschaio closed 6 years ago

jaschaio commented 6 years ago

This might be my fault or missing understanding of hyperHTML. But it seems that I can't use i18n inside the the hyper.wire()`` method.

This is recognized by i18n-utils:

let test = i18n`Simple test i18n message`;

This as well:

let test = `This is a template literal ${ i18n`Simple test i18n message` } inside another one`;

But this isn't:

let test = hyper.wire()`This is a template literal ${ i18n`Simple test i18n message` } inside another one`;

Is this intended?

Thanks

WebReflection commented 6 years ago

Is this intended?

nope, quite the opposite, but I think the issue is that the AST parser is not walking through template literals interpolations.

Will have a look ASAP, thanks for filling this.

WebReflection commented 6 years ago

please let me know how it works now, thanks.