claudetech / node-static-i18n

HTML static pages i18n tool
https://www.npmjs.com/package/static-i18n
MIT License
104 stars 21 forks source link

Not translating texts with indendation #15

Closed alvarotrigo closed 6 years ago

alvarotrigo commented 6 years ago

It is quite common to have HTML code structured with indendation of some kind, tabs, spaces... Having something like this won't get translated due to the indendation:

<div data-t>
    Extensions
</div>

It seems it requires it in a single line and without indent:

<div data-t>Extensions</div>

Perhaps using something like this could make things easier:

<div data-t>
    {{Extensions}}
</div>

Which at the moment doesn't work but that would be very similar to the current use of interpolation ?

danhper commented 6 years ago

I suppose this should be fixed thanks to your PR, thanks.