Skip to content

Commit

Permalink
Technical: Update multiplatform-locale to 0.8.0 (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanniktech committed Aug 2, 2024
1 parent bfe95ae commit b0e7d44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ kotlinx-datetime = "org.jetbrains.kotlinx:kotlinx-datetime:0.6.0"
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.7.1" }
ktor-client-core-jvm = { module = "io.ktor:ktor-client-core-jvm", version.ref = "ktor" }
ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" }
multiplatform-locale = { module = "com.vanniktech:multiplatform-locale", version = "0.7.0" }
multiplatform-locale = { module = "com.vanniktech:multiplatform-locale", version = "0.8.0" }
plugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
plugin-kotlin-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
plugin-shadowjar = { module = "com.github.johnrengelman:shadow", version = "8.1.1" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,11 @@ internal class InAppProducts : CoreCommand() {
.forEach { (locale, localisedInAppProducts) ->
val language = locale.language
val languageCode = language.legacyCode ?: language.code
val country = locale.country
val territory = locale.territory
val directory = stringsDirectory.resolve(
when {
language == Language.ENGLISH && country == Country.USA -> "values"
language.defaultCountry != country && country != null -> "values-$languageCode-r${country.code}"
language == Language.ENGLISH && territory == Country.USA -> "values"
language.defaultCountry != territory && territory != null -> "values-$languageCode-r${territory.code}"
else -> "values-$languageCode"
},
)
Expand Down

0 comments on commit b0e7d44

Please sign in to comment.