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:
@@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { ArticleSummary, Paginated, Category } from '#shared/types/blog'
|
||||
|
||||
const { t } = useI18n()
|
||||
const route = useRoute()
|
||||
const slug = route.params.slug as string
|
||||
|
||||
@@ -27,7 +26,7 @@ const canonical = computed(
|
||||
|
||||
useSeoMeta({
|
||||
title: category.value.name,
|
||||
description: () => t('list.categoryDescription', { name: category.value?.name ?? '' }),
|
||||
description: () => `Tutti gli articoli nella categoria ${category.value?.name ?? ''}.`,
|
||||
ogType: 'website',
|
||||
})
|
||||
|
||||
@@ -37,13 +36,13 @@ useHead({ link: [{ rel: 'canonical', href: canonical }] })
|
||||
<template>
|
||||
<div>
|
||||
<header class="page-header">
|
||||
<p class="kicker">{{ $t('list.category') }}</p>
|
||||
<p class="kicker">Categoria</p>
|
||||
<h1>{{ category?.name }}</h1>
|
||||
</header>
|
||||
|
||||
<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="!data?.items.length">{{ $t('list.categoryEmpty') }}</p>
|
||||
<p v-else-if="!data?.items.length">Non ci sono articoli in questa categoria.</p>
|
||||
|
||||
<template v-else>
|
||||
<ul class="card-grid">
|
||||
@@ -52,19 +51,19 @@ useHead({ link: [{ rel: 'canonical', href: canonical }] })
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<nav v-if="data.pageCount > 1" class="pagination" :aria-label="$t('pagination.label')">
|
||||
<nav v-if="data.pageCount > 1" class="pagination" aria-label="Paginazione">
|
||||
<NuxtLink v-if="data.page > 1" :to="{ query: { page: data.page - 1 } }" rel="prev">
|
||||
{{ $t('pagination.previous') }}
|
||||
Pagina precedente
|
||||
</NuxtLink>
|
||||
<span class="muted">
|
||||
{{ $t('pagination.position', { page: data.page, total: data.pageCount }) }}
|
||||
Pagina {{ data.page }} di {{ data.pageCount }}
|
||||
</span>
|
||||
<NuxtLink
|
||||
v-if="data.page < data.pageCount"
|
||||
:to="{ query: { page: data.page + 1 } }"
|
||||
rel="next"
|
||||
>
|
||||
{{ $t('pagination.next') }}
|
||||
Pagina successiva
|
||||
</NuxtLink>
|
||||
</nav>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user