-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix : i18n #94
fix : i18n #94
Conversation
now upon changing UI language , it will instanlty change. The init prototype being async in nature helps fetch the messages and then appneds them inside the relevant html
…olders are present
NOTE: Just in case you get |
Thank @kabir-afk for figuring that out ! |
// let hlwa = browser.i18n.getMessage("si-panel-videos-title"); | ||
// console.log("hlwa = ",hlwa); | ||
var SignItCoreContent = function () { | ||
console.log("SignItCoreContent.js"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we logging on console ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is legacy, for when i inspected, to know to which file the following logs were related to. Ca be removed if needed
Changes Made
June 13
storeParam
message now works properly and invokes thestoreParam
function insidesw.js
andbackground-script.js
.I think this addresses Popup>Settings with persistent memory on all browsers #87 . Although Selected language in settings resets when changing pages #56 still persists.
banana.i18n
directly insidesw.js/background-script.js
and then send the response acccordingly.Pros and cons of what we were doing earlier vs now :
EARLIER [EDIT: Chrome native's
browser.i18n
API]SignItCoreContent
constructor not initializing timely , rather than a local storage issue. Although I am not sure why this occured as upon being passed with chosen arguements (user's preferred language ), it was logged correctly but rendered previous language.NOW [EDIT: Wikimedia
banana.i18n
sent up and processed in sw.js/background.js]init
, although not the best workaround.banana.i18n
addresses its own , if not added as html inside the script, will render the string as is.With this #84 can be closed now.
banana.i18n
, replacingbrowser.i18n
API as well as its messages.init
has to be invoked as shown in refactor : updated how SignItCoreContent() is called.June 14
.text()
, rendered<br/>
as is. But replacing it with.html()
resolved it.loadi18Localization
now as we no longer rely on it.