Closed darronschall closed 4 months ago
Hm, i'm not sure in android plurals, because i'm try two variants in native:
<resources>
<plurals name="android_res_test">
<item quantity="zero">zero chars "%s"</item>
<item quantity="one">%d char "%s"</item>
<item quantity="two">%d chars "%s"</item>
<item quantity="other">%d chars "%s"</item>
</plurals>
</resources>
And:
<resources>
<plurals name="android_res_test">
<item quantity="zero">zero chars "%s"</item>
<item quantity="one">%d char "%s"</item>
<item quantity="two">%d chars "%s"</item>
<item quantity="other">%d chars "%s"</item>
</plurals>
</resources>
Call inside activity:
this.resources.getQuantityString(R.plurals.android_res_test, 2, 2,"Same")
For all variants i'm get string without quotes.
If i'm add mirror for quotes: like: \"%s\"
or \"%s\"
then i'm get quoting around Same.
start of my research on android: https://developer.android.com/guide/topics/resources/string-resource
And if i'm add mirror in plurals of moko-resource it will be fine for android, but other platform has incorrect mirror for quot. Thanks for info
will be fixed in 0.24.0-beta-5
Given this plural:
iOS
The iOS plural generation in
Localizable.stringsdict
generates as:The quotes in those
<string>
elements should not be escaped. This is causing the string to show\"
instead of just"
:Note that replacing the
"
with"
does not make a difference - the generated output is still\"
.Android
For Android, the generated content in
multiplatform_plurals.xml
looks correct:However, when using
MR.plurals.search__results_for.format(0, 0, "Example")
, the resulting string drops the quotes entirely:Is this an Android issue somewhere inside
PluralFormattedStringDesc
?