i18n: localize toasts

This commit is contained in:
Xylight committed 2024-06-04 13:02:05 -07:00
1 parent b57baa3769
commit e89d2aaddb
35 files changed
+169 -177

No files matched your search

+3 -3
View File
@@ -70,7 +70,7 @@
}
toast({
content: `Successfully ${blocked ? 'unblocked' : 'blocked'} that user.`,
content: blocked ? $t('toast.unblockUser') : $t('toast.blockUser'),
type: 'success',
})
@@ -99,14 +99,14 @@
async function purgeUser() {
purgingUser = false
const purgeToast = toast({ content: 'Purging user...', loading: true })
const purgeToast = toast({ content: '', loading: true })
try {
await client().purgePerson({
person_id: data.person_view.person.id,
})
removeToast(purgeToast)
toast({ content: 'Purged that user.', type: 'success' })
toast({ content: $t('toast.purgeUser'), type: 'success' })
} catch (e) {
toast({ content: e as any, type: 'error' })
}