fix: translate months in gantt chart

Related to #774
This commit is contained in:
kolaente 2021-10-04 21:38:01 +02:00
parent d583cb2094
commit a558f5b35a
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 4 additions and 2 deletions

View File

@ -194,7 +194,6 @@ import TaskCollectionService from '../../services/taskCollection'
import {mapState} from 'vuex'
import Rights from '../../models/constants/rights.json'
import FilterPopup from '@/components/list/partials/filter-popup.vue'
import {format} from 'date-fns'
export default {
name: 'GanttChart',
@ -474,7 +473,7 @@ export default {
})
},
formatYear(date) {
return format(date, 'MMMM, yyyy')
return this.format(date, 'MMMM, yyyy')
},
},
}

View File

@ -112,6 +112,9 @@ Vue.mixin({
formatDateShort(date) {
return formatDate(date, 'PPpp', this.$t('date.locale'))
},
format(date, f) {
return formatDate(date, f, this.$t('date.locale'))
},
getNamespaceTitle(n) {
return getNamespaceTitle(n, (p: VueI18n.Path) => this.$t(p))
},