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

"activate" default locale during fallback of GVL language error #5106

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Jul 18, 2024

Closes PROD-2413

Description Of Changes

When GVL languages are not available, the UI should fall back to the default language (English) even when the locale is set to something else.

Code Changes

  • Replace hard-coded instances of default locale with DEFAULT_LOCALE
  • call i18n.activate(DEFAULT_LOCALE) during fallback to fix fallback bug.

Steps to Confirm

  1. visit https://privacy-plus-rc.fides-staging.ethyca.com/fides-js-demo.html?geolocation=eea&fides_locale=fr (or localhost equivalent http://localhost:3001/fides-js-demo.html?geolocation=eea&fides_locale=fr)
  2. Simulate a failed api call by opening dev tools Networks tab, right clicking the gvl/translations and choosing to block that URL. Make sure to update the resulting blocked URL to just use a * wildcard (eg. https://privacy-plus-rc.fides-staging.ethyca.com/api/v1/privacy-experience/gvl/translations*)
  3. Reload the page
  4. Overlay should all be in English and not French

Pre-Merge Checklist

  • All CI Pipelines Succeeded

Copy link

vercel bot commented Jul 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored (Inspect) Jul 18, 2024 10:33pm

Copy link

cypress bot commented Jul 18, 2024

Passing run #9018 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge a0614e5 into c8a244e...
Project: fides Commit: 47818c1ea2 ℹ️
Status: Passed Duration: 00:36 💡
Started: Jul 18, 2024 10:45 PM Ended: Jul 18, 2024 10:45 PM

Review all test suite changes for PR #5106 ↗︎

Copy link
Contributor

@SteveDMurphy SteveDMurphy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @gilluminate ! Can maybe just pop something in the changelog for this too!

@gilluminate
Copy link
Contributor Author

Thanks @SteveDMurphy! We're planning to get this in as a late add to the current release. Since this addresses an issue created by that release I opted to leave it off the changelog.

@gilluminate gilluminate merged commit 166718f into main Jul 19, 2024
13 checks passed
@gilluminate gilluminate deleted the gill/PROD-2413_fides-js-language-fallback branch July 19, 2024 15:10
Copy link

cypress bot commented Jul 19, 2024

Passing run #9029 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

"activate" default locale during fallback of GVL language error (#5106)
Project: fides Commit: 166718fcff
Status: Passed Duration: 00:35 💡
Started: Jul 19, 2024 3:20 PM Ended: Jul 19, 2024 3:21 PM

Review all test suite changes for PR #5106 ↗︎

@cypress cypress bot mentioned this pull request Jul 19, 2024
34 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants