From f1935e3b98a04dac2036a9cc76aaa9aba7f142c5 Mon Sep 17 00:00:00 2001 From: Olga Bulat Date: Mon, 6 May 2024 09:39:44 +0300 Subject: [PATCH] Add the patch Signed-off-by: Olga Bulat Add locales if fewer than 5 (for testing) Signed-off-by: Olga Bulat --- frontend/justfile | 1 + frontend/nuxt.config.ts | 4 +++- frontend/src/components/VHomepageContent.vue | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/justfile b/frontend/justfile index 5a54dc43c8f..488a95d623d 100644 --- a/frontend/justfile +++ b/frontend/justfile @@ -35,6 +35,7 @@ export FRONTEND_PNPM_VERSION := `grep 'packageManager' ../package.json | awk -F' # Build the frontend Docker image build-img tag="openverse-frontend:local" target="app": docker build \ + --load \ --target {{ target }} \ --build-context 'repo_root=..' \ --build-arg FRONTEND_NODE_VERSION=$(just node-version) \ diff --git a/frontend/nuxt.config.ts b/frontend/nuxt.config.ts index 261336ba9e7..6fe901cd61f 100644 --- a/frontend/nuxt.config.ts +++ b/frontend/nuxt.config.ts @@ -29,6 +29,8 @@ const favicons = [ }, ] +const additionalLocales = locales && locales.length < 5 ? locales : [] + const openverseLocales = [ { /* Nuxt i18n fields */ @@ -43,7 +45,7 @@ const openverseLocales = [ name: "English", nativeName: "English", }, - ...(locales ?? []), + ...additionalLocales, ].filter((l) => Boolean(l.iso)) as LocaleObject[] const isProdNotPlaywright = isProd && !(process.env.PW === "true") diff --git a/frontend/src/components/VHomepageContent.vue b/frontend/src/components/VHomepageContent.vue index f4bbaac376a..38ce4b66663 100644 --- a/frontend/src/components/VHomepageContent.vue +++ b/frontend/src/components/VHomepageContent.vue @@ -5,6 +5,9 @@ > {{ $t("hero.subtitle") }} + +

Testing Nuxt 3

+

{{ $t("hero.description") }}