This commit is contained in:
2020-12-10 17:45:24 +00:00
parent 19ee14ca85
commit a3756f93ac

View File

@@ -116,10 +116,8 @@ export default {
transData.data.forEach(function commitFetchedTranslationItemToStore(
item
) {
console.log("Committing new translation:", item);
window.$gz.store.commit("setTranslationText", item);
});
console.log("Resolving fetch");
return resolve();
});
},
@@ -302,17 +300,14 @@ export default {
//clean up the keys for fetching
let keysToCache = found.map(z => z.replace("LT:", ""));
console.log("Caching:", keysToCache);
//cache / fetch any that are not already present
//(async () => {
await this.cacheTranslations(keysToCache);
// })();
console.log("done Caching");
//replace
found.forEach(z => {
let translated = this.get(z.replace("LT:", ""));
console.log("doreplace:", { z: z, translated: translated });
//replace all
ret = ret.split(z).join(translated);
});