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