ManeraKai / simplytranslate_mobile

Privacy friendly frontend to Google Translate
https://manerakai.github.io/simplytranslate_mobile/
GNU General Public License v3.0
173 stars 15 forks source link

"Paste" icon after translation #57

Closed Valdnet closed 3 years ago

Valdnet commented 3 years ago

Steps:

  1. Enter the text to translate.
  2. Tap the "Translate" button.
  3. Tap the "Paste" icon.

Unable to paste text into existing text in the window to be translated (this causes the "pipe" to be missing).

I suggest: Either the "Paste" icon should be gray to let the user know that pasting is inactive, or the text should be pasted at the end of the sentence.

obraz

ManeraKai commented 3 years ago

You mean at the moment of requesting and loading from the server, you pressed on the paste button?

Valdnet commented 3 years ago

Not. After translation, when the | sign disappears from the text the "Paste" icon is still active. This proves that the user can still paste the text into the translation. If the button "Paste" is blunted, no action is taken (it does not attach the text to the end of the sentence).

Ideally, the icon should be gray until the user again selects where to paste the text.

ManeraKai commented 3 years ago

Is the cursor the pipe sign?

Valdnet commented 3 years ago

Is the cursor the pipe sign?

Yes. Professionally, this is what it is called 😉.

After translating the text:

obraz

After selecting where to paste the text in the window:

obraz

Valdnet commented 3 years ago

But you have to take into account that if the window is empty (when starting the application), you can paste the text directly via the "Paste" icon 😉.

ManeraKai commented 3 years ago

Fixed it. There was a bug in the code. It was looking for cursor's position but didn't found it. That's why it didn't paste. Now it will paste every time.