Skip to content

MWPW-200785 [Lingo] Stop reading the international cookie in sign-in region resolution#6298

Open
vhargrave wants to merge 1 commit into
stagefrom
vhargrave/lingo-drop-international-cookie
Open

MWPW-200785 [Lingo] Stop reading the international cookie in sign-in region resolution#6298
vhargrave wants to merge 1 commit into
stagefrom
vhargrave/lingo-drop-international-cookie

Conversation

@vhargrave

@vhargrave vhargrave commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Split off from #6268 (MWPW-200345). Per Shane Do, acomCountry is not a CCHome requirement yet (Akamai-only shipped), so the acomLocale/acomCountry split is shelved. This PR carries only the small, low-risk half we want to land now.

Resolves: MWPW-200785

What changes

getLingoRegion({ useGeoLocation: true }) no longer consults sessionStorage.international / the international cookie. On the sign-in path the Lingo region now resolves from the user's geo (physical location) only — matching the Akamai redirect and webps's implementation.

   if (!regions || !Object.keys(regions).length) return null;

-  if (useGeoLocation) {
-    const intlPrefix = sessionStorage.getItem('international') || getCookie('international');
-    if (intlPrefix) return Object.values(regions).find((r) => r.prefix === `/${intlPrefix}`) ?? null;
-  }
-
   const country = useGeoLocation
     ? normCountryCode(await getCountry())
     : (await resolveDetectedMarketCountry())?.toLowerCase();

Why: under Lingo the international cookie holds only the language (not a region), so it is no longer meaningful for sign-in region resolution. Resolving from geo makes the sign-in path emit the same region as the Akamai redirect, giving CCH/Adobe Home one consistent contract.

Scope / non-changes

Tests

  • test/utils/utils.test.jsgetLingoRegion with useGeoLocation now ignores the international cookie and resolves from geo (both the "diverges" and "no region" cases); the loadIms redirect test asserts geo wins over a divergent international cookie.
  • test/blocks/susi-light-login/susi-light-login.test.js — sign-in widget locale follows geo, ignoring the international and market cookies.
  • Full npm test: 3691 passed; the only failure is the known fetchAndProcessPlainHtml with MEP gnav network flake (fails identically on clean stage, unrelated to this change).

Test URLs

Steps to test:
set your international cookie to lu_fr using the region picker in the footer for example and notice how it has no impact on the after url anymore. You'll be taken to https://www.stage.adobe.com/home?acomLocale=ch_fr instead of https://www.stage.adobe.com/home?acomLocale=lu_fr

…region resolution

getLingoRegion({ useGeoLocation: true }) no longer consults the
`international` cookie/sessionStorage; the sign-in region resolves from the
user's geo only, matching the Akamai redirect and webps's implementation.

Split off from MWPW-200345 (#6268) — the acomLocale/acomCountry split is
shelved per Shane Do; this is the small, low-risk half we want to land now.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aem-code-sync

aem-code-sync Bot commented Jul 15, 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 marked this pull request as ready for review July 16, 2026 11:27
@vhargrave
vhargrave requested review from a team, markpadbe and sukamat July 16, 2026 11:28
@NadiiaSokolova NadiiaSokolova self-assigned this Jul 16, 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.

2 participants