Internationalisation fix

This commit is contained in:
Mocilac
2025-08-11 15:43:42 +02:00
parent d6f1908431
commit 0a7eabac2a
3 changed files with 4 additions and 6 deletions
+2 -4
View File
@@ -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(() => {
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -34,7 +34,7 @@ interface Props {
const props = defineProps<Props>()
const { setLocale, getTranslation } = useI18n()
const { getTranslation } = useI18n()
const t = (key: string): string => {
return getTranslation(key)