Skip to content

Commit

Permalink
fix: APP-3028 - Fix strings for approve and execute transaction dialog (
Browse files Browse the repository at this point in the history
  • Loading branch information
cgero-eth authored Apr 22, 2024
1 parent 098707e commit 8b78157
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/assets/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -1854,7 +1854,8 @@
"voteOrApprovalDialog": {
"title": {
"vote": "Sign Vote",
"approval": "Approve"
"approval": "Approve",
"approval_execute": "Approve and execute"
},
"button": {
"vote": {
Expand All @@ -1863,7 +1864,8 @@
},
"approval": {
"success": "Continue to proposal",
"approve": "Approve proposal"
"approve": "Approve",
"approve_execute": "Approve and execute"
}
}
}
Expand Down
10 changes: 8 additions & 2 deletions src/containers/voteOrApprovalDialog/voteOrApprovalDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,20 @@ export const VoteOrApprovalDialog: React.FC<
const dialogType =
pluginType === 'multisig.plugin.dao.eth' ? 'approval' : 'vote';

const dialogContext =
dialogType === 'approval' && tryExecution ? 'execute' : undefined;

return (
<TransactionDialog
title={t(`voteOrApprovalDialog.title.${dialogType}`)}
title={t(`voteOrApprovalDialog.title.${dialogType}`, {
context: dialogContext,
})}
isOpen={isOpen}
sendTransactionResult={sendTransactionResults}
displayTransactionStatus={transaction != null}
sendTransactionLabel={t(
`voteOrApprovalDialog.button.${dialogType}.approve`
`voteOrApprovalDialog.button.${dialogType}.approve`,
{context: dialogContext}
)}
successButton={{
label: t(`voteOrApprovalDialog.button.${dialogType}.success`),
Expand Down

0 comments on commit 8b78157

Please sign in to comment.