feat(localization): implement localePath for project links across components

- Updated HytaleDemoGrid.vue, ProjectCard.vue, FeaturedProjectsSection.vue, about.vue, and project/[id].vue to utilize localePath for project links, enhancing localization support.
- This change ensures that project URLs are correctly localized, improving user experience across different languages.

This commit strengthens the site's multilingual capabilities by standardizing project link paths.
This commit is contained in:
2026-04-28 19:29:40 +02:00
parent 5ae226bbf2
commit 33bbb7a3b9
5 changed files with 21 additions and 7 deletions
+3 -2
View File
@@ -7,6 +7,7 @@ interface Props {
const props = defineProps<Props>()
const { t } = useI18n()
const localePath = useLocalePath()
const translatedCategory = computed(() => {
if (!props.project.category) return ''
@@ -22,7 +23,7 @@ const translatedCategory = computed(() => {
itemtype="https://schema.org/CreativeWork"
>
<!-- Image -->
<NuxtLink :to="`/project/${project.id}`" class="block relative overflow-hidden">
<NuxtLink :to="localePath(`/project/${project.id}`)" class="block relative overflow-hidden">
<NuxtImg
:src="project.image"
:alt="`${project.title} - ${project.description.slice(0, 60)}...`"
@@ -81,7 +82,7 @@ const translatedCategory = computed(() => {
<!-- Hidden SEO link -->
<NuxtLink
:to="`/project/${project.id}`"
:to="localePath(`/project/${project.id}`)"
class="absolute inset-0 z-10"
:aria-label="`${t('projects.buttons.viewProject')} - ${project.title}`"
itemprop="url"