mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-30 06:50:21 +00:00
Merge pull request #143 from WebTools-NG/#94-Export-Episodes-as-well
Some housekeeping for translations
This commit is contained in:
commit
97f6c63e51
3 changed files with 6 additions and 27 deletions
|
@ -38,33 +38,15 @@ export default {
|
||||||
if (onlineLangs[i]['code'] == selLang)
|
if (onlineLangs[i]['code'] == selLang)
|
||||||
{
|
{
|
||||||
if ( onlineLangs[i]['updated'] != selLangUpdated)
|
if ( onlineLangs[i]['updated'] != selLangUpdated)
|
||||||
{
|
{
|
||||||
console.log('Ged update needed for : ' + onlineLangs[i]['name'])
|
const bodyStr = i18n.t("Common.Home.LangUpdateMsg", [onlineLangs[i]['name']]) + '. ' + i18n.t("Common.Home.LangUpdateMsg2", [i18n.t("Common.Language.btnForce")]);
|
||||||
//const bodyStr = i18n.t("Common.Home.LangUpdateMsg") + '</br>' + i18n.t("Common.Home.LangUpdateMsg2");
|
this.$bvToast.toast(bodyStr, {
|
||||||
//const bodyStr = 'Test'
|
|
||||||
/* this.$bvToast.toast("Test"), {
|
|
||||||
// title: this.$t("Common.Home.LangUpdateTitle"),
|
|
||||||
title: "Ged title",
|
|
||||||
autoHideDelay: 3000,
|
|
||||||
solid: true,
|
|
||||||
//enableHtml: true,
|
|
||||||
variant: 'primary',
|
|
||||||
toaster: 'b-toaster-bottom-right'
|
|
||||||
} */
|
|
||||||
|
|
||||||
|
|
||||||
const bodyStr = i18n.t("Common.Home.LangUpdateMsg", [onlineLangs[i]['name']]) + '. ' + i18n.t("Common.Home.LangUpdateMsg2", [i18n.t("Common.Language.btnForce")]);
|
|
||||||
|
|
||||||
//this.$bvToast.toast(this.$t("Modules.ET.ErrorNoServerSelectedMsg"), {
|
|
||||||
this.$bvToast.toast(bodyStr, {
|
|
||||||
//title: this.$t("Modules.ET.ErrorNoServerSelectedTitle"),
|
|
||||||
title: this.$t("Common.Home.LangUpdateTitle"),
|
title: this.$t("Common.Home.LangUpdateTitle"),
|
||||||
autoHideDelay: 400000,
|
autoHideDelay: 400000,
|
||||||
solid: true,
|
solid: true,
|
||||||
variant: 'primary',
|
variant: 'primary',
|
||||||
toaster: 'b-toaster-bottom-right'
|
toaster: 'b-toaster-bottom-right'
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,9 +106,6 @@ export default {
|
||||||
this.olLangs = [];
|
this.olLangs = [];
|
||||||
await this.$store.dispatch("updateAndSetLang", { "langCode": i18n.locale, "forceDownload": true});
|
await this.$store.dispatch("updateAndSetLang", { "langCode": i18n.locale, "forceDownload": true});
|
||||||
this.getOnlineLangs();
|
this.getOnlineLangs();
|
||||||
|
|
||||||
console.log('Ged lang time: ' + i18n.locale)
|
|
||||||
//const langTimeStamp = 'ged223344'
|
|
||||||
// Get timeStamp
|
// Get timeStamp
|
||||||
let timeStamp = ''
|
let timeStamp = ''
|
||||||
var onlineLangs = await this.$store.getters.getLanguages
|
var onlineLangs = await this.$store.getters.getLanguages
|
||||||
|
@ -117,8 +114,7 @@ export default {
|
||||||
{
|
{
|
||||||
timeStamp = onlineLangs[i]['updated']
|
timeStamp = onlineLangs[i]['updated']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update settings with timestamp
|
// Update settings with timestamp
|
||||||
wtconfig.set(`Languages.${i18n.locale}`, timeStamp)
|
wtconfig.set(`Languages.${i18n.locale}`, timeStamp)
|
||||||
},
|
},
|
||||||
|
@ -137,6 +133,7 @@ export default {
|
||||||
},
|
},
|
||||||
onChange(event) {
|
onChange(event) {
|
||||||
this.$store.dispatch('updateAndSetLang', { "langCode": event.target.value, "forceDownload": false});
|
this.$store.dispatch('updateAndSetLang', { "langCode": event.target.value, "forceDownload": false});
|
||||||
|
console.log('Ged lang skiftet')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ export const actions = {
|
||||||
}
|
}
|
||||||
const res = await JSON.parse(fs.readFileSync(langFile, 'utf8'));
|
const res = await JSON.parse(fs.readFileSync(langFile, 'utf8'));
|
||||||
i18n.setLocaleMessage(langCode, res)
|
i18n.setLocaleMessage(langCode, res)
|
||||||
commit('SET_LANG', langCode)
|
commit('SET_LANG', langCode)
|
||||||
}
|
}
|
||||||
catch(e) {
|
catch(e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
|
|
Loading…
Reference in a new issue