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

Text Recognition #169

Closed Valdnet closed 1 year ago

Valdnet commented 2 years ago

Steps:

  1. Turn off data transfer.
  2. Tap on the camera icon.
  3. Select "Install".
  4. Go to settings.
  5. Select "Text Recognition".

Information about the downloaded language is displayed even though it was not installed:

obraz

Valdnet commented 2 years ago

When downloading all languages, the languages that have already been downloaded are downloaded again (the download progress wheel informs you about it):

obraz obraz

ManeraKai commented 2 years ago

Should I keep the download all feature. It really is just for someone that wants to play. No one will use it IRL. I'm saying that because the download all is a little bit complicated.

Valdnet commented 2 years ago

It must be clear to the user what he has downloaded and what else he can download despite whether or not this feature will be used frequently. If we already add such an option, it must work properly 😉.

ManeraKai commented 2 years ago

I just meant the Install all button.

Valdnet commented 2 years ago

I just meant the Install all button.

OK. The button itself tells the user that it is installing everything.

ManeraKai commented 2 years ago

OK, I will fix it.

Valdnet commented 2 years ago

OK, I will fix it.

I don't know if you got me right. The "Install all" problem may stay that way. The user choosing to install everything is aware that he is installing all languages. And whether it re-installs them, or just the ones that are already installed, it doesn't really matter. The user only wastes a little time downloading.

But the problem described in the first post should be corrected.

ManeraKai commented 2 years ago

Still maturing it but I think the problem is fixed: https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/1701929155

ManeraKai commented 2 years ago

I may deleted install all for now. Don't worry, I will added it

ManeraKai commented 2 years ago

Or should I? I'm really not seeing a purpose from it.

Valdnet commented 2 years ago

Steps:

  1. Select the camera icon.
  2. Select the "Install" button.

While installing "Text Recognition", I cannot see the download progress bar as it was before:

obraz

ManeraKai commented 2 years ago

I think it works in this one: https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/1704801468

Valdnet commented 2 years ago

Steps:

  1. Select the camera icon.
  2. Select "Install".
  3. Select "Cancel".
  4. Go to the application settings.
  5. Select "Text Recognition".

The download completes even though the installation is canceled.

ManeraKai commented 2 years ago

Fixed: https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/1705212904

Valdnet commented 2 years ago

I. Steps:

  1. Select "Settings".
  2. Select "Text Recognition".
  3. Tap on any language to install.

During the language installation, the button (installation progress) is still active and you can tap continuously, which causes the language installation process to be repeated.

II. Steps:

  1. Tap the camera icon.
  2. Select "Install".
  3. Tap next to the loading progress window.
  4. Tap the camera icon again.

The "Text Recognition" installation process is not finished yet and the application allows you to start the camera.

ManeraKai commented 2 years ago

Fixed: https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/1708623672

Valdnet commented 2 years ago

Steps:

  1. Tap the camera icon.
  2. Select "Install".
  3. Once installed, go to the "Text Recognition".

The icon for the installed language does not change.

ManeraKai commented 2 years ago

Isn't this the same as the first bug?

ManeraKai commented 2 years ago

np: https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/1709182922

Valdnet commented 2 years ago

Can these error messages be added to the translation so that they are meaningfully understood by the user?

obraz obraz

These are error messages from the ready plug-in and are taken from Android.

ManeraKai commented 2 years ago

The second one should is too technical I think. The first one I'll search for it.

ManeraKai commented 2 years ago

image Here are they. Apparently they're untranslatable, but I can add something like if (camera.isGranted())

Valdnet commented 2 years ago

Here are they. Apparently they're untranslatable, but I can add something like if (camera.isGranted())

Good idea 👍. This will resolve unreadable error messages 😉.

ManeraKai commented 2 years ago

Did that: https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/1715274831

Valdnet commented 2 years ago

Steps:

  1. Run "Text Recognition".
  2. Turn the smartphone over to a horizontal position.
  3. Take a picture of the text.
  4. Place the smartphone vertically.

Sometimes the application window does not return to a vertical position. The application stops after a long time.

obraz

Aga-C commented 2 years ago

Translation is blocked on Weblate ("main" component).

ManeraKai commented 2 years ago

@Aga-C it got some conflicts because I added a new string. Will fix it.

ManeraKai commented 2 years ago

Translation is blocked on Weblate ("main" component).

@Aga-C Fixed it... Hopefully.

ManeraKai commented 2 years ago

@Valdnet Fixed it too: https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/1718532979

Valdnet commented 2 years ago

Steps:

  1. Run "Text Recognition".
  2. Turn the smartphone over to a horizontal position.
  3. Take a picture of the text.
  4. Place the smartphone vertically.
  5. Turn the smartphone over horizontally again.

Sometimes the application window does not span the entire screen:

obraz

ManeraKai commented 2 years ago

I think this has something to do with skipping frames due to overload on the main thread. I will begin optimizing the tesseract_ocr in the next release. What do you think @Valdnet?

Valdnet commented 2 years ago

It also seems to me that this is a performance issue (this may be because it is in debug mode). So the tests are complete. A new version can be released 😉.

Issue to close?

ManeraKai commented 2 years ago

No, keep it open as we'll complete improving it unless you want to open a dedicated issue for performance thingies.

Valdnet commented 2 years ago

We will leave him open to possible issues 😉.

tswistak commented 2 years ago

Unfortunately, for me, it doesn't work. When I take a photo, loader appears and then apps hangs (there is this Android window that app is not responding). Even if I click "Wait", app crashes after a while.

My phone: OnePlus 8 Pro with Android 11.

Aga-C commented 2 years ago

The text recognition usually works very slow and can hang a bit. After recognition, it sometimes selects some noise what causes displaying strange characters during translation - it seems that it depends on the sharpness of the text and surface.

Valdnet commented 2 years ago

When I take a photo, loader appears and then apps hangs (there is this Android window that app is not responding).

I had such frequent crashes on the debug version.

ManeraKai commented 2 years ago

This needs optimization and some improvements on text recognition.