This commit is contained in:
@@ -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
|
//or they just edited a translation and saved it in translation editor and it's also their own local translation
|
||||||
|
|
||||||
if (editedTranslation) {
|
if (editedTranslation) {
|
||||||
|
console.log("Updating local translation");
|
||||||
//iterate the keys that are cached and set them from whatever is in editedTranslation for that key
|
//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(
|
window.$gz._.forOwn(window.$gz.store.state.translationText, function(
|
||||||
cacheval,
|
cacheval,
|
||||||
|
|||||||
@@ -336,6 +336,10 @@ export default {
|
|||||||
vm.obj.concurrency = res.data.concurrency;
|
vm.obj.concurrency = res.data.concurrency;
|
||||||
|
|
||||||
//Update local copy of translations if that's the same one in use
|
//Update local copy of translations if that's the same one in use
|
||||||
|
console.log(
|
||||||
|
"Editing active translation=",
|
||||||
|
vm.editingActiveTranslation
|
||||||
|
);
|
||||||
if (vm.editingActiveTranslation) {
|
if (vm.editingActiveTranslation) {
|
||||||
await window.$gz.translation.updateCache(vm.obj);
|
await window.$gz.translation.updateCache(vm.obj);
|
||||||
}
|
}
|
||||||
@@ -588,8 +592,9 @@ async function fetchTranslatedText(vm) {
|
|||||||
async function setEditingActiveTranslation(vm) {
|
async function setEditingActiveTranslation(vm) {
|
||||||
if (vm.$route.params.recordid != 0) {
|
if (vm.$route.params.recordid != 0) {
|
||||||
let res = await window.$gz.api.get("user-option/" + vm.$store.state.userId);
|
let res = await window.$gz.api.get("user-option/" + vm.$store.state.userId);
|
||||||
|
|
||||||
vm.editingActiveTranslation =
|
vm.editingActiveTranslation =
|
||||||
res.translationId == vm.$route.params.recordid;
|
res.data.translationId == vm.$route.params.recordid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user