Closed dsamojlenko closed 4 years ago
so this works but I'm wondering if query strings need to comply with OLA Requirements.
I'm not seeing anything about query strings here but it might be covered under the policy: https://www.tbs-sct.gc.ca/pol/doc-eng.aspx?id=26164#sec6.6
6.6.3.2 (Website addresses) Primary domain names provide equal treatment to both official languages and accurately represent the Website's primary purpose in both official languages by using at least one of the following: unilingual names for each official language (e.g. “youth” and “jeunesse”) or a term or terms with the same meaning and spelling in both official languages (e.g. “justice”).
I'm going to approve this for now and I'm following up with CDS policy folks.
Closes #361
Fixes the language switching bug on the Results screen. When on the results screen, if you switched language, you would lose your results.
Introduced in #338, this bug was due to the language switch link not preserving the querystring parameters required for the results screen to display.
To fix, I added a middleware helper for use in the languageLink.njk template. This helper will accept the current route object, and a selected language. It will return the language-specific route, with the querystring intact.