Skip to content

Commit

Permalink
Add i18n defaults
Browse files Browse the repository at this point in the history
Signed-off-by: sirugh <rugh@adobe.com>
  • Loading branch information
sirugh committed Jan 14, 2021
1 parent c787a44 commit 0139ed0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/venia-ui/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@
"discountSummary.lineItemLabel": "Discounts applied",
"editModal.headerText": "Edit Item",
"Email Signup": "Email Signup",
"errorView.goHome": "Take me home",
"errorView.header": "Oops!",
"errorView.homeButton": "Take me home",
"errorView.message": "Looks like something went wrong. Sorry about that.",
"field.optional": "Optional",
"filterFooter.results": "See Results",
"filterModal.action": "Clear all",
Expand Down
14 changes: 12 additions & 2 deletions packages/venia-ui/lib/components/ErrorView/errorView.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,18 @@ const ErrorView = props => {
}, [history]);

const {
header = DEFAULT_HEADER,
message = DEFAULT_MESSAGE,
header = (
<FormattedMessage
id={'errorView.header'}
defaultMessage={DEFAULT_HEADER}
/>
),
message = (
<FormattedMessage
id={'errorView.message'}
defaultMessage={DEFAULT_MESSAGE}
/>
),
buttonPrompt = (
<FormattedMessage
id={'errorView.goHome'}
Expand Down

0 comments on commit 0139ed0

Please sign in to comment.