fix(i18n): add translation for favorite project description
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Resolves https://community.vikunja.io/t/missing-strings-in-language-files/3532
This commit is contained in:
parent
ae04f9b4f4
commit
6c08ce814b
@ -226,6 +226,7 @@
|
||||
"unfavorite": "Remove this project from favorites",
|
||||
"openSettingsMenu": "Open project settings menu",
|
||||
"description": "Project description",
|
||||
"favoriteDescription": "This project has all tasks marked as favorites.",
|
||||
"create": {
|
||||
"header": "New project",
|
||||
"titlePlaceholder": "The project's title goes here…",
|
||||
|
@ -27,11 +27,14 @@
|
||||
import {computed} from 'vue'
|
||||
import DOMPurify from 'dompurify'
|
||||
import {useProjectStore} from '@/stores/projects'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
|
||||
const props = defineProps<{
|
||||
projectId: number
|
||||
}>()
|
||||
|
||||
const {t} = useI18n()
|
||||
|
||||
const projectStore = useProjectStore()
|
||||
const project = computed(() => projectStore.projects[props.projectId])
|
||||
const htmlDescription = computed(() => {
|
||||
@ -39,6 +42,10 @@ const htmlDescription = computed(() => {
|
||||
if (description === '') {
|
||||
return ''
|
||||
}
|
||||
|
||||
if (project.value.id === -1) {
|
||||
return t('project.favoriteDescription')
|
||||
}
|
||||
|
||||
return DOMPurify.sanitize(description, {ADD_ATTR: ['target']})
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user