diff --git a/index.html b/index.html index b141894..3b64a11 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ 水皇模拟器 - +
diff --git a/src/components/App.vue b/src/components/App.vue index 4b96f3e..de3f233 100644 --- a/src/components/App.vue +++ b/src/components/App.vue @@ -326,6 +326,7 @@ export default { }, created() { this.$store.commit('readFromLocalStorage'); + // set language to update title // log data when created console.log('APP', this); @@ -334,6 +335,7 @@ export default { // set current language this.$root.$i18n.locale = this.currentLanguage; + this.currentLanguage = this.currentLanguage; // auto load logs.txt. when debug, it avoids manually loading data. // const logFilePath = 'logs.txt'; @@ -675,8 +677,8 @@ export default { // select next language let keys = Object.keys(this.$i18n.messages).sort(); let position = keys.indexOf(this.currentLanguage); + this.$root.$i18n.locale = keys[(position + 1) % keys.length]; this.currentLanguage = keys[(position + 1) % keys.length]; - this.$root.$i18n.locale = this.currentLanguage; console.log('Change language to ' + this.currentLanguage); } }, @@ -1658,6 +1660,7 @@ export default { }, set (value) { this.$store.commit('setFrontendLanguage', value); + document.title = this.$t('LPSim: Title'); } }, animationInterval: { diff --git a/src/locales/en-US.json b/src/locales/en-US.json index ba632ed..9af59ab 100644 --- a/src/locales/en-US.json +++ b/src/locales/en-US.json @@ -157,6 +157,7 @@ "Error in update match data. ": "Error in update match data. ", " is not equal to current match length ": " is not equal to current match length {n}. ", "Background message, click to hide": "Background sent message, click to hide", + "LPSim: Title": "LPSim: Lochfolk Prinzessin Simulator", "SKILL_TYPE/NORMAL_ATTACK": "Normal Attack", "SKILL_TYPE/ELEMENTAL_SKILL": "Elemental Skill", diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json index 3101aa2..805ae7d 100644 --- a/src/locales/zh-CN.json +++ b/src/locales/zh-CN.json @@ -157,6 +157,7 @@ "Error in update match data. ": "更新对战数据时发生错误。", " is not equal to current match length ": " 与当前对战帧数长度 {n} 不相等。", "Background message, click to hide": "后台发送消息,点击隐藏", + "LPSim: Title": "LPSim:水皇模拟器", "SKILL_TYPE/NORMAL_ATTACK": "普通攻击", "SKILL_TYPE/ELEMENTAL_SKILL": "元素战技",