@@ -4,6 +4,8 @@ import type { VueUiXyDatasetItem } from 'vue-data-ui'
44import { VueUiXy } from ' vue-data-ui/vue-ui-xy'
55import { useDebounceFn } from ' @vueuse/core'
66
7+ const { t } = useI18n ()
8+
79const {
810 weeklyDownloads,
911 inModal = false ,
@@ -396,7 +398,7 @@ const config = computed(() => ({
396398 grid: {
397399 labels: {
398400 axis: {
399- yLabel: ` ${ selectedGranularity .value } downloads ` ,
401+ yLabel: t ( ' package.downloads.y_axis_label ' , { granularity: selectedGranularity .value }) ,
400402 xLabel: packageName ,
401403 yLabelOffsetX: 12 ,
402404 fontSize: 24 ,
@@ -465,7 +467,7 @@ const config = computed(() => ({
465467 for =" granularity"
466468 class =" text-[10px] font-mono text-fg-subtle tracking-wide uppercase"
467469 >
468- Granularity
470+ {{ t('package.downloads.granularity') }}
469471 </label >
470472
471473 <div
@@ -476,10 +478,10 @@ const config = computed(() => ({
476478 v-model =" selectedGranularity"
477479 class =" w-full bg-transparent font-mono text-sm text-fg outline-none"
478480 >
479- <option value =" daily" >Daily </option >
480- <option value =" weekly" >Weekly </option >
481- <option value =" monthly" >Monthly </option >
482- <option value =" yearly" >Yearly </option >
481+ <option value =" daily" >{{ t('package.downloads.granularity_daily') }} </option >
482+ <option value =" weekly" >{{ t('package.downloads.granularity_weekly') }} </option >
483+ <option value =" monthly" >{{ t('package.downloads.granularity_monthly') }} </option >
484+ <option value =" yearly" >{{ t('package.downloads.granularity_yearly') }} </option >
483485 </select >
484486 </div >
485487 </div >
@@ -491,7 +493,7 @@ const config = computed(() => ({
491493 for =" startDate"
492494 class =" text-[10px] font-mono text-fg-subtle tracking-wide uppercase"
493495 >
494- Start
496+ {{ t('package.downloads.start_date') }}
495497 </label >
496498 <div
497499 class =" flex items-center gap-2 px-2.5 py-1.75 bg-bg-subtle border border-border rounded-md focus-within:(border-border-hover ring-2 ring-fg/50)"
@@ -511,7 +513,7 @@ const config = computed(() => ({
511513 for =" endDate"
512514 class =" text-[10px] font-mono text-fg-subtle tracking-wide uppercase"
513515 >
514- End
516+ {{ t('package.downloads.end_date') }}
515517 </label >
516518 <div
517519 class =" flex items-center gap-2 px-2.5 py-1.75 bg-bg-subtle border border-border rounded-md focus-within:(border-border-hover ring-2 ring-fg/50)"
@@ -632,7 +634,7 @@ const config = computed(() => ({
632634 v-if =" inModal && !chartData.dataset && !pending"
633635 class =" min-h-[260px] flex items-center justify-center text-fg-subtle font-mono text-sm"
634636 >
635- No download data available
637+ {{ t('package.downloads.no_data') }}
636638 </div >
637639
638640 <div
@@ -641,7 +643,7 @@ const config = computed(() => ({
641643 aria-live =" polite"
642644 class =" absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-xs text-fg-subtle font-mono bg-bg/70 backdrop-blur px-3 py-2 rounded-md border border-border"
643645 >
644- Loading…
646+ {{ t('package.downloads.loading') }}
645647 </div >
646648 </div >
647649</template >
0 commit comments