@@ -7,8 +7,6 @@ const props = defineProps<{
77 version: string
88}>()
99
10- const { t } = useI18n ()
11-
1210const {
1311 data : vulnTree,
1412 status,
@@ -34,7 +32,7 @@ const summaryText = computed(() => {
3432 if (! vulnTree .value ) return ' '
3533 const { totalCounts } = vulnTree .value
3634 return SEVERITY_LEVELS .filter (s => totalCounts [s ] > 0 )
37- .map (s => ` ${totalCounts [s ]} ${t (` package.vulnerabilities.severity.${s } ` )} ` )
35+ .map (s => ` ${totalCounts [s ]} ${$ t (` package.vulnerabilities.severity.${s } ` )} ` )
3836 .join (' , ' )
3937})
4038
@@ -83,7 +81,7 @@ function getDepthStyle(depth: string | undefined) {
8381 <span class =" i-carbon-warning-alt w-4 h-4 shrink-0" aria-hidden =" true" />
8482 <span class =" font-mono text-sm font-medium truncate" >
8583 {{
86- t(
84+ $ t(
8785 'package.vulnerabilities.tree_found',
8886 {
8987 vulns: vulnTree!.totalCounts.total,
@@ -137,7 +135,7 @@ function getDepthStyle(depth: string | undefined) {
137135 class =" px-1.5 py-0.5 text-[10px] font-mono rounded border"
138136 :class =" SEVERITY_COLORS[s]"
139137 >
140- {{ pkg.counts[s] }} {{ t(`package.vulnerabilities.severity.${s}`) }}
138+ {{ pkg.counts[s] }} {{ $ t(`package.vulnerabilities.severity.${s}`) }}
141139 </span >
142140 </div >
143141 </div >
@@ -159,7 +157,7 @@ function getDepthStyle(depth: string | undefined) {
159157 <span class =" truncate" >{{ vuln.summary }}</span >
160158 </li >
161159 <li v-if =" pkg.vulnerabilities.length > 2" class =" text-xs text-fg-subtle" >
162- {{ t('package.vulnerabilities.more', { count: pkg.vulnerabilities.length - 2 }) }}
160+ {{ $ t('package.vulnerabilities.more', { count: pkg.vulnerabilities.length - 2 }) }}
163161 </li >
164162 </ul >
165163 </li >
@@ -172,7 +170,7 @@ function getDepthStyle(depth: string | undefined) {
172170 @click =" showAllPackages = true"
173171 >
174172 {{
175- t('package.vulnerabilities.show_all_packages', {
173+ $ t('package.vulnerabilities.show_all_packages', {
176174 count: vulnTree!.vulnerablePackages.length,
177175 })
178176 }}
@@ -184,7 +182,7 @@ function getDepthStyle(depth: string | undefined) {
184182 class =" px-4 py-2 text-xs text-fg-subtle border-t border-border flex items-center gap-2"
185183 >
186184 <span class =" i-carbon-warning w-3 h-3" aria-hidden =" true" />
187- <span >{{ t('package.vulnerabilities.packages_failed', vulnTree!.failedQueries) }}</span >
185+ <span >{{ $ t('package.vulnerabilities.packages_failed', vulnTree!.failedQueries) }}</span >
188186 </div >
189187 </div >
190188 </div >
@@ -201,7 +199,7 @@ function getDepthStyle(depth: string | undefined) {
201199 class =" i-carbon-circle-dash w-4 h-4 animate-spin motion-reduce:animate-none text-fg-subtle"
202200 aria-hidden =" true"
203201 />
204- <span class =" text-sm text-fg-muted" >{{ t('package.vulnerabilities.scanning_tree') }}</span >
202+ <span class =" text-sm text-fg-muted" >{{ $ t('package.vulnerabilities.scanning_tree') }}</span >
205203 </div >
206204 </div >
207205 </section >
@@ -215,7 +213,7 @@ function getDepthStyle(depth: string | undefined) {
215213 <div class =" flex items-center gap-2" >
216214 <span class =" i-carbon-checkmark w-4 h-4 text-fg-subtle" aria-hidden =" true" />
217215 <span class =" text-sm text-fg-muted" >
218- {{ t('package.vulnerabilities.no_known', { count: vulnTree?.totalPackages ?? 0 }) }}
216+ {{ $ t('package.vulnerabilities.no_known', { count: vulnTree?.totalPackages ?? 0 }) }}
219217 </span >
220218 </div >
221219 <!-- Warning if some queries failed -->
@@ -224,7 +222,7 @@ function getDepthStyle(depth: string | undefined) {
224222 class =" flex items-center gap-2 mt-2 text-xs text-fg-subtle"
225223 >
226224 <span class =" i-carbon-warning w-3 h-3" aria-hidden =" true" />
227- <span >{{ t('package.vulnerabilities.packages_failed', vulnTree.failedQueries) }}</span >
225+ <span >{{ $ t('package.vulnerabilities.packages_failed', vulnTree.failedQueries) }}</span >
228226 </div >
229227 </div >
230228 </section >
@@ -235,7 +233,7 @@ function getDepthStyle(depth: string | undefined) {
235233 <div class =" flex items-center gap-2" >
236234 <span class =" i-carbon-warning w-4 h-4 text-fg-subtle" aria-hidden =" true" />
237235 <span class =" text-sm text-fg-muted" >
238- {{ t('package.vulnerabilities.scan_failed') }}
236+ {{ $ t('package.vulnerabilities.scan_failed') }}
239237 </span >
240238 </div >
241239 </div >
0 commit comments