-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hi! First of all, hats off to this module, it makes dynamic translation of extension HTML messages very efficient and flexible. 😄 We are using it in this extension and it works like a charm.
I was wondering whether the __MSG_*__
format in message ids really adds anything. I know it's necessary for text replacement in the manifest.json
and CSS files, but with data-i18n*
attributes explicitly and only referring to message ids, the format can be entirely avoided, thus avoiding a lot of noise in the HTML file. As you can see, we altered Localizer to remove that requirement and it works perfectly, even with predefined messages like @@ui_locale
.
For backwards compatibility, getMessageTag
may remove the __MSG_*__
wrapper if present as it does now, otherwise just use the tag as is. If you like the idea I can provide a PR, but my JS abilities are very limited.
Thanks!