i18n: localize toasts
This commit is contained in:
1 parent
b57baa3769
commit
e89d2aaddb
35 files changed
+169
-177
No files matched your search
@@ -3,8 +3,10 @@
|
||||
import UserLink from '$lib/components/lemmy/user/UserLink.svelte'
|
||||
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import { t } from '$lib/translations'
|
||||
import type { Person } from 'lemmy-js-client'
|
||||
import { Button, Modal, toast } from 'mono-svelte'
|
||||
import { Icon, PaperAirplane } from 'svelte-hero-icons'
|
||||
|
||||
export let open: boolean = false
|
||||
export let user: Person
|
||||
@@ -25,7 +27,7 @@
|
||||
})
|
||||
|
||||
toast({
|
||||
content: 'Successfully sent that person a message.',
|
||||
content: $t('toast.sentMessage'),
|
||||
type: 'success',
|
||||
})
|
||||
|
||||
@@ -45,16 +47,16 @@
|
||||
<h1 class="text-2xl font-bold" slot="title">Message</h1>
|
||||
<form on:submit|preventDefault={sendMessage} class="flex flex-col gap-4">
|
||||
<p class="inline-flex flex-row gap-2 items-center">
|
||||
Sending <UserLink avatar {user} /> a message
|
||||
<Icon src={PaperAirplane} size="16" mini />
|
||||
<UserLink avatar {user} />
|
||||
</p>
|
||||
<MarkdownEditor
|
||||
bind:value={message}
|
||||
label="Message"
|
||||
placeholder="your hair looks nice today"
|
||||
label={$t('content.message')}
|
||||
rows={4}
|
||||
/>
|
||||
<Button color="primary" size="lg" submit {loading} disabled={loading}>
|
||||
Send
|
||||
{$t('common.send')}
|
||||
</Button>
|
||||
</form>
|
||||
</Modal>
|
||||
Reference in new issue
Block a user