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