From 384633e41ea63122ac4ff5b16426b6cfeae4937b Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Fri, 12 Jan 2024 10:09:03 +0000 Subject: [PATCH] Preload the translations for the current language (#16430) Co-authored-by: Jakob Ackermann GitOrigin-RevId: c5500d0b7e8d0c99ed09751a35140a0b62182318 --- services/web/app/views/layout-base.pug | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/web/app/views/layout-base.pug b/services/web/app/views/layout-base.pug index 57ade4700a..dc8a025c94 100644 --- a/services/web/app/views/layout-base.pug +++ b/services/web/app/views/layout-base.pug @@ -24,6 +24,9 @@ html( each subdomainDetails in settings.i18n.subdomainLang if !subdomainDetails.hide link(rel="alternate", href=subdomainDetails.url+currentUrl, hreflang=subdomainDetails.lngCode) + + if (entrypoint !== 'marketing') + link(rel="preload", href=buildJsPath(currentLngCode + "-json.js"), as="script", nonce=scriptNonce) //- Scripts include _google_analytics