Skip to content

Commit

Permalink
Revert the Nuxt 3 update (#4821)
Browse files Browse the repository at this point in the history
  • Loading branch information
obulat authored Aug 27, 2024
1 parent c8f89fb commit 991a032
Show file tree
Hide file tree
Showing 6 changed files with 2,365 additions and 1,673 deletions.
4 changes: 2 additions & 2 deletions frontend/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ export default defineNuxtConfig({
code: "en", // unique identifier for the locale in Vue i18n
dir: "ltr",
file: "en.json",
language: "en", // used for SEO purposes (html lang attribute)
iso: "en", // used for SEO purposes (html lang attribute)

/* Custom fields */

name: "English",
nativeName: "English",
},
...locales,
].filter((l) => Boolean(l.language)) as LocaleObject[],
].filter((l) => Boolean(l.iso)) as LocaleObject[],
lazy: true,
langDir: "locales",
defaultLocale: "en",
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"jsdom": "^24.1.0",
"node-html-parser": "^6.1.13",
"npm-run-all2": "^6.2.2",
"nuxt": "3.13.0",
"nuxt": "3.12.4",
"rimraf": "^6.0.1",
"talkback": "^4.2.0",
"typescript": "5.5.4",
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/locales/scripts/get-validated-locales.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +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.
// Note: This field was previously called "iso".
language:
iso:
locale.langCodeIso_639_1 ??
locale.langCodeIso_639_2 ??
locale.langCodeIso_639_3 ??
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/locales/scripts/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ export interface I18nLocaleProps {
name: string
wpLocale?: string
file?: string
/** @deprecated use "language" instead */
iso?: string
language?: string
dir?: string
translated?: number
}
6 changes: 3 additions & 3 deletions frontend/test/locales/valid-locales.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"code": "ar",
"name": "Arabic",
"nativeName": "العربية",
"language": "ar",
"iso": "ar",
"wpLocale": "ar",
"dir": "rtl",
"translated": 100,
Expand All @@ -13,7 +13,7 @@
"code": "es",
"name": "Spanish (Spain)",
"nativeName": "Español",
"language": "es",
"iso": "es",
"wpLocale": "es_ES",
"dir": "ltr",
"translated": 100,
Expand All @@ -23,7 +23,7 @@
"code": "ru",
"name": "Russian",
"nativeName": "Русский",
"language": "ru",
"iso": "ru",
"wpLocale": "ru_RU",
"dir": "ltr",
"translated": 48,
Expand Down
Loading

0 comments on commit 991a032

Please sign in to comment.