new locales

This commit is contained in:
Moriz Wahl 2023-03-15 16:35:30 +01:00
parent 10c02c251e
commit 60b9262d7a
3 changed files with 19 additions and 8 deletions

View File

@ -39,7 +39,9 @@
<ds-space margin-bottom="base">
<client-only>
<user-teaser
:user="notification.from.author"
:user="
isGroup(notification.from) ? notification.to : notification.from.author
"
:date-time="notification.from.createdAt"
:class="{ 'notification-status': notification.read }"
/>
@ -61,14 +63,18 @@
class="notification-mention-post"
:class="{ 'notification-status': notification.read }"
:to="{
name: 'post-id-slug',
name: isGroup(notification.from) ? 'group' : 'post-id-slug',
params: params(notification.from),
hash: hashParam(notification.from),
}"
@click.native="markNotificationAsRead(notification.from.id)"
>
<b>
{{ notification.from.title || notification.from.post.title | truncate(50) }}
{{
notification.from.title ||
notification.from.groupName ||
notification.from.post.title | truncate(50)
}}
</b>
</nuxt-link>
</base-card>
@ -132,11 +138,16 @@ export default {
isComment(notificationSource) {
return notificationSource.__typename === 'Comment'
},
isGroup(notificationSource) {
return notificationSource.__typename === 'Group'
},
params(notificationSource) {
const post = this.isComment(notificationSource) ? notificationSource.post : notificationSource
const target = this.isComment(notificationSource)
? notificationSource.post
: notificationSource
return {
id: post.id,
slug: post.slug,
id: target.id,
slug: target.slug,
}
},
hashParam(notificationSource) {

View File

@ -645,7 +645,7 @@
},
"markAllAsRead": "Markiere alle als gelesen",
"pageLink": "Alle Benachrichtigungen",
"post": "Beitrag",
"post": "Beitrag oder Gruppe",
"reason": {
"commented_on_post": "Hat Deinen Beitrag kommentiert …",
"mentioned_in_comment": "Hat Dich in einem Kommentar erwähnt …",

View File

@ -645,7 +645,7 @@
},
"markAllAsRead": "Mark all as read",
"pageLink": "All notifications",
"post": "Post",
"post": "Post or Group",
"reason": {
"commented_on_post": "Commented on your post …",
"mentioned_in_comment": "Mentioned you in a comment …",