Skip to content

Commit

Permalink
fixup! feat: add i18n to confirmation dialog and handle API error cases
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Guzei <[email protected]>
  • Loading branch information
DominikGuzei committed Nov 21, 2024
1 parent 4e049a4 commit f5cd75b
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 9 deletions.
50 changes: 50 additions & 0 deletions source/renderer/app/i18n/locales/defaultMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4460,10 +4460,60 @@
"defaultMessage": "!!!Submit",
"description": "Label for the submit button on the governance page",
"id": "voting.governance.submitLabel"
},
{
"defaultMessage": "!!!Could not initialize transaction. Please try again!",
"description": "Generic error for initialize transaction",
"id": "voting.governance.initializeTxError.generic"
},
{
"defaultMessage": "!!!Chosen same value as previously",
"description": "Chosen same value as previously",
"id": "voting.governance.initializeTxError.sameVote"
}
],
"path": "source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.messages.ts"
},
{
"descriptors": [
{
"defaultMessage": "!!!Vote",
"description": "Vote title",
"id": "voting.governance.confirmationDialog.vote"
},
{
"defaultMessage": "!!!Transaction fee",
"description": "Fee title",
"id": "voting.governance.confirmationDialog.fee"
},
{
"defaultMessage": "!!!Spending password",
"description": "Label for password input",
"id": "voting.governance.confirmationDialog.password"
},
{
"defaultMessage": "!!!Something went wrong during transaction submission. Please try again in a few minutes.",
"description": "Generic error message",
"id": "voting.governance.confirmationDialog.error.generic"
},
{
"defaultMessage": "!!!Wrong password, please try again",
"description": "Wrong password error message",
"id": "voting.governance.confirmationDialog.error.password"
},
{
"defaultMessage": "!!!Cancel",
"description": "Cancel button",
"id": "voting.governance.confirmationDialog.button.cancel"
},
{
"defaultMessage": "!!!Confirm",
"description": "Confirm button",
"id": "voting.governance.confirmationDialog.button.confirm"
}
],
"path": "source/renderer/app/components/voting/voting-governance/VotingPowerDelegationConfirmationDialog.messages.ts"
},
{
"descriptors": [
{
Expand Down
18 changes: 9 additions & 9 deletions source/renderer/app/i18n/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -719,12 +719,21 @@
"voting.catalystFooterLinks.projects": "Projects",
"voting.fundName": "Fund{votingFundNumber}",
"voting.governance.abstain": "Abstain",
"voting.governance.confirmationDialog.button.cancel": "Cancel",
"voting.governance.confirmationDialog.button.confirm": "Confirm",
"voting.governance.confirmationDialog.error.generic": "Something went wrong during transaction submission. Please try again in a few minutes.",
"voting.governance.confirmationDialog.error.password": "Wrong password, please try again",
"voting.governance.confirmationDialog.fee": "Transaction fee",
"voting.governance.confirmationDialog.password": "Spending password",
"voting.governance.confirmationDialog.vote": "Vote",
"voting.governance.delegateToDRep": "Delegate to DRep",
"voting.governance.drepInputError": "Invalid DRep ID",
"voting.governance.drepInputLabel": "Please type or paste a valid DRep ID here. Look up",
"voting.governance.drepInputLabelLink": "DRep directory",
"voting.governance.drepInputPlaceholder": "Paste DRep ID here …",
"voting.governance.heading": "CARDANO VOTING POWER DELEGATION",
"voting.governance.initializeTxError.generic": "Something went wrong during transaction initialization. Please try again in a few minutes. ",
"voting.governance.initializeTxError.sameVote": "This voting power delegation choice has already been successfully recorded in a previous transaction. Please change the registration type or DRep ID in order to proceed.",
"voting.governance.learnMoreLinkLabel": "Cardano Governance.",
"voting.governance.noConfidence": "No Confidence",
"voting.governance.paragraph1": "Register your voting power to withdraw rewards. Learn more about",
Expand All @@ -733,15 +742,6 @@
"voting.governance.selectWalletLabel": "Select a wallet to delegate from",
"voting.governance.selectWalletPlaceholder": "Select a wallet …",
"voting.governance.submitLabel": "Submit",
"voting.governance.initializeTxError.generic": "Something went wrong during transaction initialization. Please try again in a few minutes. ",
"voting.governance.initializeTxError.sameVote": "This voting power delegation choice has already been successfully recorded in a previous transaction. Please change the registration type or DRep ID in order to proceed.",
"voting.governance.confirmationDialog.vote": "Vote",
"voting.governance.confirmationDialog.fee": "Transaction fee",
"voting.governance.confirmationDialog.password": "Spending password",
"voting.governance.confirmationDialog.error.generic": "Something went wrong during transaction submission. Please try again in a few minutes.",
"voting.governance.confirmationDialog.error.password": "Wrong password, please try again",
"voting.governance.confirmationDialog.button.cancel": "Cancel",
"voting.governance.confirmationDialog.button.confirm": "Confirm",
"voting.info.androidAppButtonUrl": "https://play.google.com/store/apps/details?id=io.iohk.vitvoting",
"voting.info.appleAppButtonUrl": "https://apps.apple.com/in/app/catalyst-voting/id1517473397",
"voting.info.learnMoreLinkLabel": "Learn more",
Expand Down
9 changes: 9 additions & 0 deletions source/renderer/app/i18n/locales/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -719,12 +719,21 @@
"voting.catalystFooterLinks.projects": "プロジェクト",
"voting.fundName": "Fund{votingFundNumber}",
"voting.governance.abstain": "!!!Abstain",
"voting.governance.confirmationDialog.button.cancel": "!!!Cancel",
"voting.governance.confirmationDialog.button.confirm": "!!!Confirm",
"voting.governance.confirmationDialog.error.generic": "!!!Something went wrong during transaction submission. Please try again in a few minutes.",
"voting.governance.confirmationDialog.error.password": "!!!Wrong password, please try again",
"voting.governance.confirmationDialog.fee": "!!!Transaction fee",
"voting.governance.confirmationDialog.password": "!!!Spending password",
"voting.governance.confirmationDialog.vote": "!!!Vote",
"voting.governance.delegateToDRep": "!!!Delegate to DRep",
"voting.governance.drepInputError": "!!!Invalid DRep ID",
"voting.governance.drepInputLabel": "!!!Please type or paste a valid DRep ID here. Look up",
"voting.governance.drepInputLabelLink": "!!!DRep directory",
"voting.governance.drepInputPlaceholder": "!!!Paste DRep ID here …",
"voting.governance.heading": "!!!CARDANO VOTING POWER DELEGATION",
"voting.governance.initializeTxError.generic": "!!!Could not initialize transaction. Please try again!",
"voting.governance.initializeTxError.sameVote": "!!!Chosen same value as previously",
"voting.governance.learnMoreLinkLabel": "!!!Governance link label",
"voting.governance.noConfidence": "!!!No Confidence",
"voting.governance.paragraph1": "!!!Governance first paragraph",
Expand Down
50 changes: 50 additions & 0 deletions translations/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4460,10 +4460,60 @@
"defaultMessage": "!!!Submit",
"description": "Label for the submit button on the governance page",
"id": "voting.governance.submitLabel"
},
{
"defaultMessage": "!!!Could not initialize transaction. Please try again!",
"description": "Generic error for initialize transaction",
"id": "voting.governance.initializeTxError.generic"
},
{
"defaultMessage": "!!!Chosen same value as previously",
"description": "Chosen same value as previously",
"id": "voting.governance.initializeTxError.sameVote"
}
],
"path": "source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.messages.ts"
},
{
"descriptors": [
{
"defaultMessage": "!!!Vote",
"description": "Vote title",
"id": "voting.governance.confirmationDialog.vote"
},
{
"defaultMessage": "!!!Transaction fee",
"description": "Fee title",
"id": "voting.governance.confirmationDialog.fee"
},
{
"defaultMessage": "!!!Spending password",
"description": "Label for password input",
"id": "voting.governance.confirmationDialog.password"
},
{
"defaultMessage": "!!!Something went wrong during transaction submission. Please try again in a few minutes.",
"description": "Generic error message",
"id": "voting.governance.confirmationDialog.error.generic"
},
{
"defaultMessage": "!!!Wrong password, please try again",
"description": "Wrong password error message",
"id": "voting.governance.confirmationDialog.error.password"
},
{
"defaultMessage": "!!!Cancel",
"description": "Cancel button",
"id": "voting.governance.confirmationDialog.button.cancel"
},
{
"defaultMessage": "!!!Confirm",
"description": "Confirm button",
"id": "voting.governance.confirmationDialog.button.confirm"
}
],
"path": "source/renderer/app/components/voting/voting-governance/VotingPowerDelegationConfirmationDialog.messages.ts"
},
{
"descriptors": [
{
Expand Down

0 comments on commit f5cd75b

Please sign in to comment.