welsh translations for sign in

This commit is contained in:
2022-09-07 11:23:46 +01:00
parent 7115aab927
commit 8f96e7bd9d
12 changed files with 122 additions and 75 deletions
+11 -2
View File
@@ -744,7 +744,7 @@ const Breadcrumbs = (props) => {
{router.pathname == "/auth/signin" ? (
<>
<li className="govuk-breadcrumbs__list-item">
Sign in
{t("auth:auth-page-title")}
</li>
</>
) : (
@@ -753,7 +753,16 @@ const Breadcrumbs = (props) => {
{router.pathname == "/auth/verify-request" ? (
<>
<li className="govuk-breadcrumbs__list-item">
Check your email
{t("auth:auth-check-email-page-title")}
</li>
</>
) : (
""
)}
{router.pathname == "/auth/error" ? (
<>
<li className="govuk-breadcrumbs__list-item">
{t("auth:auth-error-signin-error-title")}
</li>
</>
) : (
+22 -40
View File
@@ -189,28 +189,6 @@ let Login = (props) => {
: "";
}, [cookies.pinsUser, router]);
const govGatwayLoginRedirect = () => {
let ggUrl =
props.govGateway.config.authorization_endpoint +
"?response_type=code&scope=openid&client_id=" +
GG_CLIENT_ID +
"&redirect_uri=" +
GG_REDIRECT_URI +
"&ui_locales=" +
(router.locale == "cy" ? "cy" : "en-GB");
console.log("login Url:", ggUrl);
router.replace(ggUrl);
};
const govGatwayForgottenLink = () => {
let ggUrl =
props.govGateway.config.authorization_endpoint +
"/login/forgot-password";
router.replace(ggUrl);
};
if (session === "loading") {
return <h1>loading...</h1>;
}
@@ -229,7 +207,8 @@ let Login = (props) => {
<div className="card" id="login-card">
<div className="card-body active">
<h3 className="heading-small card-heading">
{t("home:login-card-title")}
{/* {t("home:login-card-title")} */}
{t("home:login-card-title-temp")}
</h3>{" "}
<div className="govuk-form-group govuk-!-margin-top-4">
<div className="govuk-body">
@@ -240,9 +219,13 @@ let Login = (props) => {
<button
className="govuk-button withChevron govuk-button-cta"
type="button"
onClick={() => signIn("email")}
onClick={() =>
signIn("email", {
callbackUrl: "/myportal",
})
}
>
Sign in with email address
{t("home:login-via-nextuth-label")}
</button>
)}
{session && (
@@ -255,7 +238,13 @@ let Login = (props) => {
</button>
)}
</div>
<form onSubmit={handleSubmit(onHandleSubmit)}>
<p className="govuk-body-s">
{t("home:login-comingsoon-temp-1")}{" "}
</p>
<p className="govuk-body-s">
{t("home:login-comingsoon-temp-1a")}{" "}
</p>
{/* <form onSubmit={handleSubmit(onHandleSubmit)}>
{validLoginID == false && (
<div className="govuk-error-message govuk-form-group--error">
Incorrect username or password
@@ -281,14 +270,6 @@ let Login = (props) => {
/>
<Field
// validate={[
// required(
// t("home:casesearch-search-validation-required")
// ),
// minLength(
// t("home:casesearch-search-validation-minlength")
// ),
// ]}
className="govuk-input"
component={RenderPasswordfield}
id="loginUserPassword"
@@ -302,9 +283,9 @@ let Login = (props) => {
{t("home:login-card-button")}
</button>
</div>
</form>
{/* <div className="govuk-form-group govuk-!-margin-top-4">
<p className="govuk-body-xs">
</form> */}
<div className="govuk-form-group govuk-!-margin-top-4">
{/* <p className="govuk-body-xs">
<a
onClick={() => {
govGatwayLoginRedirect();
@@ -327,7 +308,8 @@ let Login = (props) => {
{t("home:login-card-register-link")}
</a>
</p>
<p className="govuk-body-s">
*/}
{/* <p className="govuk-body-s">
<a
onClick={() => {
govGatwayForgottenLink();
@@ -336,7 +318,7 @@ let Login = (props) => {
>
{t("home:login-card-forgotten-label")}{" "}
</a>
</p>
</p> */}
<hr className="govuk-!-margin-bottom-4" />
<p className="govuk-body-s">
{t("home:login-comingsoon-temp-2")}
@@ -405,7 +387,7 @@ let Login = (props) => {
{t("home:login-contact-email")}
</a>
</p>
</div> */}
</div>
</div>
{/* <LoadingOverlay
+3 -4
View File
@@ -25,10 +25,7 @@ const MainHome = (props) => {
<div className="govuk-grid-row">
<div className="govuk-grid-column-full">
<div className="flex-container grid-row govuk-body ">
<LoginSoon />
<CaseSearch />
<CaseComment />
<Dns />
<CaseSearch /> <Dns />
{showLogin == "true" && (
<Login
GG_CLIENT_ID={GG_CLIENT_ID}
@@ -36,6 +33,8 @@ const MainHome = (props) => {
session={session}
/>
)}
{showLogin != "true" && <LoginSoon />}
<CaseComment />
{/* <Inspectorate /> */}
</div>
</div>
+3
View File
@@ -48,5 +48,8 @@ module.exports = {
"/details-about-cookies": ["common", "cookies"],
"/terms-and-conditions": ["common"],
"/account/passwordreset": ["common", "home"],
"/auth/signin": ["common", "common", "auth"],
"/auth/verify-request": ["common", "common", "auth"],
"/auth/error": ["common", "common", "auth"],
},
};
+21
View File
@@ -0,0 +1,21 @@
{
"auth-page-title": "Mewngofnodi",
"auth-email-label": "Cyfeiriad ebost",
"auth-signin-button-label": "Mewngofnodwch gyda'ch e-bost",
"auth-check-email-page-title": "Gwiriwch eich e-bost",
"auth-check-email-message": "Mae dolen wedi'i hanfon i'ch e-bost er mwyn i chi allu parhau. Caewch y ffenestr hon.",
"auth-return-home-link-label": "Dychwelyd i Gartref",
"auth-error-signin-error-title": "Gwall Mewngofnodi",
"auth-error-heading": "Mae gwall wedi bod",
"auth-error-Signin-label": "Ceisiwch arwyddo gyda chyfrif gwahanol.",
"auth-error-OAuthSignin-label": "Ceisiwch arwyddo gyda chyfrif gwahanol.",
"auth-error-OAuthCallback-label": "Ceisiwch arwyddo gyda chyfrif gwahanol.",
"auth-error- OAuthCreateAccount-label": "Ceisiwch arwyddo gyda chyfrif gwahanol.",
"auth-error-EmailCreateAccount-label": "Ceisiwch arwyddo gyda chyfrif gwahanol.",
"auth-error-Callback-label": "Ceisiwch arwyddo gyda chyfrif gwahanol.",
"auth-error-OAuthAccountNotLinked-label": "I gadarnhau pwy ydych, mewngofnodwch gyda'r un cyfrif a ddefnyddiwyd gennych yn wreiddiol.",
"auth-error-EmailSignin-label": "Gwiriwch eich cyfeiriad e-bost.",
"auth-error-CredentialsSignin-label": "Methodd mewngofnodi. Gwiriwch fod y manylion a ddarparwyd gennych yn gywir.",
"auth-error-Verification-label": "Methu mewngofnodi. Nid yw'r ddolen mewngofnodi yn ddilys bellach. Efallai ei fod wedi cael ei ddefnyddio eisoes neu efallai ei fod wedi dod i ben.",
"auth-error-default-label": "Methu mewngofnodi."
}
+2
View File
@@ -1,6 +1,7 @@
{
"login-card-title-temp": "Apeliadau neu geisiadau newydd",
"login-comingsoon-temp-1": "Mae'r gwasanaeth hwn yn cael ei ddatblygu i gefnogi apeliadau a cheisiadau ar-lein.",
"login-comingsoon-temp-1a": "Ar hyn o bryd gallwch godi Apeliadau Cynllunio a78, Caniatâd Adeilad Rhestredig ac Ardal Gadwraeth, Apeliadau Deiliaid Tai a Mân Apeliadau Masnachol - HAS/CAS, Hysbysebion ac apeliadau Dilysu.",
"login-comingsoon-temp-2": "Wrth i ni ddatblygur gwasanaeth ar-lein, dewch o hyd i:",
"login-comingsoon-forms-link-1": "https://llyw.cymru/ffurflenni-apelio",
"login-comingsoon-forms-label-1": "ffurflenni apêl cynllunio a ffurflenni cais cynllunio",
@@ -22,6 +23,7 @@
"login-card-forgotten-label": "Rwyf wedi anghofio fy nghyfrinair",
"login-card-forgotten-link": "Cliciwch yma",
"login-via-gov-gateway-label": "Mewngofnodi trwy Borth y Llywodraeth",
"login-via-nextuth-label": "Mewngofnodwch gyda'ch cyfeiriad e-bost",
"casesearch-card-title": "Chwilio apeliadau a Datblygiadau o Arwyddocâd Cenedlaethol",
"casesearch-card-search-hint": "Defnyddiwch gyfeimod yr achos neu deitl DAC i chwilio. Bydd cyfeirnod yr achos yn debyg i un o'r canlynol:",
"casesearch-card-search-example-label-1": "APP-A12345-A-21-1234567",
+21
View File
@@ -0,0 +1,21 @@
{
"auth-page-title": "Sign in",
"auth-email-label": "Email address",
"auth-signin-button-label": "Sign in with your email",
"auth-check-email-page-title": "Check your email",
"auth-check-email-message": "A link has been sent to your email so you can continue. Please close this window.",
"auth-return-home-link-label": "Return to Home",
"auth-error-signin-error-title": "Sign in Error",
"auth-error-heading": "There has been an error",
"auth-error-Signin-label": "Try signing with a different account.",
"auth-error-OAuthSignin-label": "Try signing with a different account.",
"auth-error-OAuthCallback-label": "Try signing with a different account.",
"auth-error- OAuthCreateAccount-label": "Try signing with a different account.",
"auth-error-EmailCreateAccount-label": "Try signing with a different account.",
"auth-error-Callback-label": "Try signing with a different account.",
"auth-error-OAuthAccountNotLinked-label": "To confirm your identity, sign in with the same account you used originally.",
"auth-error-EmailSignin-label": "Check your email address.",
"auth-error-CredentialsSignin-label": "Sign in failed. Check the details you provided are correct.",
"auth-error-Verification-label": "Unable to sign in. The sign in link is no longer valid.It may have been used already or it may have expired. ",
"auth-error-default-label": "Unable to sign in."
}
+2
View File
@@ -1,6 +1,7 @@
{
"login-card-title-temp": "New appeals or applications",
"login-comingsoon-temp-1": "This service is being developed to support online appeals and applications.",
"login-comingsoon-temp-1a": "You can currently raise Planning Appeals s78, Listed Building and Conservation Area Consent, Householder and Minor Commercial Appeals - HAS/CAS, Adverts and Non-Validation appeals.",
"login-comingsoon-temp-2": "While we develop the online service, find:",
"login-comingsoon-forms-link-1": "https://gov.wales/planning-appeal-forms",
"login-comingsoon-forms-label-1": "planning appeal and application forms",
@@ -22,6 +23,7 @@
"login-card-forgotten-label": "I have forgotten my password",
"login-card-forgotten-link": "Click here",
"login-via-gov-gateway-label": "Log in via Government Gateway",
"login-via-nextuth-label": "Sign in with your email address",
"casesearch-card-title": "Search appeals and Developments of National Significance",
"casesearch-card-search-hint": "Use the case reference or DNS title to search. Case reference will be similar to one of the following:",
"casesearch-card-search-example-label-1": "APP-A12345-A-21-1234567",
+3 -2
View File
@@ -6,7 +6,8 @@
"dev": "next dev",
"dev:app": "node ./server/server.js",
"build": "NODE_ENV=production node_modules/next/dist/bin/next build",
"start": "node_modules/next/dist/bin/next start"
"start": "node_modules/next/dist/bin/next start",
"lint": "next lint"
},
"dependencies": {
"@azure/identity": "^2.0.5",
@@ -86,4 +87,4 @@
"prettier": "2.5.1",
"prisma": "^3.12.0"
}
}
}
+19 -18
View File
@@ -16,20 +16,17 @@ const Error = (props) => {
const { error } = useRouter().query;
const errors = {
Signin: "Try signing with a different account.",
OAuthSignin: "Try signing with a different account.",
OAuthCallback: "Try signing with a different account.",
OAuthCreateAccount: "Try signing with a different account.",
EmailCreateAccount: "Try signing with a different account.",
Callback: "Try signing with a different account.",
OAuthAccountNotLinked:
"To confirm your identity, sign in with the same account you used originally.",
EmailSignin: "Check your email address.",
CredentialsSignin:
"Sign in failed. Check the details you provided are correct.",
Verification:
"Unable to sign in. The sign in link is no longer valid.It may have been used already or it may have expired. ",
default: "Unable to sign in.",
Signin: t("auth:auth-error-Signin-label"),
OAuthSignin: t("auth:auth-error-OAuthSignin-label"),
OAuthCallback: t("auth:auth-error-OAuthCallback-label"),
OAuthCreateAccount: t("auth:auth-error-OAuthCreateAccount-label"),
EmailCreateAccount: t("auth:auth-error-EmailCreateAccount-label"),
Callback: t("auth:auth-error-Callback-label"),
OAuthAccountNotLinked: t("auth:auth-error-OAuthAccountNotLinked-label"),
EmailSignin: t("auth:auth-error-EmailSignin-label"),
CredentialsSignin: t("auth:auth-error-CredentialsSignin-label"),
Verification: t("auth:auth-error-Verification-label"),
default: t("auth:auth-error-default-label"),
};
const errorMessage = error && (errors[error] ?? errors.default);
@@ -37,7 +34,10 @@ const Error = (props) => {
return (
<div>
<Head>
<title>Sign in Error - {t("common:service-name")}</title>
<title>
{t("auth:auth-error-signin-error-title")} -{" "}
{t("common:service-name")}
</title>
</Head>
<div id="page_wrapper">
<CookieBanner />
@@ -48,7 +48,7 @@ const Error = (props) => {
<main className="govuk-main-wrapper govuk-!-padding-top-0 govuk-!-padding-bottom-9">
<div className="govuk-grid-row ">
<div className="govuk-grid-column-two-thirds ">
<h1>There has been an error </h1>
<h1>{t("auth:auth-error-heading")}</h1>
</div>
</div>
<div className="govuk-grid-row">
@@ -58,8 +58,9 @@ const Error = (props) => {
</div>
<div className="govuk-grid-row">
<div className="govuk-grid-column-two-thirds govuk-body">
{" "}
<Link href="/">Return to Home</Link>
<Link href="/">
{t("auth:auth-return-home-link-label")}
</Link>
</div>
</div>
</main>
+6 -4
View File
@@ -14,7 +14,9 @@ const SignIn = (props) => {
return (
<div>
<Head>
<title>Sign in - {t("common:service-name")}</title>
<title>
{t("auth:auth-page-title")} - {t("common:service-name")}
</title>
</Head>
<div id="page_wrapper">
<CookieBanner />
@@ -24,7 +26,7 @@ const SignIn = (props) => {
<main className="govuk-main-wrapper govuk-!-padding-top-0 govuk-!-padding-bottom-9">
<div className="govuk-grid-row ">
<div className="govuk-grid-column-two-thirds ">
<h1>Sign in</h1>
<h1>{t("auth:auth-page-title")} </h1>
</div>
</div>
<div className="govuk-grid-row">
@@ -44,7 +46,7 @@ const SignIn = (props) => {
className="govuk-label"
htmlFor="email"
>
Email address{" "}
{t("auth:auth-email-label")}
</label>
<input
className="govuk-input govuk-!-width-three-quarters"
@@ -58,7 +60,7 @@ const SignIn = (props) => {
type="submit"
className="govuk-button"
>
Sign in with your email
{t("auth:auth-signin-button-label")}
</button>
</div>
</form>
+9 -5
View File
@@ -15,7 +15,10 @@ const SignIn = (props) => {
return (
<div>
<Head>
<title>Sign in - {t("common:service-name")}</title>
<title>
{t("auth:auth-check-email-page-title")} -{" "}
{t("common:service-name")}
</title>
</Head>
<div id="page_wrapper">
<CookieBanner />
@@ -26,19 +29,20 @@ const SignIn = (props) => {
<main className="govuk-main-wrapper govuk-!-padding-top-0 govuk-!-padding-bottom-9">
<div className="govuk-grid-row ">
<div className="govuk-grid-column-two-thirds ">
<h1>Check your email</h1>
<h1>{t("auth:auth-check-email-page-title")}</h1>
</div>
</div>
<div className="govuk-grid-row">
<div className="govuk-grid-column-two-thirds govuk-body">
A link has been sent to your email so you can
continue. Please close this window.
{t("auth:auth-check-email-message")}
</div>
</div>
<div className="govuk-grid-row">
<div className="govuk-grid-column-two-thirds govuk-body">
{" "}
<Link href="/">Return to Home</Link>
<Link href="/">
{t("auth:auth-return-home-link-label")}
</Link>
</div>
</div>
</main>