Litarvan / lightdm-webkit-theme-litarvan

Litarvan's LightDM HTML Theme
BSD 3-Clause "New" or "Revised" License
707 stars 73 forks source link

Distinguish zh_CN & zh_TW #188

Closed ZaynChen closed 1 year ago

ZaynChen commented 1 year ago

This commit fix https://github.com/Litarvan/lightdm-webkit-theme-litarvan/issues/168.

It will try to use language name and territory to find code in lightdm.languages. If territory is undefined, it will use name to find the code and is unable to distinguish zh_CN & zh_TW.

zh is the name of language, which in this case is chinese. CN(for China) & TW (for Taiwan) is the territory.

lakejason0 commented 1 year ago

I'd say we should use the word "region".

ZaynChen commented 1 year ago

On POSIX platforms such as Unix, Linux and others, locale identifiers are defined by ISO/IEC 15897, which is similar to the BCP 47 definition of language tags, but the locale variant modifier is defined differently, and the character set is included as a part of the identifier.[citation needed] It is defined in this format: [language[_territory][.codeset][@modifier]]. (For example, Australian English using the UTF-8 encoding is enAU.UTF-8.) -- [wikipedia](https://en.wikipedia.org/wiki/Locale(computer_software))

Sorry, it's because the locale is defined in format [language[_territory][.codeset][@modifier]], and lightdm using name, code and territory to get the language information. So I don't think we should use another word.

lakejason0 commented 1 year ago

On POSIX platforms such as Unix, Linux and others, locale identifiers are defined by ISO/IEC 15897, which is similar to the BCP 47 definition of language tags, but the locale variant modifier is defined differently, and the character set is included as a part of the identifier.[citation needed] It is defined in this format: [language[_territory][.codeset][@modifier]]. (For example, Australian English using the UTF-8 encoding is enAU.UTF-8.) -- [wikipedia](https://en.wikipedia.org/wiki/Locale(computer_software))

Sorry, it's because the locale is defined in format [language[_territory][.codeset][@modifier]], and lightdm using name, code and territory to get the language information. So I don't think we should use another word.

hmm, makes sense then.

Litarvan commented 1 year ago

That's really cool! Thanks :)