This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user