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

Fix translation and fallback issues #5775

Merged
merged 5 commits into from
Feb 20, 2025

Conversation

gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Feb 18, 2025

Closes LJ-387

Description Of Changes

Banner not using translated title of custom consent notices

Code Changes

  • Looks for translation first, then falls back if not found
  • Better fallback logic for the modal

Steps to Confirm

In Admin UI

  1. Add a system like “6sense” or “LiquidM” for TCF Experience to use
  2. Create a custom notice by clicking “Add a privacy notice +” button on Privacy Notices page (consent/privacy-notices)
  3. Give the Notice a name like “Custom Notice Title”
  4. In the translations section at the bottom, give the title an English title like “Custom Notice English Translation”
  5. Add a language, like Spanish, and give the title a title like “Aviso personalizado”
  6. Add a Data Use to the custom notice “analytics”
  7. Save it and on the next screen Enable it
  8. Go to Experiences and then the TCF experience
  9. Add the Custom Notice Title notice
  10. Save it and enable it
  11. Visit demo page in EEA geolocation (/fides-js-demo.html?geolocation=eea)
  12. Notice that the English translation appears and not “Custom Name Title” in the banner on the left column.
  13. Change the language to spanish. custom notice's translation “Aviso personalizado” should appear an not "Custom Name Title"

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change (i.e. potential for performance impact or unexpected regression) that should be flagged
  • Followup issues:
    • Followup issues created (include link)
    • No followup issues
  • Database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

Copy link

vercel bot commented Feb 18, 2025

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) Visit Preview Feb 20, 2025 4:25pm

Copy link
Contributor

@lucanovera lucanovera left a comment

Choose a reason for hiding this comment

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

The code changes look good. I've tested this and I've confirmed the title translations are displaying correctly now. Approved.
Captura de pantalla 2025-02-20 a la(s) 11 25 11 a  m
Captura de pantalla 2025-02-20 a la(s) 11 25 00 a  m

@gilluminate gilluminate merged commit 6568433 into main Feb 20, 2025
17 checks passed
@gilluminate gilluminate deleted the gill/LJ-387/custom-tcf-notices-banner-not branch February 20, 2025 16:40
Copy link

cypress bot commented Feb 20, 2025

fides    Run #12562

Run Properties:  status check passed Passed #12562  •  git commit 65684337d0: Fix translation and fallback issues (#5775)
Project fides
Branch Review main
Run status status check passed Passed #12562
Run duration 00m 50s
Commit git commit 65684337d0: Fix translation and fallback issues (#5775)
Committer Jason Gill
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 5
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

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