Skip to content

Commit

Permalink
fix(ErrorPage): Add 413 error page (#4260)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaydwithers authored Nov 3, 2023
1 parent 8680132 commit 9a95d5f
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/strong-donkeys-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@kaizen/components": minor
---

Add 413 error page.
18 changes: 13 additions & 5 deletions packages/components/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
],
"variants_enabled": true
},
"dateInputDescription.inputFormat": {
"description": "Label for the 'Input format' field",
"message": "Input format"
},
"filterDateRangePicker.dateFrom": {
"description": "Label for the 'Date from' field",
"message": "Date from"
Expand All @@ -18,10 +22,6 @@
"description": "Label for the 'date to' field",
"message": "Date to"
},
"dateInputDescription.inputFormat": {
"description": "Label for the 'Input format' field",
"message": "Input format"
},
"kzErrorPage": {
"description": "Label for contact button",
"message": "Contact support"
Expand Down Expand Up @@ -52,12 +52,20 @@
},
"kzErrorPage.404.message": {
"description": "Call to action instructions for the user",
"message": "Sorry but we can't fing the page you're looking for. Go back and try again, or head to Home"
"message": "Sorry but we can't find the page you're looking for. Go back and try again, or head to Home"
},
"kzErrorPage.404.title": {
"description": "Main title of page",
"message": "Missing pages are one of life's mysteries"
},
"kzErrorPage.413": {
"description": "Call to action instructions for the user",
"message": "Sorry there's an issue with our system and this page can't be displayed. Go back and try again, or head to Home"
},
"kzErrorPage.413.title": {
"description": "Main title of page",
"message": "Something's gone wrong on our side"
},
"kzErrorPage.422.message": {
"description": "Call to action instructions for the user",
"message": "Sorry but your change couldn't be made. Go back and try again, or head to Home"
Expand Down
2 changes: 1 addition & 1 deletion packages/components/locales/mi.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
},
"kzErrorPage.404.message" : {
"description" : "Call to action instructions for the user",
"message" : "Sorry but we can't fing the page you're looking for. Go back and try again, or head to Home"
"message" : "Sorry but we can't find the page you're looking for. Go back and try again, or head to Home"
},
"kzErrorPage.404.title" : {
"description" : "Main title of page",
Expand Down
4 changes: 0 additions & 4 deletions packages/components/locales/si-LK.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@
"description" : "Main title for page",
"message" : "ඔබට මෙම පිටුව නැරඹිය නොහැකිය"
},
"kzErrorPage.404.message" : {
"description" : "Call to action instructions for the user",
"message" : "කණගාටුයි, නමුත් අපි ඔබ සොයන පිටුව fing නොහැක. ආපසු ගොස් නැවත උත්සාහ කරන්න, නැතහොත් නිවසට යන්න"
},
"kzErrorPage.404.title" : {
"description" : "Main title of page",
"message" : "නැතිවූ පිටු ජීවිතයේ අභිරහස් වලින් එකකි"
Expand Down
14 changes: 14 additions & 0 deletions packages/components/src/ErrorPage/hooks/useErrorMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const statusCodes = [
"401",
"403",
"404",
"413",
"422",
"500",
"502",
Expand Down Expand Up @@ -72,6 +73,19 @@ export const useErrorMessages = (
description: "Call to action instructions for the user",
}),
},
413: {
title: formatMessage({
id: "kzErrorPage.413.title",
defaultMessage: "Something's gone wrong on our side",
description: "Main title of page",
}),
message: formatMessage({
id: "kzErrorPage.413",
defaultMessage:
"Sorry there's an issue with our system and this page can't be displayed. Go back and try again, or head to Home",
description: "Call to action instructions for the user",
}),
},
422: {
title: formatMessage({
id: "kzErrorPage.422.title",
Expand Down

0 comments on commit 9a95d5f

Please sign in to comment.