Skip to content

Conversation

@vhargrave
Copy link
Contributor

@vhargrave vhargrave commented Nov 26, 2025

This PR adds functionality for language-based link localisation for project lingo. The first project that will be consuming this is da-bacom and in order to unblock other teams this will hopefully be merged before the 9th December.
Due to the recent code freezes, this PR also contains the code of this other base PR - #5096

I've created diagrams explaining the flow of the link localization logic more here - https://wiki.corp.adobe.com/display/WP4/Project+Lingo+Link+Localization

When going through the pull request you'll see that localizeLink and decorateLinks are being made async. This was not a decision that was made lightly, but seemed to be the cleanest long term solution for link localization. For example, when localizeLink or decorateLinks are called, especially in other projects like cc, it is important that these functions always returns the same result if they are given the same input. Because query indexes can now play a major role in how links are localized, when a call to localizeLink is made, these query indexes must sometimes be awaited.
localizeLink and decorateLinks are being used in other projects and will need to be updated there after this PR. The blast damage is the following (usually one or max two usages per project)

List of projects to update
localizeLink:

  • Da-marketo
  • Unity
  • Cc-sandbox
  • Exchange-partners
  • Dme-partners
  • Cc
  • Genuine
  • Da-dx-partners

decorateLinks:

  • Cc
  • Dme-partners
  • Da-dx-partners
  • Express-milo

In addition, because these methods have been made async, and it meant touching the following features, if your site has one or more of them, especially on high traffic pages or in a special constellation, it would be to test them:

  • caas
  • faas
  • email-collection
  • marketo
  • global navigation (gnav & footer)
  • fragments / personalization

Resolves: MWPW-179494

Test URLs:

Milo

To help test this in a simulated prod env, I've added some overrides to the config for CC and Bacom, which is what the projects themselves would usually need to do. To use these overrides, just add -test to the branch link name in the URL like you see below

CC

Steps to test:

  1. Scroll down to the accordion
  2. Open first collapsible element - the link should be regionalized because it's in the preview query index https://main--cc--adobecom.aem.page/ch_de/cc-shared/assets/lingo/query-index-preview.json
  3. Open fifth collapsible element - the link should also be regionalized
  4. Go down to the footer
  5. Second column, business.adobe.com link personalization at scale should be localized to /ch_de/
  6. All other links in that column should point to /de

Steps to test:

  1. Everything should be /de

DA-BACOM

Steps to test:

    • Scroll down to the first bricks
    • One on right should be regionaled to /ar for both .page & .live
    • One in middle should be regionalized to /ar only for .page. On .live it should be /es because there is no entry of the page in the previewed query index and it should therefore default to /es.
    • The brick on the left should always point to /es
    • Scroll down to the footer.
    • Look at the third column of links.
    • The express link should get turned into /es
    • The Creative cloud link should get turned into /ar
    • The Illustrator link should get turned into /es

Steps to test:

  1. Everything should be /es
GNav Test URLs

Gnav + Footer + Region Picker modal:

Thin Gnav + ThinFooter + Region Picker dropup:

Localnav + Promo:

Sticky Branch Banner:

Inline Branch Banner:

Blog

RTL Locale

@vhargrave vhargrave added do not merge PR should not be merged yet high-impact Any PR that may affect consumers high priority Why is this a high priority? Blocker? Critical? Dependency? labels Nov 26, 2025
@aem-code-sync
Copy link
Contributor

aem-code-sync bot commented Nov 26, 2025

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

@sigadamvenkata
Copy link

Hi @vhargrave , we can see the 'query-index' XSL files are previewed and published. so once the code goes to stage & prod will the feature enables? so we have any mechanism to turn feature on or off?

@sunilkamat @spadmasa

@vhargrave
Copy link
Contributor Author

vhargrave commented Dec 3, 2025

Hi @vhargrave , we can see the 'query-index' XSL files are previewed and published. so once the code goes to stage & prod will the feature enables? so we have any mechanism to turn feature on or off?

@sunilkamat @spadmasa

