chore: added i18n to auth pages
This commit is contained in:
parent
69af2d0b4b
commit
1aba8792ec
10 changed files with 196 additions and 59 deletions
|
|
@ -22,4 +22,74 @@
|
|||
'welcome_trial' => 'Welcome to TryPost! Your trial has started.',
|
||||
],
|
||||
|
||||
'login' => [
|
||||
'title' => 'Log in to your account',
|
||||
'description' => 'Enter your email and password below to log in',
|
||||
'page_title' => 'Log in',
|
||||
'email' => 'Email address',
|
||||
'password' => 'Password',
|
||||
'forgot_password' => 'Forgot password?',
|
||||
'remember_me' => 'Remember me',
|
||||
'submit' => 'Log in',
|
||||
'no_account' => "Don't have an account?",
|
||||
'sign_up' => 'Sign up',
|
||||
],
|
||||
|
||||
'register' => [
|
||||
'title' => 'Create an account',
|
||||
'description' => 'Enter your details below to create your account',
|
||||
'page_title' => 'Register',
|
||||
'name' => 'Name',
|
||||
'name_placeholder' => 'Full name',
|
||||
'email' => 'Email address',
|
||||
'password' => 'Password',
|
||||
'submit' => 'Create account',
|
||||
'has_account' => 'Already have an account?',
|
||||
'log_in' => 'Log in',
|
||||
],
|
||||
|
||||
'forgot_password' => [
|
||||
'title' => 'Forgot password',
|
||||
'description' => 'Enter your email to receive a password reset link',
|
||||
'page_title' => 'Forgot password',
|
||||
'email' => 'Email address',
|
||||
'submit' => 'Email password reset link',
|
||||
'return_to' => 'Or, return to',
|
||||
'log_in' => 'log in',
|
||||
],
|
||||
|
||||
'reset_password' => [
|
||||
'title' => 'Reset password',
|
||||
'description' => 'Please enter your new password below',
|
||||
'page_title' => 'Reset password',
|
||||
'email' => 'Email',
|
||||
'password' => 'Password',
|
||||
'confirm_password' => 'Confirm Password',
|
||||
'confirm_placeholder' => 'Confirm password',
|
||||
'submit' => 'Reset password',
|
||||
],
|
||||
|
||||
'verify_email' => [
|
||||
'title' => 'Verify email',
|
||||
'description' => 'Please verify your email address by clicking on the link we just emailed to you.',
|
||||
'page_title' => 'Email verification',
|
||||
'link_sent' => 'A new verification link has been sent to the email address you provided during registration.',
|
||||
'resend' => 'Resend verification email',
|
||||
'log_out' => 'Log out',
|
||||
],
|
||||
|
||||
'accept_invite' => [
|
||||
'page_title' => 'Accept Invite',
|
||||
'title' => "You've been invited!",
|
||||
'description' => "You've been invited to join the :workspace workspace.",
|
||||
'workspace' => 'Workspace',
|
||||
'your_role' => 'Your role',
|
||||
'email' => 'Email',
|
||||
'accept' => 'Accept Invite',
|
||||
'decline' => 'Decline Invite',
|
||||
'login_prompt' => 'Log in or create an account to accept this invite.',
|
||||
'log_in' => 'Log in',
|
||||
'create_account' => 'Create Account',
|
||||
],
|
||||
|
||||
];
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -22,4 +22,74 @@
|
|||
'welcome_trial' => 'Bem-vindo ao TryPost! Seu período de teste começou.',
|
||||
],
|
||||
|
||||
'login' => [
|
||||
'title' => 'Entrar na sua conta',
|
||||
'description' => 'Digite seu email e senha abaixo para entrar',
|
||||
'page_title' => 'Entrar',
|
||||
'email' => 'Endereço de email',
|
||||
'password' => 'Senha',
|
||||
'forgot_password' => 'Esqueceu a senha?',
|
||||
'remember_me' => 'Lembrar de mim',
|
||||
'submit' => 'Entrar',
|
||||
'no_account' => 'Não tem uma conta?',
|
||||
'sign_up' => 'Cadastre-se',
|
||||
],
|
||||
|
||||
'register' => [
|
||||
'title' => 'Criar uma conta',
|
||||
'description' => 'Digite seus dados abaixo para criar sua conta',
|
||||
'page_title' => 'Cadastro',
|
||||
'name' => 'Nome',
|
||||
'name_placeholder' => 'Nome completo',
|
||||
'email' => 'Endereço de email',
|
||||
'password' => 'Senha',
|
||||
'submit' => 'Criar conta',
|
||||
'has_account' => 'Já tem uma conta?',
|
||||
'log_in' => 'Entrar',
|
||||
],
|
||||
|
||||
'forgot_password' => [
|
||||
'title' => 'Esqueceu a senha',
|
||||
'description' => 'Digite seu email para receber um link de redefinição de senha',
|
||||
'page_title' => 'Esqueceu a senha',
|
||||
'email' => 'Endereço de email',
|
||||
'submit' => 'Enviar link de redefinição',
|
||||
'return_to' => 'Ou, volte para',
|
||||
'log_in' => 'entrar',
|
||||
],
|
||||
|
||||
'reset_password' => [
|
||||
'title' => 'Redefinir senha',
|
||||
'description' => 'Por favor, digite sua nova senha abaixo',
|
||||
'page_title' => 'Redefinir senha',
|
||||
'email' => 'Email',
|
||||
'password' => 'Senha',
|
||||
'confirm_password' => 'Confirmar Senha',
|
||||
'confirm_placeholder' => 'Confirmar senha',
|
||||
'submit' => 'Redefinir senha',
|
||||
],
|
||||
|
||||
'verify_email' => [
|
||||
'title' => 'Verificar email',
|
||||
'description' => 'Por favor, verifique seu endereço de email clicando no link que acabamos de enviar.',
|
||||
'page_title' => 'Verificação de email',
|
||||
'link_sent' => 'Um novo link de verificação foi enviado para o endereço de email que você forneceu durante o cadastro.',
|
||||
'resend' => 'Reenviar email de verificação',
|
||||
'log_out' => 'Sair',
|
||||
],
|
||||
|
||||
'accept_invite' => [
|
||||
'page_title' => 'Aceitar Convite',
|
||||
'title' => 'Você foi convidado!',
|
||||
'description' => 'Você foi convidado para participar do workspace :workspace.',
|
||||
'workspace' => 'Workspace',
|
||||
'your_role' => 'Seu cargo',
|
||||
'email' => 'Email',
|
||||
'accept' => 'Aceitar Convite',
|
||||
'decline' => 'Recusar Convite',
|
||||
'login_prompt' => 'Entre ou crie uma conta para aceitar este convite.',
|
||||
'log_in' => 'Entrar',
|
||||
'create_account' => 'Criar Conta',
|
||||
],
|
||||
|
||||
];
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ const inviteUrl = computed(() => `/invites/${props.invite.id}`);
|
|||
<template>
|
||||
<div class="flex min-h-svh flex-col items-center justify-center gap-6 bg-background p-6 md:p-10">
|
||||
|
||||
<Head title="Accept Invite" />
|
||||
<Head :title="$t('auth.accept_invite.page_title')" />
|
||||
|
||||
<div class="w-full max-w-md">
|
||||
<div class="flex flex-col gap-8">
|
||||
|
|
@ -46,25 +46,23 @@ const inviteUrl = computed(() => `/invites/${props.invite.id}`);
|
|||
|
||||
<Card>
|
||||
<CardHeader class="text-center">
|
||||
<CardTitle class="text-xl">You've been invited!</CardTitle>
|
||||
<CardTitle class="text-xl">{{ $t('auth.accept_invite.title') }}</CardTitle>
|
||||
<CardDescription>
|
||||
You've been invited to join the
|
||||
<span class="font-medium text-foreground">{{ invite.workspace.name }}</span>
|
||||
workspace.
|
||||
{{ $t('auth.accept_invite.description', { workspace: invite.workspace.name }) }}
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent class="space-y-6">
|
||||
<div class="rounded-lg bg-muted p-4 space-y-2">
|
||||
<div class="flex justify-between text-sm">
|
||||
<span class="text-muted-foreground">Workspace</span>
|
||||
<span class="text-muted-foreground">{{ $t('auth.accept_invite.workspace') }}</span>
|
||||
<span class="font-medium">{{ invite.workspace.name }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between text-sm">
|
||||
<span class="text-muted-foreground">Your role</span>
|
||||
<span class="text-muted-foreground">{{ $t('auth.accept_invite.your_role') }}</span>
|
||||
<span class="font-medium">{{ invite.role.label }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between text-sm">
|
||||
<span class="text-muted-foreground">Email</span>
|
||||
<span class="text-muted-foreground">{{ $t('auth.accept_invite.email') }}</span>
|
||||
<span class="font-medium">{{ invite.email }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -73,12 +71,12 @@ const inviteUrl = computed(() => `/invites/${props.invite.id}`);
|
|||
<div v-if="isLoggedIn" class="flex flex-col gap-3">
|
||||
<Button as-child size="lg" class="w-full">
|
||||
<Link :href="accept.url(invite.id)" method="post">
|
||||
Accept Invite
|
||||
{{ $t('auth.accept_invite.accept') }}
|
||||
</Link>
|
||||
</Button>
|
||||
<Button as-child variant="outline" size="lg" class="w-full">
|
||||
<Link :href="decline.url(invite.id)" method="post">
|
||||
Decline Invite
|
||||
{{ $t('auth.accept_invite.decline') }}
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
|
|
@ -86,16 +84,16 @@ const inviteUrl = computed(() => `/invites/${props.invite.id}`);
|
|||
<!-- User is not logged in - show Login/Register -->
|
||||
<div v-else class="flex flex-col gap-3">
|
||||
<p class="text-center text-sm text-muted-foreground">
|
||||
Log in or create an account to accept this invite.
|
||||
{{ $t('auth.accept_invite.login_prompt') }}
|
||||
</p>
|
||||
<Button as-child size="lg" class="w-full">
|
||||
<Link :href="login({ query: { redirect: inviteUrl } })">
|
||||
Log in
|
||||
{{ $t('auth.accept_invite.log_in') }}
|
||||
</Link>
|
||||
</Button>
|
||||
<Button as-child variant="outline" size="lg" class="w-full">
|
||||
<Link :href="register({ query: { redirect: inviteUrl } })">
|
||||
Create Account
|
||||
{{ $t('auth.accept_invite.create_account') }}
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ defineProps<{
|
|||
|
||||
<template>
|
||||
<AuthLayout
|
||||
title="Forgot password"
|
||||
description="Enter your email to receive a password reset link"
|
||||
:title="$t('auth.forgot_password.title')"
|
||||
:description="$t('auth.forgot_password.description')"
|
||||
>
|
||||
<Head title="Forgot password" />
|
||||
<Head :title="$t('auth.forgot_password.page_title')" />
|
||||
|
||||
<div
|
||||
v-if="status"
|
||||
|
|
@ -33,7 +33,7 @@ defineProps<{
|
|||
<div class="space-y-6">
|
||||
<Form v-bind="email.form()" v-slot="{ errors, processing }">
|
||||
<div class="grid gap-2">
|
||||
<Label for="email">Email address</Label>
|
||||
<Label for="email">{{ $t('auth.forgot_password.email') }}</Label>
|
||||
<Input
|
||||
id="email"
|
||||
type="email"
|
||||
|
|
@ -52,14 +52,14 @@ defineProps<{
|
|||
data-test="email-password-reset-link-button"
|
||||
>
|
||||
<Spinner v-if="processing" />
|
||||
Email password reset link
|
||||
{{ $t('auth.forgot_password.submit') }}
|
||||
</Button>
|
||||
</div>
|
||||
</Form>
|
||||
|
||||
<div class="space-x-1 text-center text-sm text-muted-foreground">
|
||||
<span>Or, return to</span>
|
||||
<TextLink :href="login()">log in</TextLink>
|
||||
<span>{{ $t('auth.forgot_password.return_to') }}</span>
|
||||
<TextLink :href="login()">{{ $t('auth.forgot_password.log_in') }}</TextLink>
|
||||
</div>
|
||||
</div>
|
||||
</AuthLayout>
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ defineProps<{
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<AuthBase title="Log in to your account" description="Enter your email and password below to log in">
|
||||
<AuthBase :title="$t('auth.login.title')" :description="$t('auth.login.description')">
|
||||
|
||||
<Head title="Log in" />
|
||||
<Head :title="$t('auth.login.page_title')" />
|
||||
|
||||
<div v-if="status" class="mb-4 text-center text-sm font-medium text-green-600">
|
||||
{{ status }}
|
||||
|
|
@ -34,7 +34,7 @@ defineProps<{
|
|||
<input v-if="redirect" type="hidden" name="redirect" :value="redirect" />
|
||||
<div class="grid gap-6">
|
||||
<div class="grid gap-2">
|
||||
<Label for="email">Email address</Label>
|
||||
<Label for="email">{{ $t('auth.login.email') }}</Label>
|
||||
<Input id="email" type="email" name="email" required autofocus :tabindex="1" autocomplete="email"
|
||||
placeholder="email@example.com" :default-value="email ?? ''" />
|
||||
<InputError :message="errors.email" />
|
||||
|
|
@ -42,32 +42,32 @@ defineProps<{
|
|||
|
||||
<div class="grid gap-2">
|
||||
<div class="flex items-center justify-between">
|
||||
<Label for="password">Password</Label>
|
||||
<Label for="password">{{ $t('auth.login.password') }}</Label>
|
||||
<TextLink :href="request()" class="text-sm" :tabindex="5">
|
||||
Forgot password?
|
||||
{{ $t('auth.login.forgot_password') }}
|
||||
</TextLink>
|
||||
</div>
|
||||
<Input id="password" type="password" name="password" required :tabindex="2"
|
||||
autocomplete="current-password" placeholder="Password" />
|
||||
autocomplete="current-password" :placeholder="$t('auth.login.password')" />
|
||||
<InputError :message="errors.password" />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between">
|
||||
<Label for="remember" class="flex items-center space-x-3">
|
||||
<Checkbox id="remember" name="remember" :tabindex="3" />
|
||||
<span>Remember me</span>
|
||||
<span>{{ $t('auth.login.remember_me') }}</span>
|
||||
</Label>
|
||||
</div>
|
||||
|
||||
<Button type="submit" class="mt-4 w-full" :tabindex="4" :disabled="processing" data-test="login-button">
|
||||
<Spinner v-if="processing" />
|
||||
Log in
|
||||
{{ $t('auth.login.submit') }}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div class="text-center text-sm text-muted-foreground">
|
||||
Don't have an account?
|
||||
<TextLink :href="register()" :tabindex="5">Sign up</TextLink>
|
||||
{{ $t('auth.login.no_account') }}
|
||||
<TextLink :href="register()" :tabindex="5">{{ $t('auth.login.sign_up') }}</TextLink>
|
||||
</div>
|
||||
</Form>
|
||||
</AuthBase>
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|||
|
||||
<template>
|
||||
<AuthBase
|
||||
title="Create an account"
|
||||
description="Enter your details below to create your account"
|
||||
:title="$t('auth.register.title')"
|
||||
:description="$t('auth.register.description')"
|
||||
>
|
||||
<Head title="Register" />
|
||||
<Head :title="$t('auth.register.page_title')" />
|
||||
|
||||
<Form
|
||||
v-bind="store.form()"
|
||||
|
|
@ -37,7 +37,7 @@ const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|||
<input type="hidden" name="timezone" :value="timezone" />
|
||||
<div class="grid gap-6">
|
||||
<div class="grid gap-2">
|
||||
<Label for="name">Name</Label>
|
||||
<Label for="name">{{ $t('auth.register.name') }}</Label>
|
||||
<Input
|
||||
id="name"
|
||||
type="text"
|
||||
|
|
@ -46,13 +46,13 @@ const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|||
:tabindex="1"
|
||||
autocomplete="name"
|
||||
name="name"
|
||||
placeholder="Full name"
|
||||
:placeholder="$t('auth.register.name_placeholder')"
|
||||
/>
|
||||
<InputError :message="errors.name" />
|
||||
</div>
|
||||
|
||||
<div class="grid gap-2">
|
||||
<Label for="email">Email address</Label>
|
||||
<Label for="email">{{ $t('auth.register.email') }}</Label>
|
||||
<Input
|
||||
id="email"
|
||||
type="email"
|
||||
|
|
@ -67,7 +67,7 @@ const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|||
</div>
|
||||
|
||||
<div class="grid gap-2">
|
||||
<Label for="password">Password</Label>
|
||||
<Label for="password">{{ $t('auth.register.password') }}</Label>
|
||||
<Input
|
||||
id="password"
|
||||
type="password"
|
||||
|
|
@ -75,7 +75,7 @@ const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|||
:tabindex="3"
|
||||
autocomplete="new-password"
|
||||
name="password"
|
||||
placeholder="Password"
|
||||
:placeholder="$t('auth.register.password')"
|
||||
/>
|
||||
<InputError :message="errors.password" />
|
||||
</div>
|
||||
|
|
@ -88,17 +88,17 @@ const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|||
data-test="register-user-button"
|
||||
>
|
||||
<Spinner v-if="processing" />
|
||||
Create account
|
||||
{{ $t('auth.register.submit') }}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div class="text-center text-sm text-muted-foreground">
|
||||
Already have an account?
|
||||
{{ $t('auth.register.has_account') }}
|
||||
<TextLink
|
||||
:href="login()"
|
||||
class="underline underline-offset-4"
|
||||
:tabindex="5"
|
||||
>Log in</TextLink
|
||||
>{{ $t('auth.register.log_in') }}</TextLink
|
||||
>
|
||||
</div>
|
||||
</Form>
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ const inputEmail = ref(props.email);
|
|||
|
||||
<template>
|
||||
<AuthLayout
|
||||
title="Reset password"
|
||||
description="Please enter your new password below"
|
||||
:title="$t('auth.reset_password.title')"
|
||||
:description="$t('auth.reset_password.description')"
|
||||
>
|
||||
<Head title="Reset password" />
|
||||
<Head :title="$t('auth.reset_password.page_title')" />
|
||||
|
||||
<Form
|
||||
v-bind="store.form()"
|
||||
|
|
@ -33,7 +33,7 @@ const inputEmail = ref(props.email);
|
|||
>
|
||||
<div class="grid gap-6">
|
||||
<div class="grid gap-2">
|
||||
<Label for="email">Email</Label>
|
||||
<Label for="email">{{ $t('auth.reset_password.email') }}</Label>
|
||||
<Input
|
||||
id="email"
|
||||
type="email"
|
||||
|
|
@ -47,7 +47,7 @@ const inputEmail = ref(props.email);
|
|||
</div>
|
||||
|
||||
<div class="grid gap-2">
|
||||
<Label for="password">Password</Label>
|
||||
<Label for="password">{{ $t('auth.reset_password.password') }}</Label>
|
||||
<Input
|
||||
id="password"
|
||||
type="password"
|
||||
|
|
@ -55,14 +55,14 @@ const inputEmail = ref(props.email);
|
|||
autocomplete="new-password"
|
||||
class="mt-1 block w-full"
|
||||
autofocus
|
||||
placeholder="Password"
|
||||
:placeholder="$t('auth.reset_password.password')"
|
||||
/>
|
||||
<InputError :message="errors.password" />
|
||||
</div>
|
||||
|
||||
<div class="grid gap-2">
|
||||
<Label for="password_confirmation">
|
||||
Confirm Password
|
||||
{{ $t('auth.reset_password.confirm_password') }}
|
||||
</Label>
|
||||
<Input
|
||||
id="password_confirmation"
|
||||
|
|
@ -70,7 +70,7 @@ const inputEmail = ref(props.email);
|
|||
name="password_confirmation"
|
||||
autocomplete="new-password"
|
||||
class="mt-1 block w-full"
|
||||
placeholder="Confirm password"
|
||||
:placeholder="$t('auth.reset_password.confirm_placeholder')"
|
||||
/>
|
||||
<InputError :message="errors.password_confirmation" />
|
||||
</div>
|
||||
|
|
@ -82,7 +82,7 @@ const inputEmail = ref(props.email);
|
|||
data-test="reset-password-button"
|
||||
>
|
||||
<Spinner v-if="processing" />
|
||||
Reset password
|
||||
{{ $t('auth.reset_password.submit') }}
|
||||
</Button>
|
||||
</div>
|
||||
</Form>
|
||||
|
|
|
|||
|
|
@ -15,17 +15,16 @@ defineProps<{
|
|||
|
||||
<template>
|
||||
<AuthLayout
|
||||
title="Verify email"
|
||||
description="Please verify your email address by clicking on the link we just emailed to you."
|
||||
:title="$t('auth.verify_email.title')"
|
||||
:description="$t('auth.verify_email.description')"
|
||||
>
|
||||
<Head title="Email verification" />
|
||||
<Head :title="$t('auth.verify_email.page_title')" />
|
||||
|
||||
<div
|
||||
v-if="status === 'verification-link-sent'"
|
||||
class="mb-4 text-center text-sm font-medium text-green-600"
|
||||
>
|
||||
A new verification link has been sent to the email address you
|
||||
provided during registration.
|
||||
{{ $t('auth.verify_email.link_sent') }}
|
||||
</div>
|
||||
|
||||
<Form
|
||||
|
|
@ -35,7 +34,7 @@ defineProps<{
|
|||
>
|
||||
<Button :disabled="processing" variant="secondary">
|
||||
<Spinner v-if="processing" />
|
||||
Resend verification email
|
||||
{{ $t('auth.verify_email.resend') }}
|
||||
</Button>
|
||||
|
||||
<TextLink
|
||||
|
|
@ -43,7 +42,7 @@ defineProps<{
|
|||
as="button"
|
||||
class="mx-auto block text-sm"
|
||||
>
|
||||
Log out
|
||||
{{ $t('auth.verify_email.log_out') }}
|
||||
</TextLink>
|
||||
</Form>
|
||||
</AuthLayout>
|
||||
|
|
|
|||
Loading…
Reference in a new issue