Fixed
Status Update
Comments
an...@google.com <an...@google.com>
kl...@google.com <kl...@google.com> #2
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit d2cc33eb7036a34dd6d7858f83735428929fa5ac
Author: Karl Lindmark <karl.lindmark@swedbank.se>
Date: Thu Feb 24 22:40:52 2022
Add support for plurals resources in Compose
Fixes: b/191375123
Test: Two new tests in StringResourcesTest.kt for plurals resources
Relnote: "Plural resources are now supported via the `pluralStringResource` functions."
Change-Id: Ib2f23431f0fc24a5c717a21b6309a928b2f78b91
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/res/StringResources.android.kt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/res/StringResourcesTest.kt
M compose/ui/ui/api/current.txt
M compose/ui/ui/src/androidAndroidTest/res/values/donottranslate-strings.xml
M compose/ui/ui/api/public_plus_experimental_current.txt
https://android-review.googlesource.com/1999932
Branch: androidx-main
commit d2cc33eb7036a34dd6d7858f83735428929fa5ac
Author: Karl Lindmark <karl.lindmark@swedbank.se>
Date: Thu Feb 24 22:40:52 2022
Add support for plurals resources in Compose
Fixes:
Test: Two new tests in StringResourcesTest.kt for plurals resources
Relnote: "Plural resources are now supported via the `pluralStringResource` functions."
Change-Id: Ib2f23431f0fc24a5c717a21b6309a928b2f78b91
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/res/StringResources.android.kt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/res/StringResourcesTest.kt
M compose/ui/ui/api/current.txt
M compose/ui/ui/src/androidAndroidTest/res/values/donottranslate-strings.xml
M compose/ui/ui/api/public_plus_experimental_current.txt
Description
Component used: compose.ui:ui Version used: 1.0.0-beta04 Devices/Android versions reproduced on: Any
I was looking to see if we have a way to load plural string resources and didn't spot anything in AOSP unless I'm missing it / another way to do this idiomatically?
Example plural string resource:
Workaround: