cds-snc / platform-forms-client

NextJS application that serves the public-facing website for Forms
https://forms-staging.cdssandbox.xyz/
MIT License
31 stars 12 forks source link

Department dropdown doesn't switch languages on click when toggling EN/FR #3803

Closed Abi-Nada closed 2 weeks ago

Abi-Nada commented 3 weeks ago

Description

When you Preview a "Department dropdown" form element, and toggle between the languages, the options do not switch to the correct language unless you leave to another page and come back.

Issue raised in Slack convo: https://gcdigital.slack.com/archives/C03T4FAE9FV/p1718120626490419?thread_ts=1718119362.842559&cid=C03T4FAE9FV

Steps to reproduce

  1. Add departmental dropdown in EN interface
  2. Click on Test
  3. Click on the options to validate that it appears in EN
  4. Switch Toggle to preview in FR
  5. Click on the options to validate that it should appear in FR - see error
  6. Go back to Edit, and then come back to Test
  7. Click on the options to validate that it appears in FR

Note: the same happens if you start in FR and preview in EN

Details

Expected behaviour

When you toggle the language you're previewing in, the options should reflect that corresponding language on click (without having to navigate to another page to refresh).

Screenshots or videos

Private Zenhub Video