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.
This commit is contained in:
2026-08-26 09:39:05 +02:00
parent 448dd881e4
commit 809b60d85e
20 changed files with 84 additions and 3184 deletions
+14 -16
View File
@@ -1,8 +1,6 @@
<script setup lang="ts">
import type { ArticleSummary, Paginated } from '#shared/types/blog'
const { t, locale } = useI18n()
const { data, error } = await useFetch<Paginated<ArticleSummary>>('/api/articles', {
key: 'home-articles',
query: { page: 1 },
@@ -24,9 +22,9 @@ useHead({ titleTemplate: '%s', link: [{ rel: 'canonical', href: canonical }] })
useSeoMeta({
title: SITE_NAME,
description: () => t('site.tagline'),
description: 'Articoli, guide e analisi.',
ogTitle: SITE_NAME,
ogDescription: () => t('site.tagline'),
ogDescription: 'Articoli, guide e analisi.',
ogType: 'website',
ogUrl: canonical,
ogImage: `${config.siteUrl}/logo.png`,
@@ -35,13 +33,13 @@ useSeoMeta({
<template>
<div>
<p v-if="error">{{ $t('list.failed') }}</p>
<p v-if="error">Non è stato possibile caricare gli articoli. Riprova più tardi.</p>
<p v-else-if="!featured">{{ $t('list.empty') }}</p>
<p v-else-if="!featured">Non è stato ancora pubblicato nulla.</p>
<template v-else>
<article class="featured" :class="{ 'has-cover': featuredCover }">
<NuxtLinkLocale
<NuxtLink
v-if="featuredCover"
class="featured-cover"
:to="`/blog/${featured.slug}`"
@@ -54,30 +52,30 @@ useSeoMeta({
:width="featured.cover?.width ?? undefined"
:height="featured.cover?.height ?? undefined"
>
</NuxtLinkLocale>
</NuxtLink>
<div class="featured-text">
<p class="kicker">
{{ featured.category ? featured.category.name : $t('home.latest') }}
{{ featured.category ? featured.category.name : 'Ultimo' }}
</p>
<h1>
<NuxtLinkLocale :to="`/blog/${featured.slug}`">{{ featured.title }}</NuxtLinkLocale>
<NuxtLink :to="`/blog/${featured.slug}`">{{ featured.title }}</NuxtLink>
</h1>
<p class="kicker date">
<time :datetime="isoDate(featured.publishedAt)">
{{ formatDate(featured.publishedAt, locale) }}
{{ formatDate(featured.publishedAt) }}
</time>
</p>
<p class="read-more">
<NuxtLinkLocale :to="`/blog/${featured.slug}`">
{{ $t('home.readArticle') }}
</NuxtLinkLocale>
<NuxtLink :to="`/blog/${featured.slug}`">
Leggi l'articolo
</NuxtLink>
</p>
</div>
</article>
<template v-if="rest.length">
<h2 class="section-heading kicker">{{ $t('home.moreStories') }}</h2>
<h2 class="section-heading kicker">Altri articoli</h2>
<ul class="card-grid">
<li v-for="article in rest" :key="article.slug">
@@ -87,7 +85,7 @@ useSeoMeta({
</template>
<p class="more">
<NuxtLinkLocale to="/blog">{{ $t('home.viewAll') }}</NuxtLinkLocale>
<NuxtLink to="/blog">Vedi tutti gli articoli</NuxtLink>
</p>
</template>
</div>