Internationalisation fix
This commit is contained in:
@@ -3,7 +3,7 @@ import { ref, computed, watch, onMounted, onUnmounted } from 'vue'
|
|||||||
import { useI18n } from '../composables/useI18n'
|
import { useI18n } from '../composables/useI18n'
|
||||||
|
|
||||||
|
|
||||||
const { locale, setLocale, getTranslation ,t} = useI18n()
|
const { t} = useI18n()
|
||||||
|
|
||||||
|
|
||||||
interface Props {
|
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')}`
|
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(() => {
|
const displayValue = computed(() => {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import type { Milestone } from '../models/classes/Milestone'
|
|||||||
import { TimelineScale } from '../models/types/TimelineScale'
|
import { TimelineScale } from '../models/types/TimelineScale'
|
||||||
import { useI18n } from '../composables/useI18n'
|
import { useI18n } from '../composables/useI18n'
|
||||||
|
|
||||||
const { setLocale, getTranslation } = useI18n()
|
const { getTranslation } = useI18n()
|
||||||
|
|
||||||
const t = (key: string): string => {
|
const t = (key: string): string => {
|
||||||
return getTranslation(key)
|
return getTranslation(key)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ interface Props {
|
|||||||
|
|
||||||
const props = defineProps<Props>()
|
const props = defineProps<Props>()
|
||||||
|
|
||||||
const { setLocale, getTranslation } = useI18n()
|
const { getTranslation } = useI18n()
|
||||||
|
|
||||||
const t = (key: string): string => {
|
const t = (key: string): string => {
|
||||||
return getTranslation(key)
|
return getTranslation(key)
|
||||||
|
|||||||
Reference in New Issue
Block a user