i18n: add more languages

This commit is contained in:
Xylight committed 2024-08-10 20:18:07 -07:00
1 parent ca5bcf2c7d
commit 6c33724434
2 files changed
+18 -2

No files matched your search

@@ -23,6 +23,7 @@
import { fly } from 'svelte/transition'
import { backOut } from 'svelte/easing'
import { t } from '$lib/translations'
import { errorMessage } from '$lib/lemmy/error'
export let post: Post
export let vote: number = 0
@@ -42,7 +43,10 @@
loading = true
oldScore = score
vote = newVote
const res = await voteItem(post, newVote, $profile.jwt)
const res = await voteItem(post, newVote, $profile.jwt).catch((e) => {
toast({ content: errorMessage(e), type: 'error' })
return { upvotes: 0, downvotes: 0, score: 0 }
})
;({ upvotes, downvotes, score } = res)
loading = false
}