From e1edb937c706268533409d9168413bfc12f5bf94 Mon Sep 17 00:00:00 2001 From: LizBaker <39655074+LizBaker@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:42:17 -0700 Subject: [PATCH] Add new locales to supported locales list (#1032) * fix: Update jp site url and add supported locales --- packages/gatsby-theme-newrelic/src/components/Link.js | 3 +-- packages/gatsby-theme-newrelic/src/utils/config/i18n.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/gatsby-theme-newrelic/src/components/Link.js b/packages/gatsby-theme-newrelic/src/components/Link.js index c9b00e909..b031f23ef 100644 --- a/packages/gatsby-theme-newrelic/src/components/Link.js +++ b/packages/gatsby-theme-newrelic/src/components/Link.js @@ -20,7 +20,7 @@ const isRelativePath = (to) => !to.startsWith('http') && to.startsWith('/'); // Prevents our rewrites to our i18n Netlify sites showing external link icons const i18nNetlifySites = [ 'docs-website-kr.netlify.app/kr/', - 'docs-website-pt.netlify.app/jp/', + 'docs-website-jp.netlify.app/jp/', 'docs-website-es.netlify.app/es/', 'docs-website-pt.netlify.app/pt/', ]; @@ -94,7 +94,6 @@ const Link = forwardRef( /> ); } - if ((isExternal(to) || isEmbedPageLink) && !isI18nNetlifySite(to)) { if (isRelativePath(to)) { to = siteUrl + to; diff --git a/packages/gatsby-theme-newrelic/src/utils/config/i18n.js b/packages/gatsby-theme-newrelic/src/utils/config/i18n.js index c7f123b4e..aa115386a 100644 --- a/packages/gatsby-theme-newrelic/src/utils/config/i18n.js +++ b/packages/gatsby-theme-newrelic/src/utils/config/i18n.js @@ -1,5 +1,5 @@ const DEFAULT_NAMESPACE = 'translation'; -const SUPPORTED_LOCALES = ['en', 'jp', 'kr']; +const SUPPORTED_LOCALES = ['en', 'jp', 'kr', 'es', 'pt']; const THEME_NAMESPACE = 'gatsby-theme-newrelic'; const LOCALE_CONFIGS = {