22import { FACET_INFO , type ComparisonFacet } from ' #shared/types/comparison'
33import { useRouteQuery } from ' @vueuse/router'
44
5- const { t } = useI18n ()
6-
75definePageMeta ({
86 name: ' compare' ,
97})
@@ -47,30 +45,30 @@ const gridHeaders = computed(() => {
4745useSeoMeta ({
4846 title : () =>
4947 packages .value .length > 0
50- ? t (' compare.packages.meta_title' , { packages: packages .value .join (' vs ' ) })
51- : t (' compare.packages.meta_title_empty' ),
48+ ? $ t (' compare.packages.meta_title' , { packages: packages .value .join (' vs ' ) })
49+ : $ t (' compare.packages.meta_title_empty' ),
5250 description : () =>
5351 packages .value .length > 0
54- ? t (' compare.packages.meta_description' , { packages: packages .value .join (' , ' ) })
55- : t (' compare.packages.meta_description_empty' ),
52+ ? $ t (' compare.packages.meta_description' , { packages: packages .value .join (' , ' ) })
53+ : $ t (' compare.packages.meta_description_empty' ),
5654})
5755 </script >
5856
5957<template >
6058 <main class =" container py-8 xl:py-12" >
6159 <header class =" mb-8" >
6260 <h1 class =" font-mono text-2xl sm:text-3xl font-medium mb-2" >
63- {{ t('compare.packages.title') }}
61+ {{ $ t('compare.packages.title') }}
6462 </h1 >
6563 <p class =" text-fg-muted" >
66- {{ t('compare.packages.tagline') }}
64+ {{ $ t('compare.packages.tagline') }}
6765 </p >
6866 </header >
6967
7068 <!-- Package selector -->
7169 <section class =" mb-8" aria-labelledby =" packages-heading" >
7270 <h2 id =" packages-heading" class =" text-xs text-fg-subtle uppercase tracking-wider mb-3" >
73- {{ t('compare.packages.section_packages') }}
71+ {{ $ t('compare.packages.section_packages') }}
7472 </h2 >
7573 <ComparePackageSelector v-model =" packages" :max =" 4" />
7674 </section >
@@ -79,28 +77,28 @@ useSeoMeta({
7977 <section class =" mb-8" aria-labelledby =" facets-heading" >
8078 <div class =" flex items-center gap-2 mb-3" >
8179 <h2 id =" facets-heading" class =" text-xs text-fg-subtle uppercase tracking-wider" >
82- {{ t('compare.packages.section_facets') }}
80+ {{ $ t('compare.packages.section_facets') }}
8381 </h2 >
8482 <button
8583 type =" button"
8684 class =" text-[10px] transition-colors focus-visible:outline-none focus-visible:underline"
8785 :class =" isAllSelected ? 'text-fg-muted' : 'text-fg-muted/60 hover:text-fg-muted'"
8886 :disabled =" isAllSelected"
89- :aria-label =" t('compare.facets.select_all')"
87+ :aria-label =" $ t('compare.facets.select_all')"
9088 @click =" selectAll"
9189 >
92- {{ t('compare.facets.all') }}
90+ {{ $ t('compare.facets.all') }}
9391 </button >
9492 <span class =" text-[10px] text-fg-muted/40" aria-hidden =" true" >/</span >
9593 <button
9694 type =" button"
9795 class =" text-[10px] transition-colors focus-visible:outline-none focus-visible:underline"
9896 :class =" isNoneSelected ? 'text-fg-muted' : 'text-fg-muted/60 hover:text-fg-muted'"
9997 :disabled =" isNoneSelected"
100- :aria-label =" t('compare.facets.deselect_all')"
98+ :aria-label =" $ t('compare.facets.deselect_all')"
10199 @click =" deselectAll"
102100 >
103- {{ t('compare.facets.none') }}
101+ {{ $ t('compare.facets.none') }}
104102 </button >
105103 </div >
106104 <CompareFacetSelector />
@@ -109,11 +107,11 @@ useSeoMeta({
109107 <!-- Comparison grid -->
110108 <section v-if =" canCompare" class =" mt-10" aria-labelledby =" comparison-heading" >
111109 <h2 id =" comparison-heading" class =" text-xs text-fg-subtle uppercase tracking-wider mb-4" >
112- {{ t('compare.packages.section_comparison') }}
110+ {{ $ t('compare.packages.section_comparison') }}
113111 </h2 >
114112
115113 <div v-if =" status === 'pending'" class =" flex items-center justify-center py-12" >
116- <LoadingSpinner :text =" t('compare.packages.loading')" />
114+ <LoadingSpinner :text =" $ t('compare.packages.loading')" />
117115 </div >
118116
119117 <div v-else-if =" packagesData && packagesData.length > 0" >
@@ -131,16 +129,16 @@ useSeoMeta({
131129 </div >
132130
133131 <div v-else class =" text-center py-12" role =" alert" >
134- <p class =" text-fg-muted" >{{ t('compare.packages.error') }}</p >
132+ <p class =" text-fg-muted" >{{ $ t('compare.packages.error') }}</p >
135133 </div >
136134 </section >
137135
138136 <!-- Empty state -->
139137 <section v-else class =" text-center py-16 border border-dashed border-border rounded-lg" >
140138 <div class =" i-carbon:compare w-12 h-12 text-fg-subtle mx-auto mb-4" aria-hidden =" true" />
141- <h2 class =" font-mono text-lg text-fg-muted mb-2" >{{ t('compare.packages.empty_title') }}</h2 >
139+ <h2 class =" font-mono text-lg text-fg-muted mb-2" >{{ $ t('compare.packages.empty_title') }}</h2 >
142140 <p class =" text-sm text-fg-subtle max-w-md mx-auto" >
143- {{ t('compare.packages.empty_description') }}
141+ {{ $ t('compare.packages.empty_description') }}
144142 </p >
145143 </section >
146144 </main >
0 commit comments