claudetech / node-static-i18n

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

interpolation is not working on <title> tag #13

Closed cmdesign85 closed 6 years ago

cmdesign85 commented 6 years ago

Hi,

I succeed in making translation and interpolation work perfectly. I succeed in translate tag, but as soon as I use interpolation, the translation stop working. This works (no interpolation): <code><title data-t="main.chapter"></title></code> <code><title data-t>main.chapter</title></code> This doesn't work (with interpolation) : <code><title data-attr-t data-attr-t-interpolate data-t="{{main.chapter}}1"></title></code> <code><title data-attr-t data-attr-t-interpolate data-t>{{main.chapter}}1</title></code></p> <p>Interpolation works fine in the rest of the page.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/danhper"><img src="https://avatars.githubusercontent.com/u/1436271?v=4" />danhper</a> commented <strong> 6 years ago</strong> </div> <div class="markdown-body"> <p>Thanks for reporting, it should now be fixed. Thanks to @alvarotrigo, you should also now be able to write</p> <pre><code><title data-t data-t-interpolate>{{main.chapter}} 1</title></code></pre> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/cmdesign85"><img src="https://avatars.githubusercontent.com/u/34168969?v=4" />cmdesign85</a> commented <strong> 6 years ago</strong> </div> <div class="markdown-body"> <p>Thanks, I tried <code>npm update -g static-i18n</code> and <code>npm update static-i18n</code> but nothings seems to work and the interpolation still doesn't work. How do I make the update ?</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/alvarotrigo"><img src="https://avatars.githubusercontent.com/u/1706326?v=4" />alvarotrigo</a> commented <strong> 6 years ago</strong> </div> <div class="markdown-body"> <p>@tuvistavie did you push the changes to npm? I think you might need to create a new release here on github, then use <code>npm publish</code>.</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>