Skip to content

Commit d371262

Browse files
committed
fix: y axis label translation
1 parent 20892fc commit d371262

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/components/PackageDownloadAnalytics.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const {
1616
createdIso: string | null
1717
}>()
1818
19+
const { t } = useI18n()
1920
const { accentColors, selectedAccentColor } = useAccentColor()
2021
const colorMode = useColorMode()
2122
const resolvedMode = ref<'light' | 'dark'>('light')
@@ -487,7 +488,9 @@ const config = computed(() => ({
487488
stroke: isDarkMode.value ? '#4A4A4A' : '#a3a3a3',
488489
labels: {
489490
axis: {
490-
yLabel: $t('package.downloads.y_axis_label', { granularity: selectedGranularity.value }),
491+
yLabel: t('package.downloads.y_axis_label', {
492+
granularity: t(`package.downloads.granularity_${selectedGranularity.value}`),
493+
}),
491494
xLabel: packageName,
492495
yLabelOffsetX: 12,
493496
fontSize: 24,

0 commit comments

Comments
 (0)