dialect-app / dialect

A translation app for GNOME.
https://dialectapp.org/
GNU General Public License v3.0
597 stars 69 forks source link

fix(translators/google): propagate api exceptions #212

Closed sorin-davidoi closed 3 years ago

sorin-davidoi commented 3 years ago

The default is False (https://github.com/ssut/py-googletrans/blob/d15c94f176463b2ce6199a42a1c517690366977f/googletrans/constants.py#L186). Shows "Translation failed. Please check for network issues" when the API returns 429 Too Many Requests. While the message is a bit misleading (there are no network errors), it's an improvement over the current situation (the input test is shown as the output and no errors are reported to the user).

Closes https://github.com/dialect-app/dialect/issues/151.

rafaelmardojai commented 3 years ago

Thanks!

While the message is a bit misleading

Yeah true, that can be improved latter. We should split network errors from server ones.