From 809b60d85e037791c535168327091a8cec2fefb5 Mon Sep 17 00:00:00 2001 From: Davide Grilli Date: Wed, 26 Aug 2026 09:39:05 +0200 Subject: [PATCH] Remove i18n, keep only Italian and rely on browser translation The interface was translated in en/it/es/fr via @nuxtjs/i18n. Drop the module, the locale files, and the language switcher: the UI is now static Italian text, with translation for foreign visitors left to the Google Translate browser extension instead of the app. --- CLAUDE.md | 10 +- docker-compose.dev.yml | 1 - docker-compose.yml | 2 - frontend/app/app.vue | 5 - frontend/app/components/ArticleCard.vue | 9 +- frontend/app/components/LanguageSwitcher.vue | 80 - frontend/app/error.vue | 9 +- frontend/app/layouts/default.vue | 59 +- frontend/app/pages/blog/[slug].vue | 15 +- frontend/app/pages/blog/index.vue | 23 +- frontend/app/pages/category/[slug].vue | 17 +- frontend/app/pages/index.vue | 30 +- frontend/i18n/locales/en.json | 52 - frontend/i18n/locales/es.json | 52 - frontend/i18n/locales/fr.json | 52 - frontend/i18n/locales/it.json | 52 - frontend/nuxt.config.ts | 24 +- frontend/package-lock.json | 2767 +----------------- frontend/package.json | 1 - frontend/shared/utils/format.ts | 8 +- 20 files changed, 84 insertions(+), 3184 deletions(-) delete mode 100644 frontend/app/components/LanguageSwitcher.vue delete mode 100644 frontend/i18n/locales/en.json delete mode 100644 frontend/i18n/locales/es.json delete mode 100644 frontend/i18n/locales/fr.json delete mode 100644 frontend/i18n/locales/it.json diff --git a/CLAUDE.md b/CLAUDE.md index 9e5bf34..e8e4c3a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -40,11 +40,11 @@ Nitro del frontend. Un solo dominio, un solo certificato TLS. richiesta né concessa). - Il Markdown dell'articolo è convertito in HTML **nell'endpoint**, non nel componente: il contenuto è già nell'HTML SSR e `marked` resta fuori dal bundle client. -- L'**interfaccia** è tradotta in en/it/es/fr con `@nuxtjs/i18n`: stringhe in - `frontend/i18n/locales/*.json`, rotte `prefix_except_default` (inglese senza prefisso), - `hreflang` e `og:locale` generati da `useLocaleHead()` in `app.vue`. Nessuna stringa - visibile va scritta a mano in un componente: aggiungi la chiave nei quattro file. - I **contenuti** invece restano monolingua — la localizzazione di Strapi è disattivata. +- L'**interfaccia** è solo in italiano, stringhe statiche nei componenti (niente + `@nuxtjs/i18n`, niente file di traduzione): `` è fisso in + `nuxt.config.ts`. La traduzione per i visitatori stranieri è delegata all'estensione + Google Translate del browser, non è gestita dall'app. I **contenuti** restano + monolingua — la localizzazione di Strapi è disattivata. - `cms/src/index.ts` (`bootstrap`) dà al ruolo Public solo `find`/`findOne` su Article e Category, e disattiva la registrazione pubblica: non esistono utenti front-end, solo amministratori. Qualsiasi permesso in più va motivato. diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index e87bcd7..17b9bdb 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -16,4 +16,3 @@ services: environment: NUXT_PUBLIC_SITE_URL: http://localhost:3000 NUXT_PUBLIC_STRAPI_URL: http://localhost:1337 - NUXT_PUBLIC_I18N_BASE_URL: http://localhost:3000 diff --git a/docker-compose.yml b/docker-compose.yml index f03d062..c93a93d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -51,8 +51,6 @@ services: NUXT_STRAPI_URL: ${STRAPI_URL} NUXT_PUBLIC_SITE_URL: ${PUBLIC_SITE_URL} NUXT_PUBLIC_STRAPI_URL: ${PUBLIC_STRAPI_URL} - # Absolute origin for the alternate-language links. - NUXT_PUBLIC_I18N_BASE_URL: ${PUBLIC_SITE_URL} caddy: image: caddy:2-alpine diff --git a/frontend/app/app.vue b/frontend/app/app.vue index e7aa252..ed9e94c 100644 --- a/frontend/app/app.vue +++ b/frontend/app/app.vue @@ -1,8 +1,3 @@ - -