Hello.
I've added some extra functionality to the admin dashboard and added 'translate' button to every translatable field, which uses the DeepL translation API.
The translations themselves work just fine, but there is some Vuejs background watcher which returns the form to its' original state and removes my translated strings from the textboxes..It happens once I manually type something in the other textboxes and/or hit the 'Save' button.
I debugged it and found out that the admin.js is indeed watching for changes in the UI, and it starts here -
And once it reaches the flushCallbacks() function (in the screenshot below) - it basically returns my form to its' "default" state (with the original DB values, if there are) before the translations were inserted into their textboxes.
I tried disabling the watcher on 'input' and 'submit' events, but now it results in 419 error on the laravel side.
Hello. I've added some extra functionality to the admin dashboard and added 'translate' button to every translatable field, which uses the DeepL translation API.
The translations themselves work just fine, but there is some Vuejs background watcher which returns the form to its' original state and removes my translated strings from the textboxes..It happens once I manually type something in the other textboxes and/or hit the 'Save' button.
I debugged it and found out that the admin.js is indeed watching for changes in the UI, and it starts here -
And once it reaches the flushCallbacks() function (in the screenshot below) - it basically returns my form to its' "default" state (with the original DB values, if there are) before the translations were inserted into their textboxes.
I tried disabling the watcher on 'input' and 'submit' events, but now it results in 419 error on the laravel side.