Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(wallet): Add localization for file transaction info #16888

Merged
merged 1 commit into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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