diff --git a/i18n/en.pot b/i18n/en.pot index f95caf7..4f3c77a 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2024-08-28T07:47:39.528Z\n" -"PO-Revision-Date: 2024-08-28T07:47:39.528Z\n" +"POT-Creation-Date: 2024-12-16T14:17:34.112Z\n" +"PO-Revision-Date: 2024-12-16T14:17:34.112Z\n" msgid "Please confirm that you are not a robot by checking the checkbox." msgstr "Please confirm that you are not a robot by checking the checkbox." @@ -133,6 +133,28 @@ msgstr "Download default template" msgid "Download sidebar template" msgstr "Download sidebar template" +msgid "Email Verification Failed" +msgstr "Email Verification Failed" + +msgid "Unable to verify your email" +msgstr "Unable to verify your email" + +msgid "" +"The verification link is invalid or has expired. Please request a new " +"verification email." +msgstr "" +"The verification link is invalid or has expired. Please request a new " +"verification email." + +msgid "Email confirmed" +msgstr "Email confirmed" + +msgid "Your email has been confirmed." +msgstr "Your email has been confirmed." + +msgid "You can now close this page." +msgstr "You can now close this page." + msgid "Something went wrong" msgstr "Something went wrong" diff --git a/src/app.js b/src/app.js index 80cebbb..1908485 100644 --- a/src/app.js +++ b/src/app.js @@ -18,6 +18,8 @@ import { LoginPage, CompleteRegistrationPage, CreateAccountPage, + EmailVerificationFailure, + EmailVerificationSuccess, PasswordResetRequestPage, PasswordUpdatePage, SafeModePage, @@ -34,6 +36,14 @@ const LoginRoutes = () => { } /> } /> + } + /> + } + /> } diff --git a/src/pages/email-verification-failure.js b/src/pages/email-verification-failure.js new file mode 100644 index 0000000..5322354 --- /dev/null +++ b/src/pages/email-verification-failure.js @@ -0,0 +1,25 @@ +import i18n from '@dhis2/d2-i18n' +import { NoticeBox } from '@dhis2/ui' +import React from 'react' +import { FormContainer } from '../components/index.js' +import { useLoginConfig } from '../providers/index.js' + +function EmailVerificationFailure() { + const { lngs } = useLoginConfig() + + return ( + + + {i18n.t( + 'The verification link is invalid or has expired. Please request a new verification email.', + { lngs } + )} + + + ) +} + +export default EmailVerificationFailure diff --git a/src/pages/email-verification-success.js b/src/pages/email-verification-success.js new file mode 100644 index 0000000..5c5b797 --- /dev/null +++ b/src/pages/email-verification-success.js @@ -0,0 +1,22 @@ +import i18n from '@dhis2/d2-i18n' +import { NoticeBox } from '@dhis2/ui' +import React from 'react' +import { FormContainer } from '../components/index.js' +import { useLoginConfig } from '../providers/index.js' + +function EmailVerificationSuccess() { + const { lngs } = useLoginConfig() + + return ( + + + {i18n.t('You can now close this page.', { lngs })} + + + ) +} + +export default EmailVerificationSuccess diff --git a/src/pages/index.js b/src/pages/index.js index cccddef..f635082 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -1,5 +1,7 @@ export { default as CompleteRegistrationPage } from './complete-registration.js' export { default as CreateAccountPage } from './create-account.js' +export { default as EmailVerificationSuccess } from './email-verification-success.js' +export { default as EmailVerificationFailure } from './email-verification-failure.js' export { default as LoginPage } from './login.js' export { default as PasswordResetRequestPage } from './password-reset-request.js' export { default as PasswordUpdatePage } from './password-update.js'