diff --git a/frontend/nuxt.config.ts b/frontend/nuxt.config.ts index 6f70d9552e4..4e351645339 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 9bd8c4d1bc1..8fc28995a2e 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 7bbef4c802b..386078ef356 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 4f522a5f857..983c73e74f6 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 4bd21fdb9d9..3d14df2336d 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 a802575b938..df5699f419c 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 version: 1.0.2(magicast@0.3.4)(rollup@4.21.2)(webpack-sources@3.2.3) @@ -142,8 +136,8 @@ importers: specifier: ^3.14.1 version: 3.14.1(@jest/globals@29.7.0)(@playwright/test@1.46.1)(@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.2)(vue@3.5.0(typescript@5.5.4)))(@vitest/ui@2.0.5(vitest@2.0.5))(@vue/test-utils@2.4.6)(h3@1.12.0)(jsdom@24.1.0)(magicast@0.3.4)(nitropack@2.9.7(encoding@0.1.13)(magicast@0.3.4)(webpack-sources@3.2.3))(playwright-core@1.46.1)(rollup@4.21.2)(vite@5.4.3(@types/node@22.5.1)(terser@5.31.0))(vitest@2.0.5(@types/node@22.5.1)(@vitest/ui@2.0.5)(jsdom@24.1.0)(terser@5.31.0))(vue-router@4.4.3(vue@3.5.0(typescript@5.5.4)))(vue@3.5.0(typescript@5.5.4))(webpack-sources@3.2.3) '@nuxtjs/i18n': - specifier: 8.3.1 - version: 8.3.1(magicast@0.3.4)(rollup@4.21.2)(vue@3.5.0(typescript@5.5.4))(webpack-sources@3.2.3) + specifier: 8.5.2 + version: 8.5.2(magicast@0.3.4)(rollup@4.21.2)(vue@3.5.0(typescript@5.5.4))(webpack-sources@3.2.3) '@nuxtjs/storybook': specifier: npm:@nuxtjs/storybook@nightly version: 8.3.0-28764731.a9bf66d(@babel/preset-env@7.25.4(@babel/core@7.24.7))(@types/node@22.5.1)(eslint@8.57.0)(magicast@0.3.4)(nuxt@3.13.1(@parcel/watcher@2.4.1)(@types/node@22.5.1)(encoding@0.1.13)(eslint@8.57.0)(ioredis@5.4.1)(magicast@0.3.4)(optionator@0.9.3)(rollup@4.21.2)(terser@5.31.0)(typescript@5.5.4)(vite@5.4.3(@types/node@22.5.1)(terser@5.31.0))(vue-tsc@2.1.4(typescript@5.5.4))(webpack-sources@3.2.3))(optionator@0.9.3)(rollup@4.21.2)(terser@5.31.0)(typescript@5.5.4)(vite@5.4.3(@types/node@22.5.1)(terser@5.31.0))(vue-tsc@2.1.4(typescript@5.5.4))(vue@3.5.0(typescript@5.5.4))(webpack-sources@3.2.3) @@ -1781,8 +1775,8 @@ packages: peerDependencies: vue: ^3.3.4 - '@nuxtjs/i18n@8.3.1': - resolution: {integrity: sha512-VHnnjFTTep2oC5++61WY06y4c/h943NyHQh1CRUJQvjsdbGSMX3WQjMGk+X05a3pyPFN70aq0YbgtsEoEoTEjQ==} + '@nuxtjs/i18n@8.5.2': + resolution: {integrity: sha512-x5AZAd2sfvL3cYfpwCMQn7DyiwWCTPZSciiMWcfWQunin1V5toyzQRKjztvA6lh2iVOyeZF9bJpCkHG+UkOlkA==} engines: {node: ^14.16.0 || >=16.11.0} '@nuxtjs/plausible@1.0.2': @@ -9915,7 +9909,7 @@ snapshots: - vue-tsc - webpack-sources - '@nuxtjs/i18n@8.3.1(magicast@0.3.4)(rollup@4.21.2)(vue@3.5.0(typescript@5.5.4))(webpack-sources@3.2.3)': + '@nuxtjs/i18n@8.5.2(magicast@0.3.4)(rollup@4.21.2)(vue@3.5.0(typescript@5.5.4))(webpack-sources@3.2.3)': dependencies: '@intlify/h3': 0.5.0 '@intlify/shared': 9.13.1