i18n implemented

This commit is contained in:
2026-10-03 23:45:04 +02:00
parent 2ccea34bb9
commit d95ed40053
55 changed files with 2952 additions and 301 deletions
+3 -2
View File
@@ -5,6 +5,7 @@ import type { LiveComment } from '@/composables/useLiveComments'
import type { AppNotification } from '@/composables/useNotifications'
export default defineNuxtPlugin(() => {
const { $i18n } = useNuxtApp()
const { user } = useAuth()
const { fetchAll, addLive, reset } = useNotifications()
const { pushLive } = useLiveComments()
@@ -39,11 +40,11 @@ export default defineNuxtPlugin(() => {
else if (message.type === 'notification') {
const n = message.notification as AppNotification
addLive(n, typeof message.unreadCount === 'number' ? message.unreadCount : undefined)
toast(n.isMention ? `${n.actorName} hat dich erwähnt` : `${n.actorName} hat in einem abonnierten Thread kommentiert`, {
toast($i18n.t(n.isMention ? 'notifications.toastMentioned' : 'notifications.toastCommented', { name: n.actorName }), {
id: `notification-${n.uploadId}`,
description: n.content?.slice(0, 80) || undefined,
action: {
label: 'Ansehen',
label: $i18n.t('notifications.view'),
onClick: () => navigateTo(`/thread/${n.uploadId}#comment-${n.commentId}`),
},
})