Skip to content

MWPW-193755 country param#6237

Open
vhargrave wants to merge 5 commits into
stagefrom
vhargrave/country-param
Open

MWPW-193755 country param#6237
vhargrave wants to merge 5 commits into
stagefrom
vhargrave/country-param

Conversation

@vhargrave

@vhargrave vhargrave commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Allow for country param to be used as default now instead of both it and akamaiLocale.

Resolves: MWPW-193755

Test URLs:

Steps to test:

  1. Join the basel vpn
  2. Go to the before link - notice how the language banner wants to take you to the german experience
  3. Go to the after link
  4. Notice how the language banner now wants to take you to french experience. That shows the country param now working for this use case too.

vhargrave and others added 5 commits June 30, 2026 18:22
getCountry() only read ?akamaiLocale= for geo simulation, so ?country=sg
did not resolve a lingo locale the way ?akamaiLocale=sg did. Merch/MEP
already follow country > akamaiLocale > cookie > geo via
computeDetectedMarketCountry; bring lingo's getCountry() into parity.

Extract the param-precedence into an exported pure helper
getCountryFromParams (mirroring computeDetectedMarketCountry, which is
exported for the same reason: PAGE_URL is frozen at module load and the
inline path was untestable). getCountry now composes it with the existing
sessionStorage + geo fallback, preserving behaviour when country is
absent/invalid.

Resolves: MWPW-193755

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
getCountry() only read ?akamaiLocale= for geo simulation, so ?country=sg
did not resolve a lingo locale the way ?akamaiLocale=sg did. Merch/MEP
already follow country > akamaiLocale > cookie > geo via
computeDetectedMarketCountry; bring lingo's getCountry() into parity.

Extract the param-precedence into an exported pure helper
getCountryFromParams (mirroring computeDetectedMarketCountry, which is
exported for the same reason: PAGE_URL is frozen at module load and the
inline path was untestable). getCountry now composes it with the existing
sessionStorage + geo fallback, preserving behaviour when country is
absent/invalid.

Resolves: MWPW-193755

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…argrave/country-param

# Conflicts:
#	libs/utils/utils.js
#	test/utils/utils.test.js
…argrave/country-param

# Conflicts:
#	libs/utils/utils.js
#	test/utils/utils.test.js
…argrave/country-param

# Conflicts:
#	test/utils/utils.test.js
@aem-code-sync

aem-code-sync Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

@vhargrave vhargrave changed the title country param MWPW-193755 country param Jul 1, 2026
@NadiiaSokolova NadiiaSokolova self-assigned this Jul 1, 2026
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.

3 participants