diff --git a/packages/yoroi-extension/app/containers/cashback/CashbackPage.js b/packages/yoroi-extension/app/containers/cashback/CashbackPage.js index fc11c62ccb..cd00546da0 100644 --- a/packages/yoroi-extension/app/containers/cashback/CashbackPage.js +++ b/packages/yoroi-extension/app/containers/cashback/CashbackPage.js @@ -31,7 +31,26 @@ import { IncorrectWalletPasswordError } from '../../api/common/errors'; import { convertToLocalizableError } from '../../domain/LedgerLocalizedError'; import LocalizableError from '../../i18n/LocalizableError'; import type { $npm$ReactIntl$IntlShape } from 'react-intl'; -import { injectIntl } from 'react-intl'; +import { injectIntl, defineMessages, } from 'react-intl'; + +const messages = defineMessages({ + claim: { + id: 'cashback.claim.dialog.title', + defaultMessage: '!!!CLAIM CASHBACK', + }, + passwordClaimInstruction: { + id: 'cashback.claim.dialog.instruction.password', + defaultMessage: '!!!Enter your password to claim cashback rewards.', + }, + hardwardClaimInstruction: { + id: 'cashback.claim.dialog.instruction.hardware', + defaultMessage: '!!!Confirm on your hardware wallet to claim cashback rewards.', + }, + message: { + id: 'cashback.claim.dialog.message.label', + defaultMessage: '!!!Message', + }, +}); type Props = StoresAndActionsProps; @@ -212,8 +231,7 @@ const CashbackPageContainer: React$ComponentType = observer((props: AllPr } - // title={} + title={} /> } > @@ -221,12 +239,12 @@ const CashbackPageContainer: React$ComponentType = observer((props: AllPr {signaturePopup ? } onClose={abortClaim} actions={[{ - label: 'CONFIRM', + label: intl.formatMessage(globalMessages.confirm), primary: true, disabled: wallet.type === 'mnemonic' && !password, onClick: () => signMessage(message, password) @@ -234,13 +252,12 @@ const CashbackPageContainer: React$ComponentType = observer((props: AllPr > - {wallet.type === 'mnemonic' ? - 'Enter your password to claim cashback rewards.' : - 'Confirm on your hardware wallet to claim cashback rewards.' - } + {intl.formatMessage(wallet.type === 'mnemonic' ? + messages.passwordClaimInstruction : messages. hardwardClaimInstruction + )} - Message + {intl.formatMessage(messages.message)}