i18n: localize signup

This commit is contained in:
Xylight committed 2024-06-03 18:04:14 -07:00
1 parent 96d4e5dd35
commit a785a529c8
4 files changed
+45 -22

No files matched your search

+18 -1
View File
@@ -103,6 +103,7 @@
"name": "Name",
"instance": "Instance URL",
"password": "Password",
"confirmPassword": "Confirm Password",
"2fa": "2FA Code",
"forgotpassword": "Forgot Password",
"submit": "Submit",
@@ -145,7 +146,23 @@
"warning": "This will delete ALL of your submissions."
}
},
"setup": "Setup"
"email": "Email",
"setup": "Setup",
"signup": {
"title": "Sign Up",
"description": "Choose an instance that interests you, or type the URL manually.",
"info": "An instance is the server that your account will be hosted on, but you can still access and interact with content from other instances.",
"chooseInstance": "Choose an instance",
"application": {
"label": "Application",
"info": "To join this instance, you must fill out this application, and wait to be accepted. You will receive an email if your application is accepted."
},
"closed": {
"title": "Registrations closed",
"description": "This instance has registrations closed. Find another instance.",
"anotherInstance": "Find another instance"
}
}
},
"routes": {
"frontpage": {
+1
View File
@@ -101,6 +101,7 @@
"submit": "Soumettre",
"edit": "Modifier",
"preview": "Aperçu",
"email": "Email",
"post": {
"create": "Créer une publication",
"edit": "Modifier la publication",
+7 -7
View File
@@ -21,6 +21,7 @@
import { Button, TextInput } from 'mono-svelte'
import { onMount } from 'svelte'
import Avatar from '$lib/components/ui/Avatar.svelte'
import { t } from '$lib/translations'
let selectedInstance: string = ''
let validating: boolean = false
@@ -78,15 +79,14 @@
</script>
<svelte:head>
<title>Sign up | Choose Instance</title>
<title>{$t('form.signup.title')}</title>
</svelte:head>
<div class="mx-auto max-w-xl flex flex-col gap-4 my-auto h-max w-full">
<h1 class="font-bold text-4xl">Sign Up</h1>
<p>Choose an instance that interests you, or type the URL manually.</p>
<h1 class="font-bold text-4xl">{$t('form.signup.title')}</h1>
<p>{$t('form.signup.description')}</p>
<p>
An instance is the server that your account will be hosted on, but you can
still access and interact with content from other instances.
{$t('form.signup.info')}
</p>
<Material color="distinct" class="h-64 overflow-auto">
<div
@@ -140,7 +140,7 @@
>
<TextInput
bind:value={selectedInstance}
label="Choose an instance"
label={$t('form.signup.chooseInstance')}
required
{placeholder}
on:input={() => {
@@ -154,7 +154,7 @@
loading={validating}
disabled={validating}
>
Go
{$t('form.submit')}
</Button>
</form>
</div>
+19 -14
View File
@@ -20,6 +20,8 @@
XCircle,
} from 'svelte-hero-icons'
import { instance as currentInstance } from '$lib/instance.js'
import Header from '$lib/components/ui/layout/pages/Header.svelte'
import { t } from '$lib/translations.js'
export let data
@@ -125,36 +127,39 @@
</span>
{#if data.site_view.local_site.registration_mode != 'Closed'}
<h1 class="font-bold text-3xl">Create account</h1>
<Header>{$t('form.signup.title')}</Header>
<TextInput
bind:value={email}
label="Email"
label={$t('form.email')}
required={data.site_view.local_site.require_email_verification}
type="email"
/>
<TextInput bind:value={username} label="Username" required />
<TextInput bind:value={username} label={$t('form.username')} required />
<TextInput
bind:value={password}
label="Password"
label={$t('form.password')}
required
type="password"
/>
<TextInput
bind:value={passwordVerify}
label="Confirm Password"
label={$t('form.confirmPassword')}
required
type="password"
/>
{#if data.site_view.local_site.registration_mode == 'RequireApplication'}
<Material class="dark:text-yellow-200 text-yellow-800 bg-yellow-500/20">
<Icon src={ExclamationTriangle} mini size="20" />
To join this instance, you must fill out this application, and wait to be
accepted. You will receive an email if your application is accepted.
{$t('form.signup.application.info')}
</Material>
{#if data.site_view.local_site.application_question}
<Markdown source={data.site_view.local_site.application_question} />
{/if}
<MarkdownEditor label="Application" required bind:value={application} />
<MarkdownEditor
label={$t('form.signup.application.label')}
required
bind:value={application}
/>
{/if}
{#if captchaRequired}
<div>
@@ -194,7 +199,7 @@
</div>
</div>
{/if}
<Checkbox bind:checked={nsfw}>Show NSFW content</Checkbox>
<Checkbox bind:checked={nsfw}>{$t('form.profile.showNSFW')}</Checkbox>
<input type="dn" name="honeypot" bind:value={honeypot} class="hidden" />
<Button
submit
@@ -204,17 +209,17 @@
disabled={submitting}
class="mt-auto"
>
Submit
{$t('form.submit')}
</Button>
{:else}
<div class="my-auto">
<Placeholder
icon={XCircle}
title="Registrations closed"
description="New account creation has been disabled on this instance."
title={$t('form.signup.closed.title')}
description={$t('form.signup.closed.description')}
>
<Button icon={Plus} href="https://join-lemmy.org">
Find another instance
<Button icon={Plus} href="/signup">
{$t('form.signup.closed.anotherInstance')}
</Button>
</Placeholder>
</div>