stripe-android icon indicating copy to clipboard operation
stripe-android copied to clipboard

[BUG] Translation Errors

Open FlorentDambreville opened this issue 2 years ago • 3 comments

Summary

There are several missing translations for error message that we need. It is critical for us because our user often have payment issues.

Insufficient funds card declined card expired
image image image

Android version

Reproduced on android version 10, 11 & 12

Impacted devices

All our test devices : Samsung S20 Ultra 5G, Huawei P9 Lite and more...

Installation method

Maven dependency

Dependency Versions

kotlin: 1.6.21 stripe-android: 20.4.0 Android Gradle Plugin: 7.2.0 Gradle: 7.2.4

SDK classes

PaymentSheet

FlorentDambreville avatar May 24 '22 07:05 FlorentDambreville

Hey there!

Thanks for writing in. I'm curious how you're changing your device language. I was able to change my device language on my pixel 3a and got the error messages translated. They come from the server for us based on the Locale.

I'm wondering if our call with a locale is failing. Could you place a breakpoint here: https://github.com/stripe/stripe-android/blob/master/paymentsheet/src/main/java/com/stripe/android/paymentsheet/repositories/StripeIntentRepository.kt#L56 and let me know if the locale is correct and if the call is coming back?

You can use our example app or your own. But..... I'm wondering if you see the issue in our example app too.

skyler-stripe avatar May 25 '22 21:05 skyler-stripe

Hi Skyler,

Thanks for your answer

I see the same issue on your example app :

drawing

I placed a breakpoint on https://github.com/stripe/stripe-android/blob/master/paymentsheet/src/main/java/com/stripe/android/paymentsheet/repositories/StripeIntentRepository.kt#L56 and got this :

image

Is it because of the region GB ? It is strange that the entire text inside the PaymentSheet is in french but this error.

FlorentDambreville avatar May 30 '22 13:05 FlorentDambreville

I changed my phone region from United-Kindom to France

In the example app, the locale is now fr_FR

I got the french translation : drawing

I guess sometime you take the locale language and sometime you take the locale region ?

FlorentDambreville avatar May 30 '22 13:05 FlorentDambreville

Hi @FlorentDambreville 👋 We’ve fixed the issue now. Sorry that it took us so long. Please continue reaching out to us if you experience any other issues.

tillh-stripe avatar Nov 22 '22 16:11 tillh-stripe

Hello 👋

Happy new year 🥳

Thanks for your message Till. Unfortunately, we still have translation issue 😞 The error message "Your card has insufficient funds" is not translated in french.

drawing

We are using Stripe SDK version 20.17.0 (>= 20.16.2 which is suppose to contains the fix if I understand correctly). Note : we also tested with the 20.19.0 version and still have the issue.

We can provide dates, customer ID, payment intent id if needed (in private message or via support :))

Regards, Florent

FlorentDambreville avatar Feb 01 '23 14:02 FlorentDambreville

That’s odd. When I set my device language to French and use 4000 0000 0000 9995 to force an insufficient funds error, I see Votre carte a été refusée.

Can you share the ID of a payment intent where you have encountered this issue? (It’s safe to share this here, because you’d need the secret key or a client secret to do anything with it.)

tillh-stripe avatar Feb 01 '23 15:02 tillh-stripe

Yeah sure.

Here it is : pi_3MWGq1Jgn5Rr4DxU0Yk1bXUy

FlorentDambreville avatar Feb 02 '23 09:02 FlorentDambreville

Thanks, that’s very helpful. I noticed two things:

  1. The backend does return an English error message, even though the customer’s preferred locale is French. I’ll try to figure out why this is happening.
  2. Your payment intent requires a 3DS challenge, and the result of that is handled here without the client-side logic added last November.

I’ll update you once I find out more.

tillh-stripe avatar Feb 02 '23 14:02 tillh-stripe

Hello again,

Do you have any updates on the subject ?

This issue is pretty critical for us. We have 700 occurrences per day of this message. And most of our users complains because they don't understand why their payment has failed 😕

FlorentDambreville avatar Mar 14 '23 14:03 FlorentDambreville

Hi @FlorentDambreville! Sorry that this has taken a while.

I actually began looking into it again this morning. I wanted to see if we could make any server-side changes for the error message localization, but it doesn’t seem that easy. Therefore, like our iOS SDK, I’m adding client-side mapping for any errors that we receive in the authentication flows.

I’ll aim to have this merged this week, so that it’s included in next week’s release.

tillh-stripe avatar Mar 14 '23 15:03 tillh-stripe

Awesome thanks.🙇

FlorentDambreville avatar Mar 15 '23 09:03 FlorentDambreville

It’s merged now, so I’m closing this issue.

Thanks again for notifying us that the issue persisted and helping us fix it 🙏 Definitely reach out again if you notice any other issues.

tillh-stripe avatar Mar 15 '23 14:03 tillh-stripe

Ticket reopened because we recently noticed that we still have the translation issue in french :

  • Your card has insufficient funds is translated by "Votre carte a été refusé" (litteraly this means your card has been declined, with no further informations)

Other cases seems to be well translated, but considering our users frequently face this particular case, we'll be glad if you can fix this.

See screenshot enclosed WrongTranslationFr-InsufficientFunds

ElodieCatArr avatar Sep 13 '23 14:09 ElodieCatArr

Hi @ElodieCatArr 👋 Thanks for commenting and sorry about the translation issues.

Is this happening on the latest version? When trying it in our example app with fr_FR and fr_CA locales, I’m seeing it behave correctly.

tillh-stripe avatar Sep 13 '23 15:09 tillh-stripe

Hi @ElodieCatArr 👋 Thanks for commenting and sorry about the translation issues.

Is this happening on the latest version? When trying it in our example app with fr_FR and fr_CA locales, I’m seeing it behave correctly.

We are using your SDK v20.31.0


The main issue is your change of error message from "insufficient funds" to "your card was declined." The new error message is too generic and can lead to confusion for users. Without knowing the specific reason (i.e., insufficient funds), users may repeatedly try the same card, thinking it might be a temporary issue.

I recommend reverting to the "insufficient funds" message or considering a more descriptive alternative. This provides clarity and improves user experience during payment processing.


You can test it with your testing usecase This card: 4000 0000 0000 9995 image image

arkalezard avatar Oct 09 '23 09:10 arkalezard