Support for Zulu language (#11644)

This commit is contained in:
SomeTroglodyte 2024-05-27 11:30:21 +02:00 committed by GitHub
parent f1c0288a43
commit 199a684409
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 21 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -139,7 +139,7 @@ FlagIcons/Korean
index: -1
FlagIcons/Latin
rotate: false
xy: 1636, 168
xy: 1772, 304
size: 100, 100
orig: 100, 100
offset: 0, 0
@ -277,3 +277,10 @@ FlagIcons/Vietnamese
orig: 128, 128
offset: 0, 0
index: -1
FlagIcons/Zulu
rotate: false
xy: 1636, 140
size: 128, 128
orig: 128, 128
offset: 0, 0
index: -1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

After

Width:  |  Height:  |  Size: 223 KiB

View File

@ -35,3 +35,4 @@ Traditional_Chinese = 92
Turkish = 99
Ukrainian = 99
Vietnamese = 98
Zulu = 0

View File

@ -251,7 +251,17 @@ class GameSettings {
enum class NationPickerListMode { Icons, List }
/** Map Unciv language key to Java locale, for the purpose of getting a Collator for sorting.
* - Effect depends on the Java libraries and may not always conform to expectations.
* If in doubt, debug and see what Locale instance you get and compare its properties with `Locale.getDefault()`.
* (`Collator.getInstance(LocaleCode.*.run { Locale(language, country) }) to Collator.getInstance())`, drill to both `rules`, compare hashes - if equal and other properties equal, then Java doesn't know your Language))
* @property name same as translation file name with ' ', '_', '-', '(', ')' removed
* @property language ISO 639-1 code for the language
* @property country ISO 3166 code for the nation this is predominantly spoken in
* @property trueLanguage If set, used instead of language to trick Java into supplying a close-enough collator (a no-match would otherwise give us the default collator, not a collator for a partial match)
*/
enum class LocaleCode(val language: String, val country: String, val trueLanguage: String? = null) {
Afrikaans("af", "ZA"),
Arabic("ar", "IQ"),
Belarusian("be", "BY"),
Bosnian("bs", "BA"),
@ -297,7 +307,7 @@ class GameSettings {
Turkish("tr", "TR"),
Ukrainian("uk", "UA"),
Vietnamese("vi", "VN"),
Afrikaans("af", "ZA")
Zulu("zu", "ZA")
}
//endregion

View File

@ -7,6 +7,7 @@ Flag Icons made by [Freepik](https://www.flaticon.com/authors/freepik) from [www
- [Catalan flag] by J0anJosep licensed under Public Domain
- [Rusyn flag] gimped from the wikipedia flag [Flag of Pannonian Rusyns](https://en.wikipedia.org/wiki/File:Flag_of_Rusyns_in_Serbia.svg) (CC-BY-SA 4.0)
- [Latin flag] made from [wikipedia entry for SPQR](https://en.wikipedia.org/wiki/SPQR#/media/File:Roman_SPQR_banner.svg), Creative Commons Attribution 3.0 Unported
- [Zulu flag] made from [wikipedia entry for the Z flag](https://en.wikipedia.org/wiki/Z_flag#/media/File:ICS_Zulu.svg): public domain
New Unciv logo made by u-ndefined on Discord