dialect-app / dialect

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

Listen button is greyed out when translating from Chinese #197

Closed ptrv closed 3 years ago

ptrv commented 3 years ago

I'm using dialect 1.3.0 flatpak version from flathub on Fedora 34. When translating from simplified Chinese the listen button is greyed out. The backend is Google Tanslate.

Screenshot from 2021-09-15 00-21-36

rafaelmardojai commented 3 years ago

Hmm, the issue could be caused because py-googletrans the library we use for Google Translate support defines Simplified Chinese with the code zh-cn, but gTTS the library for Google Text-to-Speech defines it as zh-CN.

We can easily workaround it when checking if the language has Text-to-Speech support.