fix(02): resolve 3 typecheck errors and i18n langDir path

- useSetLocale → destructured setLocale from useI18n()
- addSeoAttributes → seo option for useLocaleHead()
- process.env → import.meta.env for Nuxt compatibility
- langDir: 'locales/' → 'app/locales/' (Nuxt 4 resolves from project root)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-08 16:31:58 +02:00
parent 5597c6a8dd
commit 09cfc0aaf3
6 changed files with 176 additions and 16 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<script setup lang="ts">
const { locale } = useI18n()
const head = useLocaleHead({ addSeoAttributes: true })
const head = useLocaleHead({ seo: true })
useHead({
htmlAttrs: { lang: locale },
+1 -2
View File
@@ -1,7 +1,6 @@
<script setup lang="ts">
const { t, locale } = useI18n()
const { t, locale, setLocale } = useI18n()
const localePath = useLocalePath()
const setLocale = useSetLocale()
const colorMode = useColorMode()
const route = useRoute()
const drawerOpen = ref(false)