Merge pull request #126 from WebTools-NG/#98-Lang--Forced-Refresh

#98 fixed
This commit is contained in:
Tommy Mikkelsen 2020-09-01 21:09:35 +02:00 committed by GitHub
commit 684d92738a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,14 +54,16 @@ export default {
this.getOnlineLangs();
},
methods: {
forcedownload() {
this.$store.dispatch("updateAndSetLang", { "langCode": i18n.locale, "forceDownload": true});
async forcedownload() {
this.olLangs = [];
await this.$store.dispatch("updateAndSetLang", { "langCode": i18n.locale, "forceDownload": true});
this.getOnlineLangs();
},
joinPOE() {
shell.openExternal("https://github.com/WebTools-NG/WebTools-NG/wiki/Translator")
},
getOnlineLangs() {
var onlineLangs = this.$store.getters.getLanguages
async getOnlineLangs() {
var onlineLangs = await this.$store.getters.getLanguages
for (var i=0; i<onlineLangs.length; i++) {
var langName = onlineLangs[i]['name'] + ' (' + onlineLangs[i]['percentage'] + '%)';
const entry = {}