Skip to content

Commit

Permalink
Added comments to getMsg() ↞ [auto-sync from https://github.com/ada…
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Feb 9, 2025
1 parent abcba71 commit c544a9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions chromium/extension/components/modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ window.modals = {
},

getMsg(key) {
return /Chromium|Firefox/.test(this.runtime) ? chrome.i18n.getMessage(key)
: this.imports.app.msgs[key] // from modals.imports.import({ app }) in userscript
return /Chromium|Firefox/.test(this.runtime) ?
chrome.i18n.getMessage(key) // from ./_locales/*/messages.json
: this.imports.app.msgs[key] // from modals.imports.import({ app }) in userscript
},

alert(title = '', msg = '', btns = '', checkbox = '', width = '') { // generic one from chatgpt.alert()
Expand Down
5 changes: 3 additions & 2 deletions firefox/extension/components/modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ window.modals = {
},

getMsg(key) {
return /Chromium|Firefox/.test(this.runtime) ? chrome.i18n.getMessage(key)
: this.imports.app.msgs[key] // from modals.imports.import({ app }) in userscript
return /Chromium|Firefox/.test(this.runtime) ?
chrome.i18n.getMessage(key) // from ./_locales/*/messages.json
: this.imports.app.msgs[key] // from modals.imports.import({ app }) in userscript
},

alert(title = '', msg = '', btns = '', checkbox = '', width = '') { // generic one from chatgpt.alert()
Expand Down

0 comments on commit c544a9c

Please sign in to comment.