Pluralize related task kinds if there is more than one
This commit is contained in:
parent
cd6dee88b9
commit
e2137d08a5
2 changed files with 51 additions and 12 deletions
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
<div class="related-tasks" v-for="(rts, kind ) in relatedTasks" :key="kind">
|
<div class="related-tasks" v-for="(rts, kind ) in relatedTasks" :key="kind">
|
||||||
<template v-if="rts.length > 0">
|
<template v-if="rts.length > 0">
|
||||||
<span class="title">{{ relationKinds[kind] }}</span>
|
<span class="title">{{ relationKindTitle(kind, rts.length) }}</span>
|
||||||
<div class="tasks noborder">
|
<div class="tasks noborder">
|
||||||
<div class="task" v-for="t in rts" :key="t.id">
|
<div class="task" v-for="t in rts" :key="t.id">
|
||||||
<router-link :to="{ name: 'taskDetailView', params: { id: t.id } }">
|
<router-link :to="{ name: 'taskDetailView', params: { id: t.id } }">
|
||||||
|
@ -209,6 +209,12 @@
|
||||||
this.error(e, this)
|
this.error(e, this)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
relationKindTitle(kind, length) {
|
||||||
|
if (length > 1) {
|
||||||
|
return relationKinds[kind][1]
|
||||||
|
}
|
||||||
|
return relationKinds[kind][0]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,13 +1,46 @@
|
||||||
{
|
{
|
||||||
"subtask": "Subtask",
|
"subtask": [
|
||||||
"parenttask": "Parent Task",
|
"Subtask",
|
||||||
"related": "Related Task",
|
"Subtasks"
|
||||||
"duplicateof": "Duplicate Of",
|
],
|
||||||
"duplicates": "Duplicates",
|
"parenttask": [
|
||||||
"blocking": "Blocking",
|
"Parent Task",
|
||||||
"blocked": "Blocked By",
|
"Parent Tasks"
|
||||||
"precedes": "Preceds",
|
],
|
||||||
"follows": "Follows",
|
"related": [
|
||||||
"copiedfrom": "Copied From",
|
"Related Task",
|
||||||
"copiedto": "Copied To"
|
"Related Tasks"
|
||||||
|
],
|
||||||
|
"duplicateof": [
|
||||||
|
"Duplicate Of",
|
||||||
|
"Duplicates Of"
|
||||||
|
],
|
||||||
|
"duplicates": [
|
||||||
|
"Duplicates",
|
||||||
|
"Duplicates"
|
||||||
|
],
|
||||||
|
"blocking": [
|
||||||
|
"Blocking",
|
||||||
|
"Blocking"
|
||||||
|
],
|
||||||
|
"blocked": [
|
||||||
|
"Blocked By",
|
||||||
|
"Blocked By"
|
||||||
|
],
|
||||||
|
"precedes": [
|
||||||
|
"Preceds",
|
||||||
|
"Preceds"
|
||||||
|
],
|
||||||
|
"follows": [
|
||||||
|
"Follows",
|
||||||
|
"Follows"
|
||||||
|
],
|
||||||
|
"copiedfrom": [
|
||||||
|
"Copied From",
|
||||||
|
"Copied From"
|
||||||
|
],
|
||||||
|
"copiedto": [
|
||||||
|
"Copied To",
|
||||||
|
"Copied To"
|
||||||
|
]
|
||||||
}
|
}
|
Loading…
Reference in a new issue