feat(i18n): add landing payments and not found error pages#9522
Merged
Conversation
feat: add i18n for landing payments and not found error pages
Contributor
There was a problem hiding this comment.
Pull request overview
This PR internationalizes the frontend’s Not Found and Payments landing pages by extracting previously hardcoded English UI copy into react-i18next locale resources, aligning these pages with the app’s existing i18n structure under translation.features.*.
Changes:
- Replaced hardcoded strings in
NotFoundErrorPagewitht('features.notFoundError.*')keys. - Replaced hardcoded strings in
LandingPaymentsPagewitht('features.landingPayments.*')keys (hero, features, help center/FAQ, bottom CTA, onboarding messages). - Added new locale feature modules (
landing-payments,not-found-error) and wired them into the locale type definitions anden-sgfallback bundle.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| apps/frontend/src/pages/NotFoundError/NotFoundErrorPage.tsx | Swaps static 404 page copy to i18n keys. |
| apps/frontend/src/pages/Landing/Payments/LandingPaymentsPage.tsx | Swaps payments landing page copy and onboarding messages to i18n keys. |
| apps/frontend/src/i18n/locales/types.ts | Extends translation typings to include landingPayments and notFoundError. |
| apps/frontend/src/i18n/locales/features/not-found-error/index.ts | Defines the NotFoundError locale shape and exports en-sg. |
| apps/frontend/src/i18n/locales/features/not-found-error/en-sg.ts | Adds English (SG) strings for the 404 page. |
| apps/frontend/src/i18n/locales/features/landing-payments/index.ts | Defines the LandingPayments locale shape and exports en-sg. |
| apps/frontend/src/i18n/locales/features/landing-payments/en-sg.ts | Adds English (SG) strings for the payments landing page. |
| apps/frontend/src/i18n/locales/features/index.ts | Exposes new feature locale types from the features barrel. |
| apps/frontend/src/i18n/locales/en-sg.ts | Registers the new feature locale bundles in the enSG fallback translation. |
Comments suppressed due to low confidence (1)
apps/frontend/src/pages/Landing/Payments/LandingPaymentsPage.tsx:110
handleSubmitcloses overt,fieldId, andonboardingSuccessHelperTextbut they are missing from theuseCallbackdependency array. This can lead to stale translations after a locale change and will triggerreact-hooks/exhaustive-depswarnings.
const handleSubmit = useCallback(async () => {
const fieldValue = formMethods.getValues(fieldId) as VerifiableFieldValues
try {
await sendOnboardingEmailMutation.mutateAsync({
email: fieldValue.value,
})
formMethods.clearErrors(fieldId)
setOnboardingHelperText(onboardingSuccessHelperText)
} catch (error) {
if (error instanceof Error) {
if (error.message === 'Forbidden') {
formMethods.setError(fieldId, {
message: t('features.landingPayments.onboarding.errors.forbidden'),
})
} else {
formMethods.setError(fieldId, {
message: t('features.landingPayments.onboarding.errors.general'),
})
}
}
}
}, [sendOnboardingEmailMutation, formMethods])
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
635468d to
9eb36db
Compare
Copilot stopped work on behalf of
LoneRifle due to an error
June 2, 2026 06:30
eliotlim
approved these changes
Jun 4, 2026
eliotlim
added a commit
that referenced
this pull request
Jun 4, 2026
* chore: add agent context and scratch to gitignore (#9544) * Merge pull request #9545 from opengovsg/fix/optional-pdf-display fix: render signature question with empty answer when signature is not captured in PDF * Merge pull request #9465 from opengovsg/feat/create-form-modal-cutover feat(mrf-cutover): default CreateFormModal to MRF with storage-mode escape hatch (4/6) * fix(NumberField): remove +/- stepper buttons (#9444) (#9448) Co-authored-by: dew1997 <109208984+dew1997@users.noreply.github.com> * fix: enable line breaks in thank you page message (#9507) * fix: enable line breaks in thank you page message (#9433) * fix: lint frontend EndPageBlock (#9509) Fix frontend lint error in EndPageBlock Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --------- Co-authored-by: Bhanu Pratap Singh Rathore <bhanur05@gmail.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> * Merge pull request #9527 from opengovsg/fix/signature-hover-theme-color fix(sig): match hover state to form theme color * fix(table): add default for dropdown columns (#9526) fix(table): add default for dropdown columns (#9476) Co-authored-by: Raj Shekar Patha <rajashekarpatha07@gmail.com> * feat(i18n): add landing payments and not found error pages (#9522) * feat(i18n): add landing payments and not found error pages (#9497) feat: add i18n for landing payments and not found error pages * fix(i18n/payments): remove spurious whitespace Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix(payments): add i18n t hook to `useCallback()` --------- Co-authored-by: Samuel Tan <126168312+SAMTAN444@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * chore: bump version to 7.23.0 --------- Co-authored-by: Kevin Foong <55353265+kevin9foong@users.noreply.github.com> Co-authored-by: scottheng96 <44297674+scottheng96@users.noreply.github.com> Co-authored-by: LoneRifle <LoneRifle@users.noreply.github.com> Co-authored-by: dew1997 <109208984+dew1997@users.noreply.github.com> Co-authored-by: Bhanu Pratap Singh Rathore <bhanur05@gmail.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Raj Shekar Patha <rajashekarpatha07@gmail.com> Co-authored-by: Samuel Tan <126168312+SAMTAN444@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and Solution
Closes #8430
Merges #9497