Closed HenryWales closed 8 months ago
Thanks for the bug report! Languages names are currently a limitation of this version of LWT. As I tried to get rid of this kind of issue, I built robust tool for detecting a language in 2.8, so I will try to fix everything with 2.9!
In the meantime, the simplest solution is to keep unmodified language names...
I already though of a language code system, but as explained in #86 , new features should go to jzohrab/lute, the current purpose of this project is too maintain backward compatibility more than anything...
The issue is fixed, I changed the way things work.
Before: use language name → search in languages array
After: use languages id → get language name + translator URI → search in languages array with name. → if not found, use translator URI.
It won't work still if you change language name AND use an unknown translator URL. In this last case I will try to look for a small review of the text-to-speech feature.
At any rates, the warnings won't show whatever happens!
In the original LWT, apart from populating initial fields on creation the name of a language didn't matter.
Here, it is used to convert into language-code for text-to-speech.
This mean that an unrecognized language name displays an error message on every single text.
I propose that instead of doing the conversion every time, the language-code is added as a field when creating or editing a language. This allows the use of native language names instead of the english names without breaking TTS or displaying errors at the top of each text.