mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Fix translations, lint and some tests
This commit is contained in:
parent
842d68c129
commit
ba369d82fe
@ -19,7 +19,7 @@
|
||||
</transition>
|
||||
|
||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||
<p v-html="$t(`report.${data.context}.message`, { name: name })" />
|
||||
<p v-html="message" />
|
||||
|
||||
<template
|
||||
slot="footer"
|
||||
@ -67,8 +67,13 @@ export default {
|
||||
return this.$store.getters['modal/data'] || {}
|
||||
},
|
||||
title() {
|
||||
if (!this.data.context) return ''
|
||||
return this.$t(`report.${this.data.context}.title`)
|
||||
},
|
||||
message() {
|
||||
if (!this.data.context) return ''
|
||||
return this.$t(`report.${this.data.context}.message`, { name: this.name })
|
||||
},
|
||||
name() {
|
||||
return this.$filters.truncate(this.data.name, 30)
|
||||
},
|
||||
|
||||
@ -128,7 +128,7 @@ Given('somebody reported the following posts:', table => {
|
||||
.authenticateAs(submitter)
|
||||
.create('Report', {
|
||||
id,
|
||||
description: "Offensive content"
|
||||
description: 'Offensive content'
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -8,7 +8,7 @@ export default app => {
|
||||
description
|
||||
type
|
||||
createdAt
|
||||
reporter {
|
||||
submitter {
|
||||
name
|
||||
slug
|
||||
}
|
||||
@ -27,7 +27,7 @@ export default app => {
|
||||
slug
|
||||
}
|
||||
}
|
||||
contribution {
|
||||
post {
|
||||
title
|
||||
slug
|
||||
author {
|
||||
|
||||
@ -98,7 +98,7 @@
|
||||
"reports": {
|
||||
"empty": "Glückwunsch, es gibt nichts zu moderieren.",
|
||||
"name": "Meldungen",
|
||||
"reporter": "gemeldet von"
|
||||
"submitter": "gemeldet von"
|
||||
}
|
||||
},
|
||||
"contribution": {
|
||||
|
||||
@ -98,7 +98,7 @@
|
||||
"reports": {
|
||||
"empty": "Congratulations, nothing to moderate.",
|
||||
"name": "Reports",
|
||||
"reporter": "reported by"
|
||||
"submitter": "reported by"
|
||||
}
|
||||
},
|
||||
"contribution": {
|
||||
|
||||
@ -13,18 +13,18 @@
|
||||
slot="name"
|
||||
slot-scope="scope"
|
||||
>
|
||||
<div v-if="scope.row.type === 'contribution'">
|
||||
<nuxt-link :to="{ name: 'post-slug', params: { slug: scope.row.contribution.slug } }">
|
||||
<b>{{ scope.row.contribution.title | truncate(50) }}</b>
|
||||
<div v-if="scope.row.type === 'Post'">
|
||||
<nuxt-link :to="{ name: 'post-slug', params: { slug: scope.row.post.slug } }">
|
||||
<b>{{ scope.row.post.title | truncate(50) }}</b>
|
||||
</nuxt-link><br>
|
||||
<ds-text
|
||||
size="small"
|
||||
color="soft"
|
||||
>
|
||||
{{ scope.row.contribution.author.name }}
|
||||
{{ scope.row.post.author.name }}
|
||||
</ds-text>
|
||||
</div>
|
||||
<div v-else-if="scope.row.type === 'comment'">
|
||||
<div v-else-if="scope.row.type === 'Comment'">
|
||||
<nuxt-link :to="{ name: 'post-slug', params: { slug: scope.row.comment.post.slug } }">
|
||||
<b>{{ scope.row.comment.contentExcerpt | truncate(50) }}</b>
|
||||
</nuxt-link><br>
|
||||
@ -49,28 +49,28 @@
|
||||
color="soft"
|
||||
>
|
||||
<ds-icon
|
||||
v-if="scope.row.type === 'contribution'"
|
||||
v-tooltip="{ content: $t(`report.${scope.row.type}.type`), placement: 'right' }"
|
||||
v-if="scope.row.type === 'Post'"
|
||||
v-tooltip="{ content: $t('report.contribution.type'), placement: 'right' }"
|
||||
name="bookmark"
|
||||
/>
|
||||
<ds-icon
|
||||
v-else-if="scope.row.type === 'comment'"
|
||||
v-tooltip="{ content: $t(`report.${scope.row.type}.type`), placement: 'right' }"
|
||||
v-else-if="scope.row.type === 'Comment'"
|
||||
v-tooltip="{ content: $t('report.comment.type'), placement: 'right' }"
|
||||
name="comments"
|
||||
/>
|
||||
<ds-icon
|
||||
v-else
|
||||
v-tooltip="{ content: $t(`report.${scope.row.type}.type`), placement: 'right' }"
|
||||
v-else-if="scope.row.type === 'User'"
|
||||
v-tooltip="{ content: $t('report.user.type'), placement: 'right' }"
|
||||
name="user"
|
||||
/>
|
||||
</ds-text>
|
||||
</template>
|
||||
<template
|
||||
slot="reporter"
|
||||
slot="submitter"
|
||||
slot-scope="scope"
|
||||
>
|
||||
<nuxt-link :to="{ name: 'profile-slug', params: { slug: scope.row.reporter.slug } }">
|
||||
{{ scope.row.reporter.name }}
|
||||
<nuxt-link :to="{ name: 'profile-slug', params: { slug: scope.row.submitter.slug } }">
|
||||
{{ scope.row.submitter.name }}
|
||||
</nuxt-link>
|
||||
</template>
|
||||
</ds-table>
|
||||
@ -101,7 +101,7 @@ export default {
|
||||
return {
|
||||
type: ' ',
|
||||
name: ' ',
|
||||
reporter: this.$t('moderation.reports.reporter')
|
||||
submitter: this.$t('moderation.reports.submitter')
|
||||
// actions: ' '
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user