EXLM-5361: normalize Coveo search locale to BCP-47 for multi-lang - #2809
EXLM-5361: normalize Coveo search locale to BCP-47 for multi-lang#2809nitin-rachabathuni wants to merge 1 commit into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
| 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'], | ||
| ]); |
There was a problem hiding this comment.
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.
Please provide the Jira Issue your PR is for.
Jira ID:
Test URLs:
Before: https://main--exlm--adobe-experience-league.aem.live
After: https://EXLM-5361-coveo-locale--exlm--adobe-experience-league.aem.live
After: https://EXLM-5361-coveo-locale--exlm--adobe-experience-league.aem.live/en/browse?martech=off
After: https://EXLM-5361-coveo-locale--exlm--adobe-experience-league.aem.live/en/browse/analytics?martech=off
After: https://EXLM-5361-coveo-locale--exlm--adobe-experience-league.aem.live/en/docs?martech=off
After: https://EXLM-5361-coveo-locale--exlm--adobe-experience-league.aem.live/en/docs/analytics?martech=off
After: https://EXLM-5361-coveo-locale--exlm--adobe-experience-league.aem.live/en/docs/analytics/analyze/admin-overview/analytics-overview?martech=off
After: https://EXLM-5361-coveo-locale--exlm--adobe-experience-league.aem.live/en/events?martech=off
After: https://EXLM-5361-coveo-locale--exlm--adobe-experience-league.aem.live/en/playlists?martech=off
After: https://EXLM-5361-coveo-locale--exlm--adobe-experience-league.aem.live/en/playlists/acrobat-sign-perform-advanced-tasks-administrators?martech=off
After: https://EXLM-5361-coveo-locale--exlm--adobe-experience-league.aem.live/en/perspectives?martech=off
After: https://EXLM-5361-coveo-locale--exlm--adobe-experience-league.aem.live/en/perspectives/drive-success-with-executive-summary-dashboards?martech=off
After: https://EXLM-5361-coveo-locale--exlm--adobe-experience-league.aem.live/en/certification-home?martech=off
After: https://EXLM-5361-coveo-locale--exlm--adobe-experience-league.aem.live/en/search?martech=off
AI Review Notes