Skip to content

EXLM-5361: normalize Coveo search locale to BCP-47 for multi-lang - #2809

Draft
nitin-rachabathuni wants to merge 1 commit into
mainfrom
EXLM-5361-coveo-locale
Draft

EXLM-5361: normalize Coveo search locale to BCP-47 for multi-lang#2809
nitin-rachabathuni wants to merge 1 commit into
mainfrom
EXLM-5361-coveo-locale

Conversation

@nitin-rachabathuni

@nitin-rachabathuni nitin-rachabathuni commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Please provide the Jira Issue your PR is for.

Jira ID:

Test URLs:

AI Review Notes

Co-authored-by: Cursor <cursoragent@cursor.com>
@aem-code-sync

aem-code-sync Bot commented Jul 28, 2026

Copy link
Copy Markdown

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

  • Re-run all PSI checks
  • Re-run failed PSI checks
  • Re-sync branch
Commits

@aem-code-sync

aem-code-sync Bot commented Jul 28, 2026

Copy link
Copy Markdown
Page Scores Audits Google
📱 / Unable to process request. Please wait a while and try again. PSI
🖥️ / Timeout Exceeded PSI
📱 /en/browse?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /en/browse?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
📱 /en/browse/analytics?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /en/browse/analytics?martech=off Timeout Exceeded PSI
📱 /en/certification-home?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /en/certification-home?martech=off Unable to process request. Please wait a while and try again. PSI
📱 /en/docs?martech=off Unable to process request. Please wait a while and try again. PSI
🖥️ /en/docs?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
📱 /en/docs/analytics?martech=off Unable to process request. Please wait a while and try again. PSI
🖥️ /en/docs/analytics?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
📱 /en/docs/analytics/analyze/admin-overview/analytics-overview?martech=off Timeout Exceeded PSI
🖥️ /en/docs/analytics/analyze/admin-overview/analytics-overview?martech=off Timeout Exceeded PSI
📱 /en/events?martech=off Timeout Exceeded PSI
🖥️ /en/events?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
📱 /en/perspectives?martech=off Unable to process request. Please wait a while and try again. PSI
🖥️ /en/perspectives?martech=off Timeout Exceeded PSI
📱 /en/perspectives/drive-success-with-executive-summary-dashboards?martech=off Unable to process request. Please wait a while and try again. PSI
🖥️ /en/perspectives/drive-success-with-executive-summary-dashboards?martech=off Timeout Exceeded PSI
📱 /en/playlists?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /en/playlists?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
📱 /en/playlists/acrobat-sign-perform-advanced-tasks-administrators?martech=off Timeout Exceeded PSI
🖥️ /en/playlists/acrobat-sign-perform-advanced-tasks-administrators?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
📱 /en/search?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /en/search?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

Comment thread scripts/scripts.js
Comment on lines +966 to +977
export const COVEO_SEARCH_LOCALES = new Map([
['en', 'en-US'],
['de', 'de-DE'],
['fr', 'fr-FR'],
['it', 'it-IT'],
['ja', 'ja-JP'],
['ko', 'ko-KR'],
['es', 'es-ES'],
['pt-br', 'pt-BR'],
['zh-hans', 'zh-CN'],
['zh-hant', 'zh-TW'],
]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor maintainability concern: this adds a third locale map (locales, URL_SPECIAL_CASE_LOCALES, now COVEO_SEARCH_LOCALES) that overlaps with the other two but has to be kept in sync by hand.

If a new language is ever added to locales/URL_SPECIAL_CASE_LOCALES and someone forgets to add it here, getCoveoSearchLocale won't error — it silently falls back to en-US (line 1007), so Coveo search would quietly run with the wrong locale for that language with no visible failure signal. Might be worth a comment near the other two maps pointing here, so future language additions don't miss this one.

Not blocking — flagging since the failure mode is silent rather than loud.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant