Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Update i18n packages (#4876)

Olga Bulatf542db31071a
diff --git a/frontend/nuxt.config.ts b/frontend/nuxt.config.ts
index 6f70d9552..4e3516453 100644
--- a/frontend/nuxt.config.ts
+++ b/frontend/nuxt.config.ts
@@ -101,7 +101,7 @@ export default defineNuxtConfig({
code: "en", // unique identifier for the locale in Vue i18n
dir: "ltr",
file: "en.json",
- iso: "en", // used for SEO purposes (html lang attribute)
+ language: "en", // used for SEO purposes (html lang attribute)
/* Custom fields */
@@ -109,7 +109,7 @@ export default defineNuxtConfig({
nativeName: "English",
},
...locales,
- ].filter((l) => Boolean(l.iso)) as LocaleObject[],
+ ].filter((l) => Boolean(l.language)) as LocaleObject[],
lazy: true,
langDir: "locales",
defaultLocale: "en",
diff --git a/frontend/package.json b/frontend/package.json
index 9bd8c4d1b..8fc28995a 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -61,8 +61,6 @@
},
"dependencies": {
"@floating-ui/dom": "^1.6.8",
- "@intlify/core-base": "9.13.1",
- "@intlify/message-compiler": "9.13.1",
"@nuxtjs/plausible": "^1.0.2",
"@nuxtjs/robots": "^4.0.2",
"@nuxtjs/sitemap": "^5.3.5",
@@ -89,7 +87,7 @@
"devDependencies": {
"@babel/parser": "^7.24.8",
"@nuxt/test-utils": "^3.14.1",
- "@nuxtjs/i18n": "8.3.1",
+ "@nuxtjs/i18n": "8.5.2",
"@nuxtjs/storybook": "npm:@nuxtjs/storybook@nightly",
"@playwright/test": "1.46.1",
"@storybook-vue/nuxt": "npm:@storybook-vue/nuxt@nightly",
diff --git a/frontend/src/locales/scripts/get-validated-locales.js b/frontend/src/locales/scripts/get-validated-locales.js
index 7bbef4c80..386078ef3 100644
--- a/frontend/src/locales/scripts/get-validated-locales.js
+++ b/frontend/src/locales/scripts/get-validated-locales.js
@@ -32,7 +32,7 @@ const getValidatedLocales = async () => {
// Check for a language in all three versions of the ISO 639 spec,
// defaulting to the v1 two-character codes before checking for the
// three-character codes in the v2 and v3 specs.
- iso:
+ language:
locale.langCodeIso_639_1 ??
locale.langCodeIso_639_2 ??
locale.langCodeIso_639_3 ??
diff --git a/frontend/src/locales/scripts/types.d.ts b/frontend/src/locales/scripts/types.d.ts
index 4f522a5f8..983c73e74 100644
--- a/frontend/src/locales/scripts/types.d.ts
+++ b/frontend/src/locales/scripts/types.d.ts
@@ -3,7 +3,7 @@ export interface I18nLocaleProps {
name: string
wpLocale?: string
file?: string
- iso?: string
+ language?: string
dir?: string
translated?: number
}
diff --git a/frontend/test/locales/valid-locales.json b/frontend/test/locales/valid-locales.json
index 4bd21fdb9..3d14df233 100644
--- a/frontend/test/locales/valid-locales.json
+++ b/frontend/test/locales/valid-locales.json
@@ -3,7 +3,6 @@
"code": "ar",
"name": "Arabic",
"nativeName": "العربية",
- "iso": "ar",
"language": "ar",
"wpLocale": "ar",
"dir": "rtl",
@@ -14,7 +13,6 @@
"code": "es",
"name": "Spanish (Spain)",
"nativeName": "Español",
- "iso": "es",
"language": "es",
"wpLocale": "es_ES",
"dir": "ltr",
@@ -25,7 +23,6 @@
"code": "ru",
"name": "Russian",
"nativeName": "Русский",
- "iso": "ru",
"language": "ru",
"wpLocale": "ru_RU",
"dir": "ltr",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index a802575b9..df5699f41 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -62,12 +62,6 @@ importers:
'@floating-ui/dom':
specifier: ^1.6.8
version: 1.6.8
- '@intlify/core-base':
- specifier: 9.13.1
- version: 9.13.1
- '@intlify/message-compiler':
- specifier: 9.13.1
- version: 9.13.1
'@nuxtjs/plausible':
specifier: ^1.0.2
@@ -142,8 +136,8 @@ importers:
specifier: ^3.14.1
'@nuxtjs/i18n':
- specifier: 8.3.1
+ specifier: 8.5.2
'@nuxtjs/storybook':
specifier: npm:@nuxtjs/storybook@nightly
@@ -1781,8 +1775,8 @@ packages:
peerDependencies:
vue: ^3.3.4
- '@nuxtjs/[email protected]':
- resolution: {integrity: sha512-VHnnjFTTep2oC5++61WY06y4c/h943NyHQh1CRUJQvjsdbGSMX3WQjMGk+X05a3pyPFN70aq0YbgtsEoEoTEjQ==}
+ '@nuxtjs/[email protected]':
+ resolution: {integrity: sha512-x5AZAd2sfvL3cYfpwCMQn7DyiwWCTPZSciiMWcfWQunin1V5toyzQRKjztvA6lh2iVOyeZF9bJpCkHG+UkOlkA==}
engines: {node: ^14.16.0 || >=16.11.0}
'@nuxtjs/[email protected]':
@@ -9915,7 +9909,7 @@ snapshots:
- vue-tsc
- webpack-sources
dependencies:
'@intlify/h3': 0.5.0
'@intlify/shared': 9.13.1