dialect-app / dialect

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

Allow fallingback to provider lang name if we don't have it #315

Closed rafaelmardojai closed 1 year ago

rafaelmardojai commented 1 year ago

About languages code normalization, I think we will need something more elaborated that can allow us to make comparisons between providers, like checking if a lang is available for TTS.

rafaelmardojai commented 1 year ago

About languages code normalization, I think we will need something more elaborated that can allow us to make comparisons between providers, like checking if a lang is available for TTS.

Committed an implementation resolving this.

But now I think the "denormalization" should be made outside right? So we don't have to call this function on every provider.

rafaelmardojai commented 1 year ago

@fushinari Now I'm kind of happy with this, so is ready to review and merge.

rafaelmardojai commented 1 year ago

Language hinting for "Auto" seems to be broken right now. And "nonstandard" is probably more correct than "unstandard". Other than that, lgtm!

Fixed both.

Tested translating from and to two languages that aren't present on languages.LANGUAGES: Captura desde 2023-02-21 17-01-19