This issue occurs on both mobile and desktop. However, as I will explain, it is much more of an issue on mobile than desktop.
On the Kagi Translate Android app, if you have text written the in box to be translated, if you hit the "swap language" double arrow button at the bottom before it has translated the text, it will erase what was written.
On desktop/web, if you write something and quickly (before translation has finished) press the double arrow button, it will erase what you wrote and replace it with whatever was previously there (without the added/removed text).
Steps to replicate on mobile:
- Open Kagi Translate app on Android
- Start typing into the box that says "Type or Paste your text..."
- While the green skeleton loader is waiting, click the double arrow "swap language" button
- Written text will be erased and will again show "Type or Paste your text..."
Steps to replicate on desktop:
--> note that this is a lot harder to replicate, because desktop seems to translate quicker and it even doesn't always work (which is good, actually)
- Open translate.kagi.com
- Type something into the "Start typing some text...." box. Let it translate.
- Now type something else, i.e. add a sentence, then quickly swap languages with the double arrow button.
- Translate does not erase the entire sentence (i.e. back to the "Start typing..." part), but it does erase the newly written part.
The mobile app is a lot more of a pain, as often when I am in need of translation this is how I usually do it (did it, on GTranslate) and expect it to work:
- I have a sentence I want to translate. I open the app. The app defaults the translating/translated languages to whatever I was using last time I used the app. Lets say I am wanting to translate German into English. However, the app loads with translating English into German (the state I left it last time I used it).
- I tap into the text box and immediately start writing my sentence, in German.
- It is now translating this German-written sentence from English to German (green skeleton loading animation). While this is working, I notice that the languages need to be switched so that it translates from German into English. I click the double arrow button to swap them and it erases the text.
--> What I expected to happen: When I click the double arrow, it will keep my written German text as-is and simply switch the languages and re-translate the same sentence.
I am thinking this comes from how switching is currently implemented, where when you click it, the text from translated side is moved into the text input box and re-translated. But in the case where the translation hasn't been produced yet, then there is no text to switch to the text input side, so it just blanks it. If you leave it to finish the translation, it works correctly (i.e. English text in the German side just turns into English in the English side, so switching the language works as it switches the English sentence over with the language, but only if the translation has finished).