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:
@@ -3,7 +3,6 @@ import type { ArticleSummary } from '#shared/types/blog'
|
||||
|
||||
const props = defineProps<{ article: ArticleSummary }>()
|
||||
|
||||
const { locale } = useI18n()
|
||||
const mediaUrl = useMediaUrl()
|
||||
const cover = computed(() => mediaUrl(props.article.cover))
|
||||
</script>
|
||||
@@ -12,7 +11,7 @@ const cover = computed(() => mediaUrl(props.article.cover))
|
||||
<article class="card">
|
||||
<!-- No placeholder box when there is no cover: an empty grey rectangle
|
||||
reads as a broken image rather than as a deliberate choice. -->
|
||||
<NuxtLinkLocale
|
||||
<NuxtLink
|
||||
v-if="cover"
|
||||
class="cover-link"
|
||||
:to="`/blog/${article.slug}`"
|
||||
@@ -27,17 +26,17 @@ const cover = computed(() => mediaUrl(props.article.cover))
|
||||
:height="article.cover?.height ?? undefined"
|
||||
loading="lazy"
|
||||
>
|
||||
</NuxtLinkLocale>
|
||||
</NuxtLink>
|
||||
|
||||
<p v-if="article.category" class="kicker">{{ article.category.name }}</p>
|
||||
|
||||
<h2>
|
||||
<NuxtLinkLocale :to="`/blog/${article.slug}`">{{ article.title }}</NuxtLinkLocale>
|
||||
<NuxtLink :to="`/blog/${article.slug}`">{{ article.title }}</NuxtLink>
|
||||
</h2>
|
||||
|
||||
<p class="kicker date">
|
||||
<time :datetime="isoDate(article.publishedAt)">
|
||||
{{ formatDate(article.publishedAt, locale) }}
|
||||
{{ formatDate(article.publishedAt) }}
|
||||
</time>
|
||||
</p>
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user