mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-27 05:20:22 +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]['updated'] != selLangUpdated)
|
||||
{
|
||||
console.log('Ged update needed for : ' + onlineLangs[i]['name'])
|
||||
//const bodyStr = i18n.t("Common.Home.LangUpdateMsg") + '</br>' + i18n.t("Common.Home.LangUpdateMsg2");
|
||||
//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"),
|
||||
{
|
||||
const bodyStr = i18n.t("Common.Home.LangUpdateMsg", [onlineLangs[i]['name']]) + '. ' + i18n.t("Common.Home.LangUpdateMsg2", [i18n.t("Common.Language.btnForce")]);
|
||||
this.$bvToast.toast(bodyStr, {
|
||||
title: this.$t("Common.Home.LangUpdateTitle"),
|
||||
autoHideDelay: 400000,
|
||||
solid: true,
|
||||
variant: 'primary',
|
||||
toaster: 'b-toaster-bottom-right'
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,9 +106,6 @@ export default {
|
|||
this.olLangs = [];
|
||||
await this.$store.dispatch("updateAndSetLang", { "langCode": i18n.locale, "forceDownload": true});
|
||||
this.getOnlineLangs();
|
||||
|
||||
console.log('Ged lang time: ' + i18n.locale)
|
||||
//const langTimeStamp = 'ged223344'
|
||||
// Get timeStamp
|
||||
let timeStamp = ''
|
||||
var onlineLangs = await this.$store.getters.getLanguages
|
||||
|
@ -117,8 +114,7 @@ export default {
|
|||
{
|
||||
timeStamp = onlineLangs[i]['updated']
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// Update settings with timestamp
|
||||
wtconfig.set(`Languages.${i18n.locale}`, timeStamp)
|
||||
},
|
||||
|
@ -137,6 +133,7 @@ export default {
|
|||
},
|
||||
onChange(event) {
|
||||
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'));
|
||||
i18n.setLocaleMessage(langCode, res)
|
||||
commit('SET_LANG', langCode)
|
||||
commit('SET_LANG', langCode)
|
||||
}
|
||||
catch(e) {
|
||||
console.log(e)
|
||||
|
|
Loading…
Reference in a new issue