From c65ee029dd3f50142408d2e6727e9ab70c2266df Mon Sep 17 00:00:00 2001 From: Padreug Date: Wed, 27 May 2026 11:39:19 +0200 Subject: [PATCH] fix: escape @ in i18n messages, set useScope:'global' everywhere MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vue-i18n treats a bare '@' as the start of a linked-message reference, which made every placeholder containing one — you{'@'}example.com, the Telegram '{'@'}yourname' hint, the bad-Telegram error — crash the compiler with "Invalid linked format". Escaping each '@' as the literal {'@'} in en/es/fr fixes the compile and renders as a plain '@' to the visitor. Separately, every useI18n() call now passes { useScope: 'global' }. Without it, components mounted inside
/ contexts couldn't find a parent i18n scope and vue-i18n logged "Not found parent scope. use the global scope." on every render. Explicit global scope silences the warning and matches what the app actually intends — there are no per-component message bundles. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/components/contact/ContactForm.vue | 2 +- src/components/contact/PrivacyBlurb.vue | 2 +- src/components/layout/LocaleSwitcher.vue | 2 +- src/components/layout/SiteFooter.vue | 2 +- src/components/layout/SiteHeader.vue | 2 +- src/components/layout/ThemeToggle.vue | 2 +- src/components/projects/ProjectDetail.vue | 2 +- src/components/projects/ProjectImage.vue | 2 +- src/i18n/locales/en.json | 8 ++++---- src/i18n/locales/es.json | 8 ++++---- src/i18n/locales/fr.json | 8 ++++---- src/views/ContactView.vue | 2 +- src/views/HomeView.vue | 2 +- src/views/PortfolioView.vue | 2 +- 14 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/components/contact/ContactForm.vue b/src/components/contact/ContactForm.vue index 46acb58..91478b5 100644 --- a/src/components/contact/ContactForm.vue +++ b/src/components/contact/ContactForm.vue @@ -25,7 +25,7 @@ import { } from '@/components/ui/select' import { submitInquiry, type ContactMethod } from '@/features/nostr/submitInquiry' -const { t } = useI18n() +const { t } = useI18n({ useScope: 'global' }) const METHODS: ContactMethod[] = ['email', 'whatsapp', 'signal', 'telegram', 'nostr'] diff --git a/src/components/contact/PrivacyBlurb.vue b/src/components/contact/PrivacyBlurb.vue index 604f4bc..ae139bf 100644 --- a/src/components/contact/PrivacyBlurb.vue +++ b/src/components/contact/PrivacyBlurb.vue @@ -2,7 +2,7 @@ import { Lock } from '@lucide/vue' import { useI18n } from 'vue-i18n' -const { t } = useI18n() +const { t } = useI18n({ useScope: 'global' })