Skip to content

Commit

Permalink
feat: add EN translation for auth pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed Feb 28, 2024
1 parent 56a2830 commit 606a437
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 24 deletions.
17 changes: 16 additions & 1 deletion frontend/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -394,5 +394,20 @@
"riskAcceptanceRiskScenariosHelpText": "The risk scenarios that are accepted",
"attachmentHelpText": "File for evidence (eg. screenshot, log file, etc.)",
"attachmentWarningText": "WARNING: Uploading a new file will overwrite the existing one",
"isActiveHelpText": "Designates whether this user should be treated as active"
"isActiveHelpText": "Designates whether this user should be treated as active",
"helloThere": "Hello there 👋",
"thisIsCisoAssistant": "This is CISO Assistant.",
"yourStreamlined": "Your streamlined",
"oneStopShop": "one-stop shop",
"forComplianceRiskManagement": "for compliance and risk management.",
"youCanSetPAsswordHere": "You can set your password here",
"setPassword": "Set password",
"logIntoYourAccount": "Log into your account",
"youNeedToLogIn": "You need to login to access all the features",
"forgtPassword": "Forgot password",
"login": "Login",
"password": "Password",
"enterYourEmail": "Enter your email address below, and we'll email instructions for setting a new one",
"send": "Send",
"goBackToLogin": "Go back to login"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import { ResetPasswordSchema } from '$lib/utils/schemas';
import Typewriter from 'svelte-typewriter';
import * as m from '$paraglide/messages.js'
export let data: PageData;
</script>

Expand All @@ -19,15 +21,15 @@
<div id="hellothere" class="flex flex-col justify-center items-center w-3/5 text-gray-900">
<Typewriter mode="loopOnce" cursor={false} interval={50}>
<div class="text-2xl unstyled text-center pb-4">
<span class="text-2xl text-center">Hello there 👋</span>
<span> This is CISO Assistant. </span>
<span class="text-2xl text-center">{m.helloThere()} 👋</span>
<span> {m.thisIsCisoAssistant()}. </span>
</div>
</Typewriter>
<Typewriter mode="cascade" cursor={false} interval={45} delay={5000}>
<div class="text-2xl unstyled text-center">
<span> Your streamlined </span>
<span class="font-black"> one-stop shop </span>
<span> for compliance and risk management. </span>
<span> {m.yourStreamlined()} </span>
<span class="font-black"> {m.oneStopShop()} </span>
<span> {m.forComplianceRiskManagement()}. </span>
</div>
</Typewriter>
</div>
Expand All @@ -36,7 +38,7 @@
<i class="fa-solid fa-key" />
</div>
<p class="text-gray-600 text-sm text-center">
You can set your password here.<br />
{m.youCanSetPAsswordHere()}.<br />
</p>
<!-- SuperForm with dataType 'form' -->
<div class="flex w-full">
Expand All @@ -56,7 +58,7 @@
/>
<p class="pt-3">
<button class="btn variant-filled-primary font-semibold w-full" type="submit"
>Set Password</button
>{m.setPassword()}</button
>
</p>
</SuperForm>
Expand Down
24 changes: 13 additions & 11 deletions frontend/src/routes/(authentication)/login/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import SuperForm from '$lib/components/Forms/Form.svelte';
import Typewriter from 'svelte-typewriter';
import * as m from '$paraglide/messages.js';
export let data: PageData;
const cursor = false;
Expand All @@ -22,15 +24,15 @@
<div id="hellothere" class="flex flex-col justify-center items-center w-3/5 text-gray-900">
<Typewriter mode="loopOnce" cursor={false} interval={50}>
<div class="text-2xl unstyled text-center pb-4">
<span class="text-2xl text-center">Hello there 👋</span>
<span> This is CISO Assistant. </span>
<span class="text-2xl text-center">{m.helloThere()} </span>
<span> {m.thisIsCisoAssistant()} </span>
</div>
</Typewriter>
<Typewriter mode="cascade" cursor={false} interval={45} delay={5000}>
<div class="text-2xl unstyled text-center">
<span> Your streamlined </span>
<span class="font-black"> one-stop shop </span>
<span> for compliance and risk management. </span>
<span> {m.yourStreamlined()} </span>
<span class="font-black"> {m.oneStopShop()} </span>
<span> {m.forComplianceRiskManagement()} </span>
</div>
</Typewriter>
</div>
Expand All @@ -41,10 +43,10 @@
<i class="fa-solid fa-right-to-bracket" />
</div>
<h3 class="font-bold leading-tight tracking-tight text-gray-900 md:text-2xl">
Login into your account
{m.logIntoYourAccount()}
</h3>
<p class="text-center text-gray-600 text-sm">
You need to login to access all the features
{m.youNeedToLogIn()}
</p>
<div class="w-full">
<!-- SuperForm with dataType 'form' -->
Expand All @@ -55,19 +57,19 @@
let:form
validators={loginSchema}
>
<TextField type="email" {form} field="username" label="E-mail" />
<TextField type="password" {form} field="password" label="Password" />
<TextField type="email" {form} field="username" label={m.email()} />
<TextField type="password" {form} field="password" label={m.password()} />
<div class="flex flex-row justify-end">
<a
href="/password-reset"
class="flex items-center space-x-2 text-primary-800 hover:text-primary-600"
>
<p class="">Forgot password?</p>
<p class="">{m.forgtPassword()}?</p>
</a>
</div>
<p class="">
<button class="btn variant-filled-primary font-semibold w-full" type="submit"
>Log in</button
>{m.login()}</button
>
</p>
</SuperForm>
Expand Down
12 changes: 7 additions & 5 deletions frontend/src/routes/(authentication)/password-reset/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import TextField from '$lib/components/Forms/TextField.svelte';
import SuperForm from '$lib/components/Forms/Form.svelte';
import * as m from '$paraglide/messages.js';
export let data: PageData;
</script>

Expand All @@ -21,10 +23,10 @@
<i class="fa-solid fa-lock" />
</div>
<h3 class="font-bold leading-tight tracking-tight text-gray-900 md:text-2xl">
Forgot your password?
{m.forgtPassword()}
</h3>
<p class="text-center text-gray-600 text-sm">
Enter your email address below, and we'll email instructions for setting a new one.
{m.enterYourEmail()}.
</p>
<div>
<!-- SuperForm with dataType 'form' -->
Expand All @@ -35,10 +37,10 @@
let:form
validators={emailSchema}
>
<TextField type="email" {form} field="email" label="E-mail" />
<TextField type="email" {form} field="email" label={m.email()} />
<p class="pt-3">
<button class="btn variant-filled-primary font-semibold w-full" type="submit"
>Send</button
>{m.send()}</button
>
</p>
</SuperForm>
Expand All @@ -48,7 +50,7 @@
class="flex items-center space-x-2 text-primary-800 hover:text-primary-600"
>
<i class="fa-solid fa-arrow-left" />
<p class="">go back to login</p>
<p class="">{m.goBackToLogin()}</p>
</a>
</div>
</div>
Expand Down

0 comments on commit 606a437

Please sign in to comment.