marcrobledo / RomPatcher.js

An IPS/UPS/APS/BPS/RUP/PPF/xdelta ROM patcher made in HTML5.
https://www.marcrobledo.com/RomPatcher.js/
Other
653 stars 133 forks source link

Using setMessage Doesn't Set A data-localize Attribute #36

Closed flagrama closed 2 years ago

flagrama commented 2 years ago

When using setMessage it doesn't set a data-localize attribute on the element the message is added to. Due to this if you change the language after setMessage has set a message it will still appear in the previously selected language.

I think ideally instead of msg you take in the localization key instead, then set data-localize to that key and set the message by passing the key to _ inside of setMessage.

I can write up a quick PR if this implementation sounds good to you.

marcrobledo commented 2 years ago

Sure!