Skip to content

Commit

Permalink
Add locales if fewer than 5 (for testing)
Browse files Browse the repository at this point in the history
Signed-off-by: Olga Bulat <[email protected]>
  • Loading branch information
obulat committed May 13, 2024
1 parent 970b485 commit 6696e09
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineNuxtConfig } from "nuxt/config"

import { isProd } from "./src/utils/node-env"
// import locales from "./src/locales/scripts/valid-locales.json"
import locales from "./src/locales/scripts/valid-locales.json"
import { meta as commonMeta } from "./src/constants/meta"

import type { LocaleObject } from "@nuxtjs/i18n"
Expand Down Expand Up @@ -29,6 +29,8 @@ const favicons = [
},
]

const additionalLocales = locales && locales.length < 5 ? locales : []

const openverseLocales = [
{
/* Nuxt i18n fields */
Expand All @@ -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")
Expand Down

0 comments on commit 6696e09

Please sign in to comment.