Skip to content

Commit

Permalink
fix(wallet): Add localization for file transaction info (#16888)
Browse files Browse the repository at this point in the history
Add translation strings for file transaction info
  • Loading branch information
muliswilliam authored Feb 24, 2023
1 parent 3d9a875 commit 9c36ad8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions components/brave_wallet/browser/brave_wallet_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const TransactionInfo = ({
<>
{transactionDetails.gasPremium && (
<SectionColumn>
<TransactionTitle>Gas Premium</TransactionTitle>
<TransactionTitle>{getLocale('braveWalletTransactionGasPremium')}</TransactionTitle>
<TransactionTypeText>
{transactionsNetwork &&
new Amount(transactionDetails.gasPremium)
Expand All @@ -117,7 +117,7 @@ export const TransactionInfo = ({

{transactionDetails.gasLimit && (
<SectionColumn>
<TransactionTitle>Gas Limit</TransactionTitle>
<TransactionTitle>{getLocale('braveWalletTransactionGasLimit')}</TransactionTitle>
<TransactionTypeText>
{transactionsNetwork &&
new Amount(transactionDetails.gasLimit)
Expand All @@ -129,7 +129,7 @@ export const TransactionInfo = ({

{transactionDetails.gasFeeCap && (
<SectionColumn>
<TransactionTitle>Gas Fee Cap</TransactionTitle>
<TransactionTitle>{getLocale('braveWalletTransactionGasFeeCap')}</TransactionTitle>
<TransactionTypeText>
{transactionsNetwork &&
new Amount(transactionDetails.gasFeeCap)
Expand Down
3 changes: 3 additions & 0 deletions components/brave_wallet_ui/stories/locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 3 additions & 0 deletions components/resources/wallet_strings.grdp
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,9 @@
<message name="IDS_BRAVE_WALLET_CONFIRM_TRANSACTION_FRIST" desc="Confirm transaction panel first transaction button">first</message>
<message name="IDS_BRAVE_WALLET_CONFIRM_TRANSACTIONS" desc="Confirm transaction panel transactions label">transactions</message>
<message name="IDS_BRAVE_WALLET_CONFIRM_TRANSACTION_ACCOUNT_CREATION_FEE" desc="Confirm transaction panel account creation fee warning">The associated token account does not exist yet. A small amount of SOL will be spent to create and fund it.</message>
<message name="IDS_BRAVE_WALLET_TRANSACTION_GAS_LIMIT" desc="Transaction gas limit">Gas Limit</message>
<message name="IDS_BRAVE_WALLET_TRANSACTION_GAS_PREMIUM" desc="Transaction gas premium">Gas Premium</message>
<message name="IDS_BRAVE_WALLET_TRANSACTION_GAS_FEE_CAP" desc="Transaction gas fee cap">Gas Fee Cap</message>
<message name="IDS_BRAVE_WALLET_PANEL_TITLE" desc="Brave Wallet panel title">Brave Wallet</message>
<message name="IDS_BRAVE_WALLET_PANEL_CONNECTED" desc="Brave Wallet panel connected status">Connected</message>
<message name="IDS_BRAVE_WALLET_SITE_PERMISSIONS_TITLE" desc="Site Permissions panel title">Site permissions</message>
Expand Down

0 comments on commit 9c36ad8

Please sign in to comment.