Merge pull request #143 from WebTools-NG/#94-Export-Episodes-as-well

Some housekeeping for translations
This commit is contained in:
Tommy Mikkelsen 2020-09-06 14:35:37 +02:00 committed by GitHub
commit 97f6c63e51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 27 deletions

View file

@ -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'
});
}
}
}

View file

@ -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')
}
}
}

View file

@ -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)