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

V6 - Translation fallback #3038

Closed
dimitriBouteille opened this issue Dec 24, 2024 · 7 comments
Closed

V6 - Translation fallback #3038

dimitriBouteille opened this issue Dec 24, 2024 · 7 comments
Labels
Needs more info Further information is requested Stale

Comments

@dimitriBouteille
Copy link
Contributor

dimitriBouteille commented Dec 24, 2024

Describe the bug

Since the update of the module on v6, I have only problems ...

If I am not mistaken, on v5 there was a fallback system to use the parent locale if the local passed as argument of AdyenCheckout did not exist. Thus:

AdyenCheckout({
	locale: 'fr_CH',
})

The local fr_CH (fr_CA, ...) does not exist in Adyen so it was the local fr_FR that is loaded.

On v6, if I pass the locale fr_CH, it is the translations en_US that are loaded...

Capture d’écran du 2024-12-24 15-37-13

To Reproduce

Steps to reproduce the behavior:

  1. Create card component with fr_CH or fr_CA locale
  2. 💥 The component

Expected behavior

The parent locale must be loaded :

  • fr_CH, fr_CA => fr_FR
  • it_CH => it_CH
  • de_AT, de_CH => de_DE
  • ...
@ashrafnazar
Copy link

I can confirm that I get errors in the network for en-GB.json as well. If the locale not included in the code, then the component breaks

@sponglord
Copy link
Contributor

sponglord commented Jan 28, 2025

@dimitriBouteille - this is correct behaviour for v6, as detailed in the "Breaking changes" here
You are expected to specify a supported locale in the AdyenCheckout config.

The component should not break, however, if the wrong locale is set. Is this actually happening or are you just seeing network errors for the non-existent language json?

@sponglord sponglord reopened this Jan 28, 2025
@sponglord sponglord added the Needs more info Further information is requested label Jan 28, 2025
@ashrafnazar
Copy link

There doesn't seem to be a translation file for en-GB either

Copy link
Contributor

This issue is stale because it has been open 21 days with no activity. Please comment on this issue otherwise it will be closed in 7 days.

@github-actions github-actions bot added the Stale label Feb 19, 2025
@ashrafnazar
Copy link

Comment to keep open

@ashrafnazar
Copy link

@sponglord - does Adyen accept external contributions?

@sponglord
Copy link
Contributor

sponglord commented Feb 19, 2025

@ashrafnazar We have a third-party service to generate the translations for us.

If you'd like us to support another language you can create another issue asking for it. We'll then check if it would benefit other merchants as well and, if it does, we'll ask our third-party service to generate the translation files (so no need to generate the files yourself).

Also keep in mind that even if we don't support a language you can create your own custom translations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs more info Further information is requested Stale
Projects
None yet
Development

No branches or pull requests

3 participants