TCEC-Chess / tcecgui

Apache License 2.0
16 stars 15 forks source link

Selecting a custom language json file sets the language the french #238

Closed HelixPiano closed 3 years ago

HelixPiano commented 3 years ago

Basically the title. When you click "..." to load a custom json file it will set the language automatically to french, even before you've selected any file.

octopoulos commented 3 years ago

It's on purpose, not a bug. That only happens if you had English selected. Try with another language and then ... It doesn't actually set the language to French, it just does this so you can select ... again.

HelixPiano commented 3 years ago

Ah ok. I found the problem. My json file had an error and so it didn't load but instead defaulted back to the selected language.

octopoulos commented 3 years ago

Ah I see. Anyway, this feature ... is quite useful indeed!

Also, I can tell you why it changes to French instead of staying English: the code doesn't translate anything if the language is English, so if it stayed English when you load your custom file, then it wouldn't translate anything because it thinks "oh it's English, so I don't do anything.", and that's why I have to make it believe that it's another language.

And if it became ... then it would work, but then you can't load your new file again because it's already on ..., so you would have to select another language and then ... again, which is 2 steps, but with my solution, it's only 1 step.