implemented i18n on sidebar, added language setting in settings
This commit is contained in:
parent
9386527907
commit
dd97dd4ccb
11 changed files with 69 additions and 22 deletions
|
@ -134,9 +134,7 @@ const app = new Vue({
|
|||
platform: "",
|
||||
mk: {},
|
||||
quickPlayQuery: "",
|
||||
lz: {
|
||||
|
||||
},
|
||||
lz: ipcRenderer.sendSync("get-i18n", "en_US"),
|
||||
search: {
|
||||
term: "",
|
||||
hints: [],
|
||||
|
@ -339,6 +337,12 @@ const app = new Vue({
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
setLz(lang) {
|
||||
if(lang == "") {
|
||||
lang = this.cfg.general.language
|
||||
}
|
||||
this.lz = ipcRenderer.sendSync("get-i18n", lang)
|
||||
},
|
||||
getLz(message) {
|
||||
if(this.lz[message]) {
|
||||
return this.lz[message]
|
||||
|
@ -499,6 +503,7 @@ const app = new Vue({
|
|||
},
|
||||
async init() {
|
||||
let self = this
|
||||
this.setLz(this.cfg.general.language)
|
||||
clearTimeout(this.hangtimer)
|
||||
this.mk = MusicKit.getInstance()
|
||||
let needsReload = (typeof localStorage["music.ampwebplay.media-user-token"] == "undefined")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue