feat: remove nuxt i18n for in house i18n for web (#5131)

* feat: remove nuxt i18n for in house

* cleanup: remove old nuxt/i18n patch

* prepr

---------

Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
This commit is contained in:
Calum H.
2026-01-15 23:49:38 +00:00
committed by GitHub
parent 4497131206
commit a903e46be9
16 changed files with 275 additions and 787 deletions

View File

@@ -1,5 +1,4 @@
import { GenericModrinthClient, type Labrinth } from '@modrinth/api-client'
import { LOCALES } from '@modrinth/ui/src/composables/i18n.ts'
import serverSidedVue from '@vitejs/plugin-vue'
import fs from 'fs/promises'
import { defineNuxtConfig } from 'nuxt/config'
@@ -223,7 +222,6 @@ export default defineNuxtConfig({
},
},
modules: [
'@nuxtjs/i18n',
'@pinia/nuxt',
'floating-vue/nuxt',
// Sentry causes rollup-plugin-inject errors in dev, only enable in production
@@ -243,25 +241,6 @@ export default defineNuxtConfig({
},
},
},
i18n: {
defaultLocale: 'en-US',
lazy: true,
langDir: '.',
locales: LOCALES.map((locale) => ({
...locale,
file: 'locale-loader.ts',
})),
strategy: 'no_prefix',
detectBrowserLanguage: {
useCookie: true,
cookieKey: 'locale',
fallbackLocale: 'en-US',
},
vueI18n: './i18n.config.ts',
bundle: {
optimizeTranslationDirective: false,
},
},
nitro: {
rollupConfig: {
// @ts-expect-error because of rolldown-vite - completely fine though