karaoke-dev / karaoke

Will be the best karaoke system.
http://blog.karaoke.dev
GNU General Public License v3.0
205 stars 16 forks source link

Show locale code in lyric translation list #2262

Open CloneWith opened 1 month ago

CloneWith commented 1 month ago

When the font needed for displaying characters in the translation language selection list, they are shown as ?. Thus it might be nice to display a corresponding language code beside each entry (e.g. "中文 (zh)"), after all you use language codes for searching.

Locale List in karaoke settings screen

And is the list a little too long? 🤔

andy840119 commented 1 month ago

I geuss it's because it shows the whole coltureInfo (language and language with culture) e.g.

I'm not very sure which one should be used eventually.

andy840119 commented 1 month ago

And ????? is because some character is not supported in the font store. "中文 (zh)" might be "?? (zh)" if font store does not support the chinese character.

CloneWith commented 1 month ago

I'm not very sure which one should be used eventually.

Me too. And what about detecting system locale as the default setting?

Just now I tried to use CultureInfo.CurrentUICulture and CurrentCulture for locale detection, which both return 中文. I think it can't assert the precise locale where we are, since it isn't always bonded with language ("中文(新加坡)", etc. exist)

As of now, it's better to keep both of them, and users might select the most suitable one manually.

andy840119 commented 1 month ago

And what about detecting system locale as the default setting?

Should be better to follow the language in lazer, but lazer use the enum. Maybe write utils to convert the enum to CultureInfo will be the final solution This is lower priority because user can still change it.