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

[Feature request] Display alternative translations #154

Closed TSnatch72 closed 2 years ago

TSnatch72 commented 2 years ago

A very useful feature Google Translate has is that it shows you alternative translations (couples by their own alternative translations) ordered by frequency. Since Simply gathers the translations from google translate, it should be possible to also gather these. I believe adding this layout to the main screen would be a great QOL feature

Maybe even copying g translate's layout would work well

ManeraKai commented 2 years ago

The SimplyTranslate server app fetches data from: https://translate.google.com/m. That link doesn't include alternative words. This issue should be addressed though @metalune1

TSnatch72 commented 2 years ago

I use a translation software on my pc that does a similar thing to simply called crow. It's able to show alternative words from various translators other than google like bing and yandex. Maybe its code and implementation of can give us the answer to this issue. You guys should give it a check

ManeraKai commented 2 years ago

Sorry for being late. Many things happening IRL. Anyway, I was trying to push a PR for the server application to find this comment: image

ManeraKai commented 2 years ago

This was the way that is in the desktop app that you use. It may be suitable for a client app, but not for servers that handle so much traffic.

ManeraKai commented 2 years ago

I think this may require scrapping the information from the webpage.

TSnatch72 commented 2 years ago

So is it doable?

ManeraKai commented 2 years ago

I think that is what the Newpipe and invidious team did with youtube. Faking a videoplayer as I heard. Yes, Doable. We'll try.

TSnatch72 commented 2 years ago

Sweet!!! Godspeed with the project and keep up with the good work!

ManeraKai commented 2 years ago

For some updates, I was able to produce this: https://gist.github.com/ManeraKai/319e0fdc5583d90b018aea1115d8bdff

ManeraKai commented 2 years ago

After some more work: https://github.com/ManeraKai/google-translate-scrapper

ManeraKai commented 2 years ago

Yesterday, I sent a two patches to SimplyTranslate: https://lists.sr.ht/~metalune/simplytranslate-devel/%3CVI1P193MB04933897904C83FA48E2E33ADF5F9%40VI1P193MB0493.EURP193.PROD.OUTLOOK.COM%3E https://lists.sr.ht/~metalune/simplytranslate-devel/patches/28730 And waiting

ManeraKai commented 2 years ago

@Valdnet @Aga-C This is how it looks, only use the Dark theme as I didn't optimize the colors for the White theme yet.

ManeraKai commented 2 years ago

If you were a little bit confused of where did I get those colors from, well they're the same colors that I've chosen for the main "web" version of SimplyTranslate https://simplytranslate.org/. Do they look good and contrasty on Android too?

ManeraKai commented 2 years ago

Forgot about the binary 😅: https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/2187138545

Aga-C commented 2 years ago

I always use Dark theme where it is possible, so for me this colors looks very good 👍 The only thing is missing space between Noun and Verb in Translations: image

ManeraKai commented 2 years ago

I've been refining it and added white theme support. Took your note an here's how it looks: https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/2188095808

Aga-C commented 2 years ago

Space is now ok, but why you've changed colors? They are less visible now on dark theme. Also, in definitions there is less information than it was before (see the screenshot below and compare it to the previous one).

image

ManeraKai commented 2 years ago

oops!

The definitions have the same information but in a more elegant way.

ManeraKai commented 2 years ago

https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/2188308074

Aga-C commented 2 years ago

The definitions have the same information but in a more elegant way.

There is less info, you aren't showing synonyms.

App: image

Website: image

ManeraKai commented 2 years ago

oh sorry I thought you were talking about translations. will change it.

ManeraKai commented 2 years ago

Turns out It was just a misplacement of an if statement https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/2189896605

Aga-C commented 2 years ago

Looks fine 🙂

ManeraKai commented 2 years ago

Man this request took long, but here we are!

I'll close the issue 👍️

Valdnet commented 2 years ago

@ManeraKai Very good job 👍. It looks nice and professional.

Note:

  1. Issue #196 needs to be corrected.
  2. To me, it looks weird when text starts with a lowercase letter after the bullet point.

obraz

I suggest that you do it like it is in Google Translate, i.e. bullet in the border and omit the dot. But that's just my suggestion.

@Aga-C What do you think about this?

Aga-C commented 2 years ago

@Valdnet It doesn't matter to me.

ManeraKai commented 2 years ago

It's like this in GoogleTranslate: image There's is a numbering scheme

ManeraKai commented 2 years ago

oh worry wrong issue with the commit.

Valdnet commented 2 years ago
  1. When using TTS for translated text, it also reads "Definitions translations text".
  2. In the latest version from the artifact, the display of alternative translations does not work.

@ManeraKai Is this the correct behavior of the application?

ManeraKai commented 2 years ago

btw the copy button is working fine: https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/2228558244

I will add the translation strings later as I want to release a new version soon.

Valdnet commented 2 years ago

For a window with translated text, when it is empty:

  1. "Zoom" and "TTS" buttons active.
  2. After tapping the "Zoom" button an error appears.
ManeraKai commented 2 years ago

https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/2229095138

Valdnet commented 2 years ago

@ManeraKai Display alternative translations does not work. Is this due to an application error? Is it a maladjustment of web applications to the new function?

ManeraKai commented 2 years ago

It's working for me. Which string did you translate?

Valdnet commented 2 years ago

Now works correctly after changing the instance:+1:.

Valdnet commented 2 years ago

Everything works correctly :+1:. Before a new version is released, in my opinion new translations should be downloaded.

ManeraKai commented 2 years ago

you mean from weblate?

Valdnet commented 2 years ago

Yes :wink:.

ManeraKai commented 2 years ago

I already did that before some days. They're up-to-date right now.

Valdnet commented 2 years ago

What about translations for "Customize Buttons" settings and other new text strings? Are they exported to Weblate? I did not notice these strings 😉.

ManeraKai commented 2 years ago

I'll do but after the release. Can you open a new issue for the release @Valdnet?

Aga-C commented 2 years ago

@ManeraKai Please wait for translations, or if you need to do this right now, at least release the app more often, so people can have strings translated.

ManeraKai commented 2 years ago

This time I want it fast as there's an incompatibility problem with almost all the instances.

Valdnet commented 2 years ago

Add text strings to Weblate and we will translate at least quickly into Polish to see if all the strings are correctly implemented in the code before the release. Remember to download translations before release.

@Aga-C will you translate?

Aga-C commented 2 years ago

@Aga-C will you translate?

Yes.

Valdnet commented 2 years ago

Can you open a new issue for the release @Valdnet?

Created 😉.

ManeraKai commented 2 years ago

I'll close this issue and add translation support in #199.