-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add i18n to confirmation dialog and handle API error cases
- Loading branch information
Szymon Masłowski
committed
Nov 21, 2024
1 parent
d2233a2
commit 29bfcb2
Showing
10 changed files
with
169 additions
and
37 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
40 changes: 40 additions & 0 deletions
40
...p/components/voting/voting-governance/VotingPowerDelegationConfirmationDialog.messages.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { defineMessages } from 'react-intl'; | ||
|
||
export const messages = defineMessages({ | ||
vote: { | ||
id: 'voting.governance.confirmationDialog.vote', | ||
defaultMessage: '!!!Vote', | ||
description: 'Vote title', | ||
}, | ||
fee: { | ||
id: 'voting.governance.confirmationDialog.fee', | ||
defaultMessage: '!!!Transaction fee', | ||
description: 'Fee title', | ||
}, | ||
password: { | ||
id: 'voting.governance.confirmationDialog.password', | ||
defaultMessage: '!!!Spending password', | ||
description: 'Label for password input', | ||
}, | ||
errorGeneric: { | ||
id: 'voting.governance.confirmationDialog.error.generic', | ||
defaultMessage: | ||
'!!!Something went wrong during transaction submission. Please try again in a few minutes.', | ||
description: 'Generic error message', | ||
}, | ||
errorPassword: { | ||
id: 'voting.governance.confirmationDialog.error.password', | ||
defaultMessage: '!!!Wrong password, please try again', | ||
description: 'Wrong password error message', | ||
}, | ||
buttonCancel: { | ||
id: 'voting.governance.confirmationDialog.button.cancel', | ||
defaultMessage: '!!!Cancel', | ||
description: 'Cancel button', | ||
}, | ||
buttonConfirm: { | ||
id: 'voting.governance.confirmationDialog.button.confirm', | ||
defaultMessage: '!!!Confirm', | ||
description: 'Confirm button', | ||
}, | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,6 @@ | |
} | ||
|
||
.error { | ||
margin-top: 24px; | ||
@include error-message; | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.