Adyen / adyen-web

Adyen Web Drop-in and Components
https://docs.adyen.com/online-payments
MIT License
185 stars 131 forks source link

Translations not found for SDK 6.0.3 #2789

Closed samgig-slate closed 2 months ago

samgig-slate commented 2 months ago

Describe the bug Translations files not found with web version 6.0.3. They are found with 6.0.2.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://checkoutshopper-test.cdn.adyen.com/checkoutshopper/sdk/6.0.2/translations/en-US.json
  2. Translations returned
  3. Go to https://checkoutshopper-test.cdn.adyen.com/checkoutshopper/sdk/6.0.3/translations/en-US.json
  4. 404

Expected behavior Translations found.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

PG-RichT commented 2 months ago

Yup, -live is affected here too. This will break the world of anyone brave enough not to pin the package release. Surely resource deployment should be tied to package release as well?

This is what it looks like with no resources. Maybe ship the package with the defaults in case this happens again as well?

image

m1aw commented 2 months ago

The problem should now be fixed. Sorry about this.

Are are now reworking the way we do the deployments so ensure the resources are available before the NPM release.

regatta-cc commented 2 months ago

It looks like en-US.json was resolved by this issue but other locales such as en-GB still remain an issue, can you please resolve for all the locales? Or should people in the locale en-GB use en-US?

PG-RichT commented 2 months ago

@regatta-cc Yup, see Adyen response to my ticket raised and closed: https://github.com/Adyen/adyen-web/issues/2778

sebastian-vass commented 2 months ago

Hi @m1aw , please this problem still persists for other translations, would it be possible to reopen this PR?

https://checkoutshopper-test.cdn.adyen.com/checkoutshopper/sdk/6.0.3/translations/pt.json https://checkoutshopper-test.cdn.adyen.com/checkoutshopper/sdk/6.0.3/translations/cs.json ...

m1aw commented 2 months ago

Hey @sebastian-vass those are not part of our supported locales.

You can find the supported locales for v6 here: https://github.com/Adyen/adyen-web/tree/main/packages/server/translations

infi-pc commented 2 months ago

Hi, we have the same issue - simple formats like pt, en, es worked in v5 but in v6 it is broken. We will have to map it to long formats like en-US, pt-BR. We can hotfix it using your table. But I think it should be fixed on Adyen's side - the list of supported languages can change over time, and we would have to manually check and implement the changes. Could you add support for the simple format (en) and redirect it to the proper language on your end? (en-US)

ribeiroguilherme commented 1 month ago

Hi @infi-pc,

Thank you for your feedback.

To provide some context, the team has indeed decided to enforce stricter handling in v6 by not making "smart assumptions" based on the language code alone. The challenge arises when multiple locales are involved. For instance, if someone passes pt, we cannot reliably determine whether it's pt-PT (Portuguese from Portugal) or pt-BR (Portuguese from Brazil). Similarly, language codes like en, es, and others have different regional variations that would need to be handled accordingly as well.

We have added this change to the list of breaking changes, ensuring that everyone is aware of the potential impact when migrating to v6.