daid / EmptyEpsilon

Open source bridge simulator. Build with the SeriousProton engine.
https://daid.github.io/EmptyEpsilon/
GNU General Public License v2.0
520 stars 173 forks source link

Theme selection in option menu #2088

Closed Tsht closed 1 month ago

Tsht commented 2 months ago

Every theme found in gui, *.theme.txt, are loaded when entering option screen. This is primarily to test validation.

muerteFR commented 1 month ago

@Tsht By theme, do you mean just changing the font in the future ?

muerteFR commented 1 month ago

And, the translation tag was not added to be able to translate the word "Default". Can you add it?

Tsht commented 1 month ago

@muerteFR Hello. Theme is a mechanism to modify some elements for the UI, look for instance in : https://github.com/daid/EmptyEpsilon/blob/master/resources/gui/default.theme.txt You can copy this file to another file and edit, or edit it directly.

I don't know if it makes sense to translate "default" as it's just the file name... If you create "other.theme.txt", then you will have the choice to also select "other". Themes really don't have specific names, so I showed them in UI by this convention. Translating this would be confusing I think ?

muerteFR commented 1 month ago

Thank you for these explanations. :-) For the translation, I was just talking about translating the word. “Default” is "Défaut" in French or even “Par défaut”. Not necessarily to translate the others who will arrive later and whose names will surely be proper nouns. This is weird, it's the only untranslated word in the options. default

Tsht commented 1 month ago

Maybe someting like "default (Default theme)" translated : "default (thème par défaut)" ? It's the default provided theme, but also a "fallback" theme, and should always be named : default.theme.txt

muerteFR commented 1 month ago

Yes it would be good like that.

daid commented 1 month ago

problem is, this name comes directly from the filename, so that isn't translation aware. Not sure how to fix that yet.

muerteFR commented 1 month ago

ok

daid commented 1 month ago

But, if there is only 1 theme, I made this selector hidden, so per default you won't see it right now. Gives us some time to test this and think about how to translate it before it's default exposed.

aBlueShadow commented 1 month ago

This is weird, it's the only untranslated word in the options.

Actually, not quite. The language indicator is not translated either. Basically the same thing, in that it is just part of the filename(s). I think that works because many people are used to those indicator, so they serve as some kind of proper name. Also it makes it easier to change the language back, if you don't know what a language is called in another one. One easy fix for the default theme, later when more themes are added, might be to make make it proper-name-ish, like "EE-default". That works for desktop themes, so I think it can work for EE as well.