You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resources are not namespaced to avoid colliding with custom resources.
We noticed this when our app's R.string.done was overridden and translated. We only support english, but because the same resource is declared and translated in the Stripe SDK, it also translates this string in our buttons. Despite us not having any translations.
To fix this, I'd recommend adding a stripe prefix to all string resources.
Code to reproduce
Create an app with text resource <string name="done">Done</string>
Create a TextView with android:text="@string/done"
Import the Stripe SDK.
Change system language to german (or any other language supported by Stripe).
TextView text will will be overridden and translated by the Stripe SDK.
I just merged a change where we now prefix our strings with stripe_. In a follow-up, I’ll add the same for other resources and add enforcement to avoid any regressions.
Summary
Resources are not namespaced to avoid colliding with custom resources.
We noticed this when our app's R.string.done was overridden and translated. We only support english, but because the same resource is declared and translated in the Stripe SDK, it also translates this string in our buttons. Despite us not having any translations.
To fix this, I'd recommend adding a
stripe
prefix to all string resources.Code to reproduce
Create an app with text resource
<string name="done">Done</string>
Create a TextView with
android:text="@string/done"
Import the Stripe SDK.
Change system language to german (or any other language supported by Stripe).
TextView text will will be overridden and translated by the Stripe SDK.
Android version
All supported versions
Impacted devices
All devices
Installation method
Gradle
Dependency Versions
20.19.2
Other information
Similar issue: #1656
The text was updated successfully, but these errors were encountered: