Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Translation Errors #5058

Closed
FlorentDambreville opened this issue May 24, 2022 · 15 comments · Fixed by #5858
Closed

[BUG] Translation Errors #5058

FlorentDambreville opened this issue May 24, 2022 · 15 comments · Fixed by #5858
Labels
Projects

Comments

@FlorentDambreville
Copy link

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

@skyler-stripe
Copy link
Contributor

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.

@michelleb-stripe michelleb-stripe changed the title [BUG] [BUG] Translation Errors May 27, 2022
@FlorentDambreville
Copy link
Author

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
Copy link
Author

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 ?

@michelleb-stripe michelleb-stripe added this to To do in Tracking via automation May 31, 2022
Tracking automation moved this from To do to Done Nov 22, 2022
@tillh-stripe
Copy link
Collaborator

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.

@FlorentDambreville
Copy link
Author

FlorentDambreville commented Feb 1, 2023

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

@tillh-stripe
Copy link
Collaborator

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.)

@FlorentDambreville
Copy link
Author

Yeah sure.

Here it is : pi_3MWGq1Jgn5Rr4DxU0Yk1bXUy

@tillh-stripe
Copy link
Collaborator

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 tillh-stripe reopened this Feb 2, 2023
Tracking automation moved this from Done to In progress Feb 2, 2023
@FlorentDambreville
Copy link
Author

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 😕

@tillh-stripe
Copy link
Collaborator

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.

@FlorentDambreville
Copy link
Author

Awesome thanks.🙇

@tillh-stripe
Copy link
Collaborator

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.

Tracking automation moved this from In progress to Done Mar 15, 2023
@ElodieCatArr
Copy link

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

@tillh-stripe
Copy link
Collaborator

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.

@arkalezard
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

5 participants