i18n: localize comment form

This commit is contained in:
Xylight committed 2024-06-03 16:41:45 -07:00
1 parent a421093a23
commit 2aaacf07a7
3 files changed
+10 -5

No files matched your search

@@ -8,6 +8,7 @@
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte' import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
import { placeholders } from '$lib/util.js' import { placeholders } from '$lib/util.js'
import { Button } from 'mono-svelte' import { Button } from 'mono-svelte'
import { t } from '$lib/translations'
export let postId: number export let postId: number
export let parentId: number | undefined = undefined export let parentId: number | undefined = undefined
@@ -69,7 +70,7 @@
{...$$restProps} {...$$restProps}
{rows} {rows}
placeholder={locked placeholder={locked
? 'This post is locked.' ? $t('comment.locked')
: placeholder ?? placeholders.get('comment')} : placeholder ?? placeholders.get('comment')}
bind:value bind:value
disabled={locked || loading} disabled={locked || loading}
@@ -92,7 +93,7 @@
{loading} {loading}
disabled={locked || loading} disabled={locked || loading}
> >
Submit {$t('form.submit')}
</Button> </Button>
</div> </div>
{/if} {/if}
@@ -2,6 +2,7 @@
import { profile } from '$lib/auth.js' import { profile } from '$lib/auth.js'
import MultiSelect from '$lib/components/input/Switch.svelte' import MultiSelect from '$lib/components/input/Switch.svelte'
import Markdown from '$lib/components/markdown/Markdown.svelte' import Markdown from '$lib/components/markdown/Markdown.svelte'
import { t } from '$lib/translations'
import { uploadImage } from '$lib/util.js' import { uploadImage } from '$lib/util.js'
import { ImageInput, toast } from 'mono-svelte' import { ImageInput, toast } from 'mono-svelte'
import { Button, Label, Modal, TextArea } from 'mono-svelte' import { Button, Label, Modal, TextArea } from 'mono-svelte'
@@ -317,7 +318,7 @@ overflow-hidden transition-colors"
<MultiSelect <MultiSelect
bind:selected={previewing} bind:selected={previewing}
options={[false, true]} options={[false, true]}
optionNames={['Edit', 'Preview']} optionNames={[$t('form.edit'), $t('form.preview')]}
/> />
{/if} {/if}
<slot /> <slot />
+5 -2
View File
@@ -98,7 +98,9 @@
"password": "Password", "password": "Password",
"2fa": "2FA Code", "2fa": "2FA Code",
"forgotpassword": "Forgot Password", "forgotpassword": "Forgot Password",
"submit": "Submit" "submit": "Submit",
"edit": "Edit",
"preview": "Preview"
}, },
"routes": { "routes": {
"frontpage": { "frontpage": {
@@ -182,7 +184,8 @@
"actions": { "actions": {
"label": "Actions", "label": "Actions",
"link": "Copy Link" "link": "Copy Link"
} },
"locked": "This post is locked."
}, },
"moderation": { "moderation": {
"report": "Report" "report": "Report"