i18n: localize account pages
This commit is contained in:
1 parent
53d4e4bfa3
commit
9998042795
5 files changed
+35
-33
No files matched your search
+13
-1
@@ -171,7 +171,10 @@
|
|||||||
},
|
},
|
||||||
"modlog": "Modlog",
|
"modlog": "Modlog",
|
||||||
"instances": "Instances",
|
"instances": "Instances",
|
||||||
"legal": "Legal",
|
"legal": {
|
||||||
|
"title": "Legal",
|
||||||
|
"noLegal": "This instance does not have any legal information."
|
||||||
|
},
|
||||||
"profile": {
|
"profile": {
|
||||||
"user": "User",
|
"user": "User",
|
||||||
"settings": "Settings",
|
"settings": "Settings",
|
||||||
@@ -229,6 +232,15 @@
|
|||||||
"verifyEmail": {
|
"verifyEmail": {
|
||||||
"message": "Your email was verified. You can now close this window.",
|
"message": "Your email was verified. You can now close this window.",
|
||||||
"error": "Failed to verify your email."
|
"error": "Failed to verify your email."
|
||||||
|
},
|
||||||
|
"passwordChange": {
|
||||||
|
"title": "Change Password",
|
||||||
|
"description": "Choose your new password.",
|
||||||
|
"instance": "Which instance is your account hosted on?"
|
||||||
|
},
|
||||||
|
"resetLogin": {
|
||||||
|
"title": "Reset Password",
|
||||||
|
"description": "Enter your account's email, and a password reset link will be sent. If your account does not have an email, contact your instance admins."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cards": {
|
"cards": {
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import SiteCard from '$lib/components/lemmy/SiteCard.svelte'
|
import SiteCard from '$lib/components/lemmy/SiteCard.svelte'
|
||||||
import Markdown from '$lib/components/markdown/Markdown.svelte'
|
import Markdown from '$lib/components/markdown/Markdown.svelte'
|
||||||
|
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||||
import { site } from '$lib/lemmy'
|
import { site } from '$lib/lemmy'
|
||||||
|
import { t } from '$lib/translations'
|
||||||
import { Button, Modal, Spinner } from 'mono-svelte'
|
import { Button, Modal, Spinner } from 'mono-svelte'
|
||||||
|
|
||||||
let siteOpen: boolean = false
|
let siteOpen: boolean = false
|
||||||
@@ -9,23 +11,11 @@
|
|||||||
|
|
||||||
<div class="flex flex-row w-full">
|
<div class="flex flex-row w-full">
|
||||||
{#if $site}
|
{#if $site}
|
||||||
<Modal bind:open={siteOpen}>
|
|
||||||
<SiteCard
|
|
||||||
site={$site.site_view}
|
|
||||||
admins={$site.admins}
|
|
||||||
taglines={$site.taglines}
|
|
||||||
/>
|
|
||||||
</Modal>
|
|
||||||
|
|
||||||
<div class="flex flex-col flex-1 gap-4">
|
<div class="flex flex-col flex-1 gap-4">
|
||||||
<h1 class="font-bold text-2xl w-full flex items-center justify-between">
|
<Header>{$t('routes.legal.title')}</Header>
|
||||||
Legal <span class="lg:hidden">
|
|
||||||
<Button on:click={() => (siteOpen = !siteOpen)}>Site</Button>
|
|
||||||
</span>
|
|
||||||
</h1>
|
|
||||||
<Markdown
|
<Markdown
|
||||||
source={$site.site_view.local_site.legal_information ??
|
source={$site.site_view.local_site.legal_information ??
|
||||||
'This instance does not have any legal information.'}
|
$t('routes.legal.noLegal')}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
instance as currentInstance,
|
instance as currentInstance,
|
||||||
} from '$lib/instance.js'
|
} from '$lib/instance.js'
|
||||||
import { getClient, validateInstance } from '$lib/lemmy.js'
|
import { getClient, validateInstance } from '$lib/lemmy.js'
|
||||||
|
import { t } from '$lib/translations'
|
||||||
import { Button, TextInput, toast } from 'mono-svelte'
|
import { Button, TextInput, toast } from 'mono-svelte'
|
||||||
|
|
||||||
let instance = LINKED_INSTANCE_URL || $currentInstance || ''
|
let instance = LINKED_INSTANCE_URL || $currentInstance || ''
|
||||||
@@ -36,29 +37,28 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="my-auto max-w-xl mx-auto flex flex-col gap-2">
|
<div class="my-auto max-w-xl mx-auto flex flex-col gap-2">
|
||||||
<h1 class="font-bold text-3xl">Reset Password</h1>
|
<h1 class="font-bold text-3xl">{$t('routes.resetLogin.title')}</h1>
|
||||||
<p>
|
<p>
|
||||||
Enter the email of your account, and a password reset link will be sent. If
|
{$t('routes.resetLogin.description')}
|
||||||
you did not have an email set up, contact your instance admins.
|
|
||||||
</p>
|
</p>
|
||||||
<form class="mt-2 flex flex-col gap-4" on:submit|preventDefault={submit}>
|
<form class="mt-2 flex flex-col gap-4" on:submit|preventDefault={submit}>
|
||||||
{#if !LINKED_INSTANCE_URL}
|
{#if !LINKED_INSTANCE_URL}
|
||||||
<TextInput
|
<TextInput
|
||||||
bind:value={instance}
|
bind:value={instance}
|
||||||
label="Instance URL"
|
label={$t('form.instance')}
|
||||||
placeholder={DEFAULT_INSTANCE_URL}
|
placeholder={DEFAULT_INSTANCE_URL}
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
<TextInput
|
<TextInput
|
||||||
bind:value={email}
|
bind:value={email}
|
||||||
label="Email"
|
label={$t('form.email')}
|
||||||
type="email"
|
type="email"
|
||||||
required
|
required
|
||||||
placeholder="example@example.com"
|
placeholder="example@example.com"
|
||||||
/>
|
/>
|
||||||
<Button color="primary" size="lg" {loading} disabled={loading} submit>
|
<Button color="primary" size="lg" {loading} disabled={loading} submit>
|
||||||
Submit
|
{$t('form.submit')}
|
||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { page } from '$app/stores'
|
import { page } from '$app/stores'
|
||||||
|
import { t } from '$lib/translations'
|
||||||
import { XMark, Icon } from 'svelte-hero-icons'
|
import { XMark, Icon } from 'svelte-hero-icons'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -9,9 +10,8 @@
|
|||||||
>
|
>
|
||||||
<Icon src={XMark} size="32" mini />
|
<Icon src={XMark} size="32" mini />
|
||||||
</div>
|
</div>
|
||||||
<h1 class="text-red-800 dark:text-red-300 text-2xl font-semibold">Error</h1>
|
<h1 class="text-red-800 dark:text-red-300 text-2xl font-semibold">
|
||||||
<p class="text-red-800 dark:text-red-300">
|
{$t('message.error')}
|
||||||
That password reset token doesn't exist.
|
</h1>
|
||||||
</p>
|
|
||||||
<code>{$page.error?.message}</code>
|
<code>{$page.error?.message}</code>
|
||||||
</div>
|
</div>
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
instance as currentInstance,
|
instance as currentInstance,
|
||||||
} from '$lib/instance.js'
|
} from '$lib/instance.js'
|
||||||
import { getClient, validateInstance } from '$lib/lemmy.js'
|
import { getClient, validateInstance } from '$lib/lemmy.js'
|
||||||
|
import { t } from '$lib/translations'
|
||||||
import { Button, TextInput, toast } from 'mono-svelte'
|
import { Button, TextInput, toast } from 'mono-svelte'
|
||||||
|
|
||||||
export let data: {
|
export let data: {
|
||||||
@@ -46,38 +47,37 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="my-auto max-w-xl mx-auto flex flex-col gap-2">
|
<div class="my-auto max-w-xl mx-auto flex flex-col gap-2">
|
||||||
<h1 class="font-bold text-3xl">Reset Password</h1>
|
<h1 class="font-bold text-3xl">{$t('routes.passwordChange.title')}</h1>
|
||||||
<p>
|
<p>
|
||||||
You've clicked an email with the password reset link in it. Now, choose your
|
{$t('routes.passwordChange.description')}
|
||||||
new password.
|
|
||||||
</p>
|
</p>
|
||||||
<form class="mt-2 flex flex-col gap-4" on:submit|preventDefault={submit}>
|
<form class="mt-2 flex flex-col gap-4" on:submit|preventDefault={submit}>
|
||||||
{#if !LINKED_INSTANCE_URL}
|
{#if !LINKED_INSTANCE_URL}
|
||||||
<TextInput
|
<TextInput
|
||||||
bind:value={instance}
|
bind:value={instance}
|
||||||
label="Instance URL"
|
label={$t('form.password')}
|
||||||
placeholder={DEFAULT_INSTANCE_URL}
|
placeholder={DEFAULT_INSTANCE_URL}
|
||||||
required
|
required
|
||||||
>
|
>
|
||||||
<span class="font-normal text-xs">
|
<span class="font-normal text-xs">
|
||||||
What instance did you reset your password for?
|
{$t('routes.passwordChange.instance')}
|
||||||
</span>
|
</span>
|
||||||
</TextInput>
|
</TextInput>
|
||||||
{/if}
|
{/if}
|
||||||
<TextInput
|
<TextInput
|
||||||
bind:value={password}
|
bind:value={password}
|
||||||
label="New Password"
|
label={$t('form.profile.newPassword')}
|
||||||
type="password"
|
type="password"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
bind:value={password_verify}
|
bind:value={password_verify}
|
||||||
label="New Password (Verify)"
|
label={$t('form.profile.verifyNewPassword')}
|
||||||
type="password"
|
type="password"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<Button color="primary" size="lg" {loading} disabled={loading} submit>
|
<Button color="primary" size="lg" {loading} disabled={loading} submit>
|
||||||
Submit
|
{$t('form.submit')}
|
||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
Reference in new issue
Block a user