forked from BRETT/BRETT
i18n implemented
This commit is contained in:
@@ -7,6 +7,7 @@ const props = defineProps<{ commentId: number }>()
|
||||
|
||||
const { user } = useAuth()
|
||||
const { reactionsFor, toggle } = useCommentReactions()
|
||||
const { t } = useI18n()
|
||||
|
||||
const busy = ref(false)
|
||||
const pending = ref<string | null>(null)
|
||||
@@ -21,7 +22,7 @@ const burstNonce = ref(0)
|
||||
|
||||
async function pick(emoji: string) {
|
||||
if (!user.value) {
|
||||
toast.error('Melde dich an, um zu reagieren.')
|
||||
toast.error(t('comments.loginToReact'))
|
||||
return
|
||||
}
|
||||
if (busy.value) return
|
||||
@@ -33,7 +34,7 @@ async function pick(emoji: string) {
|
||||
await toggle(props.commentId, emoji)
|
||||
}
|
||||
catch {
|
||||
toast.error('Reaktion fehlgeschlagen')
|
||||
toast.error(t('comments.reactionFailed'))
|
||||
}
|
||||
finally {
|
||||
busy.value = false
|
||||
|
||||
Reference in New Issue
Block a user