Browse Source

Handle special characters for quantity strings (#4543)

A follow-up PR for #4519, which handles special characters for quantity
strings.
pull/4500/merge v1.6.10-dev1551
Chanjung Kim 8 months ago committed by GitHub
parent
commit
04edeed084
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/StringResources.kt

2
components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/StringResources.kt

@ -81,7 +81,7 @@ private suspend fun parseStringXml(path: String, resourceReader: ResourceReader)
val pluralCategory = PluralCategory.fromString( val pluralCategory = PluralCategory.fromString(
element.getAttribute("quantity"), element.getAttribute("quantity"),
) ?: return@mapNotNull null ) ?: return@mapNotNull null
pluralCategory to element.textContent.orEmpty() pluralCategory to handleSpecialCharacters(element.textContent.orEmpty())
} }
pluralElement.getAttribute("name") to StringItem.Plurals(items.toMap()) pluralElement.getAttribute("name") to StringItem.Plurals(items.toMap())
} }

Loading…
Cancel
Save