Hey @sigadamvenkata - yes, the link localization feature is an opt in and turned on over the metadata lingo . What is not opt in though because it shouldn't be breaking anything is that localizeLink and decorateLinks are now renamed and async. This shouldn't , but could have an impact on the following features:

  • caas
  • faas
  • email-collection
  • marketo
  • global navigation (gnav & footer)
  • fragments / personalization

so I'm grateful for any testing of these features using my code.

@sunilkamat @spadmasa

@NadiiaSokolova NadiiaSokolova self-assigned this Dec 3, 2025
Copy link
Contributor

@NadiiaSokolova NadiiaSokolova left a comment

Choose a reason for hiding this comment

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

Verified. Ready for Stage.
Testing details MWPW-179494

@sukamat
Copy link
Contributor

sukamat commented Dec 3, 2025

@spadmasa @sigadamvenkata For testing, @vhargrave has setup a manual query-index excel sheet in /ch_de/cc-shared/assets/lingo/query-index-preview just so that you guys can see that behavior. What is more important is that the existing functionality in ACOM is not broken. So other than validating the new feature in the test page that Victor provided, it is important to also make sure that ACOM continues to work as before by using other pages with Victor's branch. This link transformation feature will only apply to BACOM when it goes live in Feb (along with many other Lingo specific features) and will eventually be used on ACOM mid-next year. Hope that provides additional context.

cc: @nateekar

Copy link
Contributor

@zagi25 zagi25 left a comment

Choose a reason for hiding this comment

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

email-collection block works as expected, on /de page /de resources are fetched

@skumar09 skumar09 added the do not merge PR should not be merged yet label Dec 4, 2025
@skumar09
Copy link
Contributor

skumar09 commented Dec 4, 2025

@team: I’ve added the do-not-merge label. I’ll remove it once we have QA sign-off from all the impacted projects/tracks. Testing is currently in progress.
cc: @vhargrave , @narcis-radu , @sunilkamat

Copy link
Contributor

@afmicka afmicka left a comment

Choose a reason for hiding this comment

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

looks good from the merch (M@S) side. Signing off MWPW-184759
cc: @skumar09

Copy link
Contributor

@Brandon32 Brandon32 left a comment

Choose a reason for hiding this comment

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

The marketo block works as expected.

@sukamat
Copy link
Contributor

sukamat commented Dec 7, 2025

@vhargrave I had mentioned this in Slack but adding it here as well. CaaS is using a metadata flag langFirst for Lingo. They had set it up back in June when Newsroom went live as a language-first site. You can see the usage in the Newsroom metadata.xml file. Could we re-use the same flag? I cannot think of a use-case to keep them separate but LMK.

@vhargrave
Copy link
Contributor Author

@vhargrave I had mentioned this in Slack but adding it here as well. CaaS is using a metadata flag langFirst for Lingo. They had set it up back in June when Newsroom went live as a language-first site. You can see the usage in the Newsroom metadata.xml file. Could we re-use the same flag? I cannot think of a use-case to keep them separate but LMK.

@sunilkamat I think we can - if we notice it's a mistake later on, this is something we can quickly pivot on. I've changed it 👍

@sigadamvenkata
Copy link

we are good from CC, FEDS, Unity, News.adobe.com tracks and can to STAGE.

@Ruchika4
Copy link
Contributor

Ruchika4 commented Dec 8, 2025

Hi @vhargrave , for https://main--dc--adobecom.aem.page/ch_de/acrobat?milolibs=vhargrave-lingo-link-transformation-test&georouting=off&martech=off I see that links in footer that should point to /de/ as per PR description are also pointing to /ch_de/ Could you please help check.
Screenshot 2025-12-08 at 9 13 19 AM

@vhargrave
Copy link
Contributor Author

Hi @vhargrave , for https://main--dc--adobecom.aem.page/ch_de/acrobat?milolibs=vhargrave-lingo-link-transformation-test&georouting=off&martech=off I see that links in footer that should point to /de/ as per PR description are also pointing to /ch_de/ Could you please help check. Screenshot 2025-12-08 at 9 13 19 AM

Just had a call with @Ruchika4 to answer this. The code is working correctly since lingo is not active on dc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge PR should not be merged yet high priority Why is this a high priority? Blocker? Critical? Dependency? high-impact Any PR that may affect consumers

Projects

None yet

Development

Successfully merging this pull request may close these issues.