i18n: localize report modal
This commit is contained in:
1 parent
13437c825f
commit
f6d56ad38b
2 files changed
+10
-6
No files matched your search
@@ -8,6 +8,8 @@
|
|||||||
import { Button, Modal } from 'mono-svelte'
|
import { Button, Modal } from 'mono-svelte'
|
||||||
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||||
import { onMount } from 'svelte'
|
import { onMount } from 'svelte'
|
||||||
|
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||||
|
import { t } from '$lib/translations'
|
||||||
|
|
||||||
export let open: boolean
|
export let open: boolean
|
||||||
export let item: PostView | CommentView | undefined = undefined
|
export let item: PostView | CommentView | undefined = undefined
|
||||||
@@ -39,7 +41,7 @@
|
|||||||
}
|
}
|
||||||
open = false
|
open = false
|
||||||
toast({
|
toast({
|
||||||
content: 'That submission has been reported.',
|
content: $t('moderation.reportModal.success'),
|
||||||
type: 'success',
|
type: 'success',
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -59,10 +61,9 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Modal bind:open>
|
<Modal bind:open>
|
||||||
<h1 class="font-bold text-2xl" slot="title">Report</h1>
|
<Header slot="title">{$t('moderation.reportModal.title')}</Header>
|
||||||
<form class="flex flex-col gap-4" on:submit|preventDefault={report}>
|
<form class="flex flex-col gap-4" on:submit|preventDefault={report}>
|
||||||
{#if item}
|
{#if item}
|
||||||
<span>Reporting this submission</span>
|
|
||||||
<div class="pointer-events-none list-none">
|
<div class="pointer-events-none list-none">
|
||||||
{#if isComment(item)}
|
{#if isComment(item)}
|
||||||
<Comment
|
<Comment
|
||||||
@@ -83,12 +84,11 @@
|
|||||||
<MarkdownEditor
|
<MarkdownEditor
|
||||||
required
|
required
|
||||||
rows={4}
|
rows={4}
|
||||||
label="Reason"
|
label={$t('moderation.reason')}
|
||||||
placeholder="he's being a meanie :("
|
|
||||||
bind:value={reason}
|
bind:value={reason}
|
||||||
/>
|
/>
|
||||||
<Button submit {loading} disabled={loading} color="primary" size="lg">
|
<Button submit {loading} disabled={loading} color="primary" size="lg">
|
||||||
Submit
|
{$t('form.submit')}
|
||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -415,6 +415,10 @@
|
|||||||
"failEmptyReply": "Your reply cannot be empty if 'Reply with reason' is enabled.",
|
"failEmptyReply": "Your reply cannot be empty if 'Reply with reason' is enabled.",
|
||||||
"successPurge": "Successfully purged that submission."
|
"successPurge": "Successfully purged that submission."
|
||||||
},
|
},
|
||||||
|
"reportModal": {
|
||||||
|
"title": "Report",
|
||||||
|
"success": "Reported that submission."
|
||||||
|
},
|
||||||
"reason": "Reason",
|
"reason": "Reason",
|
||||||
"lock": "Lock",
|
"lock": "Lock",
|
||||||
"unlock": "Unlock",
|
"unlock": "Unlock",
|
||||||
|
|||||||
Reference in new issue
Block a user