vanniktech / multiplatform-locale

Type Safe Kotlin Multiplatform Locale implementation
Apache License 2.0
22 stars 3 forks source link

use emoji-function #181

Closed westnordost closed 1 month ago

westnordost commented 1 month ago

While I was browsing the code, I noticed that you manually maintain a list of country flag emojis. This is not necessary, they can be derived from the ISO 3166-1 alpha-2 code. See https://en.wikipedia.org/wiki/Regional_indicator_symbol

vanniktech commented 1 month ago

I like it, thanks! Could you extend the country test case to also include the flag?

westnordost commented 1 month ago

Hm? I didn't change the interface, so the tests should work as before.

vanniktech commented 1 month ago

Yes. The current tests are not checking for the emoji: https://github.com/vanniktech/multiplatform-locale/blob/03561cd84e1ff4a8a630a2b143ee7ef26b731e26/multiplatform-locale/src/commonTest/kotlin/com/vanniktech/locale/CountryTest.kt#L61

westnordost commented 1 month ago

Hm, I see, but then, basically, one still would have to maintain the flag emojis manually, but instead in the test code. So in the end, nothing is won. I'll rather close this PR in this case.

vanniktech commented 1 month ago

Yeah but it would be auto generated and isn't too bad. Don't worry I can get to it also.