From a15538822289259153f6859e0aa7ca0d3b8f47ae Mon Sep 17 00:00:00 2001 From: William Muli Date: Fri, 27 Jan 2023 14:09:39 +0300 Subject: [PATCH] Add translation strings for file transaction info --- components/brave_wallet/browser/brave_wallet_constants.h | 5 +++++ .../confirm-transaction-panel/transaction-info.tsx | 6 +++--- components/brave_wallet_ui/stories/locale.ts | 3 +++ components/resources/wallet_strings.grdp | 3 +++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/components/brave_wallet/browser/brave_wallet_constants.h b/components/brave_wallet/browser/brave_wallet_constants.h index ec45c7c4a6c7..db6303e19eeb 100644 --- a/components/brave_wallet/browser/brave_wallet_constants.h +++ b/components/brave_wallet/browser/brave_wallet_constants.h @@ -524,6 +524,11 @@ constexpr webui::LocalizedString kLocalizedStrings[] = { {"braveWalletConfirmTransactions", IDS_BRAVE_WALLET_CONFIRM_TRANSACTIONS}, {"braveWalletConfirmTransactionAccountCreationFee", IDS_BRAVE_WALLET_CONFIRM_TRANSACTION_ACCOUNT_CREATION_FEE}, + {"braveWalletTransactionGasLimit", IDS_BRAVE_WALLET_TRANSACTION_GAS_LIMIT}, + {"braveWalletTransactionGasPremium", + IDS_BRAVE_WALLET_TRANSACTION_GAS_PREMIUM}, + {"braveWalletTransactionGasFeeCap", + IDS_BRAVE_WALLET_TRANSACTION_GAS_FEE_CAP}, {"braveWalletPanelTitle", IDS_BRAVE_WALLET_PANEL_TITLE}, {"braveWalletPanelConnected", IDS_BRAVE_WALLET_PANEL_CONNECTED}, {"braveWalletSitePermissionsAccounts", diff --git a/components/brave_wallet_ui/components/extension/confirm-transaction-panel/transaction-info.tsx b/components/brave_wallet_ui/components/extension/confirm-transaction-panel/transaction-info.tsx index 02178590e461..6bf319f2e836 100644 --- a/components/brave_wallet_ui/components/extension/confirm-transaction-panel/transaction-info.tsx +++ b/components/brave_wallet_ui/components/extension/confirm-transaction-panel/transaction-info.tsx @@ -105,7 +105,7 @@ export const TransactionInfo = ({ <> {transactionDetails.gasPremium && ( - Gas Premium + {getLocale('braveWalletTransactionGasPremium')} {transactionsNetwork && new Amount(transactionDetails.gasPremium) @@ -117,7 +117,7 @@ export const TransactionInfo = ({ {transactionDetails.gasLimit && ( - Gas Limit + {getLocale('braveWalletTransactionGasLimit')} {transactionsNetwork && new Amount(transactionDetails.gasLimit) @@ -129,7 +129,7 @@ export const TransactionInfo = ({ {transactionDetails.gasFeeCap && ( - Gas Fee Cap + {getLocale('braveWalletTransactionGasFeeCap')} {transactionsNetwork && new Amount(transactionDetails.gasFeeCap) diff --git a/components/brave_wallet_ui/stories/locale.ts b/components/brave_wallet_ui/stories/locale.ts index ef9d21e06ff4..70e4bf485a84 100644 --- a/components/brave_wallet_ui/stories/locale.ts +++ b/components/brave_wallet_ui/stories/locale.ts @@ -516,6 +516,9 @@ provideStrings({ braveWalletConfirmTransactionAccountCreationFee: 'The associated token account does not exist yet. A small amount of SOL will be spent to create and fund it.', braveWalletAllowSpendCurrentAllowance: 'Current allowance', braveWalletAllowSpendProposedAllowance: 'Proposed allowance', + braveWalletTransactionGasLimit: 'Gas Limit', + braveWalletTransactionGasPremium: 'Gas Premium', + braveWalletTransactionGasFeeCap: 'Gas Fee Cap', // Wallet Main Panel braveWalletPanelTitle: 'Brave Wallet', diff --git a/components/resources/wallet_strings.grdp b/components/resources/wallet_strings.grdp index 9163accd2333..71d0a253e095 100644 --- a/components/resources/wallet_strings.grdp +++ b/components/resources/wallet_strings.grdp @@ -333,6 +333,9 @@ first transactions The associated token account does not exist yet. A small amount of SOL will be spent to create and fund it. + Gas Limit + Gas Premium + Gas Fee Cap Brave Wallet Connected Site permissions