dialect-app / dialect

A translation app for GNOME.
GNU General Public License v3.0
595 stars 70 forks source link

Allow setting a GoogleTranslate host #259

Open linsui opened 2 years ago

linsui commented 2 years ago

In China mainland, only translate.google.cn is accessible. I'd like to only use it instead of a random host. Thanks!

mufeedali commented 2 years ago

Would you consider using your location to apply necessary workarounds to be a decent solution for this?

linsui commented 2 years ago

Do you mean selecting the host based on the system location? I would prefer that it's an option.

rafaelmardojai commented 2 years ago

@linsui The problem is that the random host is part of the approach to avoid posible Google bans. So exposing this setting to everyone might be a door to problems.

One "invisible" approach that we were thinking was to ask for geolocation access (using the org.freedesktop.portal.Location portal) in the first run so we can apply conditional fixes for the user country.

linsui commented 2 years ago

Got it! That makes sense. Would it be easier to just check the conectivity? My concern is that some Chinese users may have proxy setup and don't want to use google.cn.

rafaelmardojai commented 2 years ago

Would it be easier to just check the conectivity?

Right, I guess we could look for the better approach to detect this without user iteration when we get to it.

rafaelmardojai commented 2 years ago

My concern is that some Chinese users may have proxy setup and don't want to use google.cn

Also probably we will have a prompt before asking for the location, so they could just dismiss it.

linsui commented 1 year ago

Google shutdown the service in China. So this is not useful to me anymore. :shrug:

mufeedali commented 1 year ago

Google shutdown the service in China

Oh... sorry to hear that