From 0a7eabac2aab944bfca9b981425d5c85823d9ef8 Mon Sep 17 00:00:00 2001 From: Mocilac Date: Mon, 11 Aug 2025 15:43:42 +0200 Subject: [PATCH] Internationalisation fix --- src/components/DatePicker.vue | 6 ++---- src/components/MilestonePoint.vue | 2 +- src/components/TaskBar.vue | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/DatePicker.vue b/src/components/DatePicker.vue index 5371dbe..174a08d 100644 --- a/src/components/DatePicker.vue +++ b/src/components/DatePicker.vue @@ -3,7 +3,7 @@ import { ref, computed, watch, onMounted, onUnmounted } from 'vue' import { useI18n } from '../composables/useI18n' -const { locale, setLocale, getTranslation ,t} = useI18n() +const { t} = useI18n() interface Props { @@ -73,9 +73,7 @@ const formatDisplayDate = (dateStr: string) => { return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}` } -const getMonth = (key: string): string => { - return getTranslation(key) -} + // 显示值 const displayValue = computed(() => { diff --git a/src/components/MilestonePoint.vue b/src/components/MilestonePoint.vue index ccfcc4a..b9257e3 100644 --- a/src/components/MilestonePoint.vue +++ b/src/components/MilestonePoint.vue @@ -4,7 +4,7 @@ import type { Milestone } from '../models/classes/Milestone' import { TimelineScale } from '../models/types/TimelineScale' import { useI18n } from '../composables/useI18n' -const { setLocale, getTranslation } = useI18n() +const { getTranslation } = useI18n() const t = (key: string): string => { return getTranslation(key) diff --git a/src/components/TaskBar.vue b/src/components/TaskBar.vue index 3d9faa1..9bba3a7 100644 --- a/src/components/TaskBar.vue +++ b/src/components/TaskBar.vue @@ -34,7 +34,7 @@ interface Props { const props = defineProps() -const { setLocale, getTranslation } = useI18n() +const { getTranslation } = useI18n() const t = (key: string): string => { return getTranslation(key)