This commit is contained in:
2020-06-24 21:31:54 +00:00
parent e5a494c120
commit 77621a4c9c
2 changed files with 7 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ export default {
//or they just edited a translation and saved it in translation editor and it's also their own local translation
if (editedTranslation) {
console.log("Updating local translation");
//iterate the keys that are cached and set them from whatever is in editedTranslation for that key
window.$gz._.forOwn(window.$gz.store.state.translationText, function(
cacheval,

View File

@@ -336,6 +336,10 @@ export default {
vm.obj.concurrency = res.data.concurrency;
//Update local copy of translations if that's the same one in use
console.log(
"Editing active translation=",
vm.editingActiveTranslation
);
if (vm.editingActiveTranslation) {
await window.$gz.translation.updateCache(vm.obj);
}
@@ -588,8 +592,9 @@ async function fetchTranslatedText(vm) {
async function setEditingActiveTranslation(vm) {
if (vm.$route.params.recordid != 0) {
let res = await window.$gz.api.get("user-option/" + vm.$store.state.userId);
vm.editingActiveTranslation =
res.translationId == vm.$route.params.recordid;
res.data.translationId == vm.$route.params.recordid;
}
}
</script>