Skip to content

Commit 1a903dd

Browse files
committed
fix(suite): translations network display symbols
1 parent 8a622eb commit 1a903dd

File tree

15 files changed

+49
-45
lines changed

15 files changed

+49
-45
lines changed

packages/suite/src/actions/wallet/stake/stakeFormActions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export const composeStakingTransaction = (
147147
if (tx.type === 'error' && tx.error === 'AMOUNT_NOT_ENOUGH_CURRENCY_FEE') {
148148
tx.errorMessage = {
149149
id: 'AMOUNT_NOT_ENOUGH_CURRENCY_FEE',
150-
values: { networkSymbol: getNetworkDisplaySymbol(network.symbol) },
150+
values: { networkDisplaySymbol: getNetworkDisplaySymbol(network.symbol) },
151151
};
152152
}
153153
});

packages/suite/src/components/suite/FormFractionButtons.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const FormFractionButtons = ({
6262
id="TR_STAKE_MIN_AMOUNT_TOOLTIP"
6363
values={{
6464
amount: MIN_ETH_AMOUNT_FOR_STAKING.toString(),
65-
networkSymbol: displaySymbol,
65+
networkDisplaySymbol: displaySymbol,
6666
}}
6767
/>
6868
)
@@ -80,7 +80,7 @@ export const FormFractionButtons = ({
8080
id="TR_STAKE_MIN_AMOUNT_TOOLTIP"
8181
values={{
8282
amount: MIN_ETH_AMOUNT_FOR_STAKING.toString(),
83-
networkSymbol: displaySymbol,
83+
networkDisplaySymbol: displaySymbol,
8484
}}
8585
/>
8686
)
@@ -98,7 +98,7 @@ export const FormFractionButtons = ({
9898
id="TR_STAKE_MIN_AMOUNT_TOOLTIP"
9999
values={{
100100
amount: MIN_ETH_AMOUNT_FOR_STAKING.toString(),
101-
networkSymbol: displaySymbol,
101+
networkDisplaySymbol: displaySymbol,
102102
}}
103103
/>
104104
)
@@ -116,7 +116,7 @@ export const FormFractionButtons = ({
116116
id="TR_STAKE_MIN_AMOUNT_TOOLTIP"
117117
values={{
118118
amount: MIN_ETH_AMOUNT_FOR_STAKING.toString(),
119-
networkSymbol: displaySymbol,
119+
networkDisplaySymbol: displaySymbol,
120120
}}
121121
/>
122122
)

packages/suite/src/components/suite/StakingProcess/UnstakingInfo.tsx

+7-4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const UnstakingInfo = ({ isExpanded }: UnstakingInfoProps) => {
5050
subheading: (
5151
<Translation
5252
id="TR_STAKING_CONSOLIDATING_FUNDS"
53-
values={{ networkSymbol: displaySymbol }}
53+
values={{ networkDisplaySymbol: displaySymbol }}
5454
/>
5555
),
5656
content: {
@@ -61,13 +61,13 @@ export const UnstakingInfo = ({ isExpanded }: UnstakingInfoProps) => {
6161
heading: (
6262
<Translation
6363
id="TR_STAKE_CLAIM_UNSTAKED"
64-
values={{ networkSymbol: displaySymbol }}
64+
values={{ networkDisplaySymbol: displaySymbol }}
6565
/>
6666
),
6767
subheading: (
6868
<Translation
6969
id="TR_STAKING_YOUR_UNSTAKED_FUNDS"
70-
values={{ networkSymbol: displaySymbol }}
70+
values={{ networkDisplaySymbol: displaySymbol }}
7171
/>
7272
),
7373
content: {
@@ -77,7 +77,10 @@ export const UnstakingInfo = ({ isExpanded }: UnstakingInfoProps) => {
7777
},
7878
{
7979
heading: (
80-
<Translation id="TR_STAKE_IN_ACCOUNT" values={{ networkSymbol: displaySymbol }} />
80+
<Translation
81+
id="TR_STAKE_IN_ACCOUNT"
82+
values={{ networkDisplaySymbol: displaySymbol }}
83+
/>
8184
),
8285
},
8386
];

packages/suite/src/components/suite/modals/ReduxModal/ConfirmAddressModal.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const ConfirmAddressModal = ({ addressPath, value, ...props }: ConfirmAdd
4747
<Translation
4848
id="TR_ADDRESS_MODAL_TITLE_EXCHANGE"
4949
values={{
50-
networkSymbol: getNetworkDisplaySymbol(symbol),
50+
networkName: getNetworkDisplaySymbol(symbol),
5151
networkCurrencyName: coinSymbol?.toUpperCase(),
5252
}}
5353
/>
@@ -58,7 +58,7 @@ export const ConfirmAddressModal = ({ addressPath, value, ...props }: ConfirmAdd
5858
<Translation
5959
id="TR_ADDRESS_MODAL_TITLE"
6060
values={{
61-
networkSymbol:
61+
networkName:
6262
coinSymbol && isNetworkSymbol(coinSymbol)
6363
? getNetworkDisplaySymbol(coinSymbol)
6464
: coinSymbol?.toUpperCase(),
@@ -71,7 +71,7 @@ export const ConfirmAddressModal = ({ addressPath, value, ...props }: ConfirmAdd
7171
<Translation
7272
id="TR_ADDRESS_MODAL_TITLE"
7373
values={{
74-
networkSymbol: getNetworkDisplaySymbol(account.symbol),
74+
networkName: getNetworkDisplaySymbol(account.symbol),
7575
}}
7676
/>
7777
);

packages/suite/src/components/suite/modals/ReduxModal/ConfirmXpubModal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const ConfirmXpubModal = (
4545
<Translation
4646
id="TR_XPUB_MODAL_TITLE"
4747
values={{
48-
networkSymbol: getNetworkDisplaySymbol(account.symbol),
48+
networkName: getNetworkDisplaySymbol(account.symbol),
4949
accountIndex: `#${account.index + 1}`,
5050
}}
5151
/>

packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeEthInANutshellModal/StakeEthInANutshellModal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export const StakeEthInANutshellModal = ({ onCancel }: StakeEthInANutshellModalP
111111
<Translation
112112
id={translationId}
113113
values={{
114-
networkSymbol: getNetworkDisplaySymbol(account.symbol),
114+
networkDisplaySymbol: getNetworkDisplaySymbol(account.symbol),
115115
count: unstakingPeriod,
116116
}}
117117
/>

packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/ConfirmStakeEthModal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export const ConfirmStakeEthModal = ({
8989
{chunks}
9090
</TrezorLink>
9191
),
92-
networkSymbol: getNetworkDisplaySymbol(account.symbol),
92+
networkDisplaySymbol: getNetworkDisplaySymbol(account.symbol),
9393
}}
9494
/>
9595
</Banner>

packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/Inputs.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export const Inputs = () => {
133133
}
134134
values={{
135135
amount: MIN_ETH_FOR_WITHDRAWALS.toString(),
136-
networkSymbol: displaySymbol,
136+
networkDisplaySymbol: displaySymbol,
137137
}}
138138
/>
139139
</Banner>
@@ -145,7 +145,7 @@ export const Inputs = () => {
145145
id="TR_STAKE_RECOMMENDED_AMOUNT_FOR_WITHDRAWALS"
146146
values={{
147147
amount: MIN_ETH_FOR_WITHDRAWALS.toString(),
148-
networkSymbol: displaySymbol,
148+
networkDisplaySymbol: displaySymbol,
149149
}}
150150
/>
151151
</Banner>

packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/EverstakeModal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const EverstakeModal = ({ onCancel }: EverstakeModalProps) => {
4141
: 'TR_STAKE_BY_STAKING_YOU_CAN_EARN_REWARDS'
4242
}
4343
values={{
44-
networkSymbol: displaySymbol,
44+
networkDisplaySymbol: displaySymbol,
4545
t: text => <strong>{text}</strong>,
4646
}}
4747
/>

packages/suite/src/components/suite/notifications/NotificationRenderer/NotificationRenderer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export const NotificationRenderer = ({
292292
);
293293
case 'successful-claim':
294294
return success(render, notification, 'TOAST_SUCCESSFUL_CLAIM', 'check', {
295-
networkSymbol: getNetworkDisplaySymbol(notification.symbol),
295+
networkDisplaySymbol: getNetworkDisplaySymbol(notification.symbol),
296296
});
297297
case 'firmware-language-changed':
298298
return success(render, notification, 'TR_FIRMWARE_LANGUAGE_CHANGED');

packages/suite/src/support/messages.ts

+22-21
Original file line numberDiff line numberDiff line change
@@ -1425,19 +1425,19 @@ export default defineMessages({
14251425
id: 'TR_COPY_TO_CLIPBOARD',
14261426
},
14271427
TR_ADDRESS_MODAL_TITLE: {
1428-
defaultMessage: '{networkSymbol} receive address',
1428+
defaultMessage: '{networkName} receive address',
14291429
id: 'TR_ADDRESS_MODAL_TITLE',
14301430
},
14311431
TR_ADDRESS_MODAL_TITLE_EXCHANGE: {
1432-
defaultMessage: '{networkCurrencyName} receive address on {networkSymbol} network',
1432+
defaultMessage: '{networkCurrencyName} receive address on {networkName} network',
14331433
id: 'TR_ADDRESS_MODAL_TITLE_EXCHANGE',
14341434
},
14351435
TR_XPUB_MODAL_CLIPBOARD: {
14361436
defaultMessage: 'Copy public key',
14371437
id: 'TR_XPUB_MODAL_CLIPBOARD',
14381438
},
14391439
TR_XPUB_MODAL_TITLE: {
1440-
defaultMessage: '{networkSymbol} Account {accountIndex} public key (XPUB)',
1440+
defaultMessage: '{networkName} Account {accountIndex} public key (XPUB)',
14411441
id: 'TR_XPUB_MODAL_TITLE',
14421442
},
14431443
TR_XPUB_MODAL_TITLE_METADATA: {
@@ -3031,11 +3031,11 @@ export default defineMessages({
30313031
id: 'TR_RECEIVE',
30323032
},
30333033
TR_RECEIVE_NETWORK: {
3034-
defaultMessage: 'Receive {networkSymbol}',
3034+
defaultMessage: 'Receive {networkDisplaySymbol}',
30353035
id: 'TR_RECEIVE_NETWORK',
30363036
},
30373037
TR_BUY_NETWORK: {
3038-
defaultMessage: 'Buy {networkSymbol}',
3038+
defaultMessage: 'Buy {networkDisplaySymbol}',
30393039
id: 'TR_BUY_NETWORK',
30403040
},
30413041
TR_TAPROOT_BANNER_TITLE: {
@@ -4385,7 +4385,7 @@ export default defineMessages({
43854385
},
43864386
RECEIVE_TITLE: {
43874387
id: 'RECEIVE_TITLE',
4388-
defaultMessage: 'Receive {networkSymbol}',
4388+
defaultMessage: 'Receive {networkDisplaySymbol}',
43894389
},
43904390
RECEIVE_DESC_BITCOIN: {
43914391
id: 'RECEIVE_DESC_BITCOIN',
@@ -5486,12 +5486,13 @@ export default defineMessages({
54865486
id: 'AMOUNT_IS_LESS_THAN_RESERVE',
54875487
},
54885488
AMOUNT_NOT_ENOUGH_CURRENCY_FEE: {
5489-
defaultMessage: 'Not enough {networkSymbol} to cover transaction fee',
5489+
defaultMessage: 'Not enough {networkDisplaySymbol} to cover transaction fee',
54905490
id: 'AMOUNT_NOT_ENOUGH_CURRENCY_FEE',
54915491
},
54925492

54935493
AMOUNT_NOT_ENOUGH_CURRENCY_FEE_WITH_ETH_AMOUNT: {
5494-
defaultMessage: 'Not enough {symbol} to cover transaction fee ({feeAmount} {symbol})',
5494+
defaultMessage:
5495+
'Not enough {networkDisplaySymbol} to cover transaction fee ({feeAmount} {networkDisplaySymbol})',
54955496
id: 'AMOUNT_NOT_ENOUGH_CURRENCY_FEE_WITH_ETH_AMOUNT',
54965497
},
54975498
REMAINING_BALANCE_LESS_THAN_RENT: {
@@ -7536,11 +7537,11 @@ export default defineMessages({
75367537
},
75377538
TR_STAKING_CONSOLIDATING_FUNDS: {
75387539
id: 'TR_STAKING_CONSOLIDATING_FUNDS',
7539-
defaultMessage: 'Consolidating your {networkSymbol} for you',
7540+
defaultMessage: 'Consolidating your {networkDisplaySymbol} for you',
75407541
},
75417542
TR_STAKING_YOUR_UNSTAKED_FUNDS: {
75427543
id: 'TR_STAKING_YOUR_UNSTAKED_FUNDS',
7543-
defaultMessage: 'Your unstaked {networkSymbol} is ready',
7544+
defaultMessage: 'Your unstaked {networkDisplaySymbol} is ready',
75447545
},
75457546
TR_RECEIVING_SYMBOL: {
75467547
id: 'TR_RECEIVING_SYMBOL',
@@ -8773,12 +8774,12 @@ export default defineMessages({
87738774
},
87748775
TR_STAKE_IN_ACCOUNT: {
87758776
id: 'TR_STAKE_IN_ACCOUNT',
8776-
defaultMessage: '{networkSymbol} in account',
8777+
defaultMessage: '{networkDisplaySymbol} in account',
87778778
},
87788779
TR_STAKE_STAKED_ETH_AMOUNT_LOCKED: {
87798780
id: 'TR_STAKE_STAKED_ETH_AMOUNT_LOCKED',
87808781
defaultMessage:
8781-
'The staked amount of {networkSymbol} is locked and can’t be traded or sent.',
8782+
'The staked amount of {networkDisplaySymbol} is locked and can’t be traded or sent.',
87828783
},
87838784
TR_STAKE_UNSTAKING_TAKES: {
87848785
id: 'TR_STAKE_UNSTAKING_TAKES',
@@ -8788,7 +8789,7 @@ export default defineMessages({
87888789
TR_STAKE_ETH_REWARDS_EARN: {
87898790
id: 'TR_STAKE_ETH_REWARDS_EARN',
87908791
defaultMessage:
8791-
'Your rewards also earn. Keep them staked and watch your {networkSymbol} rewards soar.',
8792+
'Your rewards also earn. Keep them staked and watch your {networkDisplaySymbol} rewards soar.',
87928793
},
87938794
TR_STAKE_AVAILABLE: {
87948795
id: 'TR_STAKE_AVAILABLE',
@@ -8806,17 +8807,17 @@ export default defineMessages({
88068807
TR_STAKE_LEFT_AMOUNT_FOR_WITHDRAWAL: {
88078808
id: 'TR_STAKE_LEFT_AMOUNT_FOR_WITHDRAWAL',
88088809
defaultMessage:
8809-
'We’ve left {amount} {networkSymbol} out so you can pay for withdrawal fees.',
8810+
'We’ve left {amount} {networkDisplaySymbol} out so you can pay for withdrawal fees.',
88108811
},
88118812
TR_STAKE_LEFT_SMALL_AMOUNT_FOR_WITHDRAWAL: {
88128813
id: 'TR_STAKE_LEFT_SMALL_AMOUNT_FOR_WITHDRAWAL',
88138814
defaultMessage:
8814-
'We’ve left a small amount of {networkSymbol} out so you can pay for withdrawal fees.',
8815+
'We’ve left a small amount of {networkDisplaySymbol} out so you can pay for withdrawal fees.',
88158816
},
88168817
TR_STAKE_RECOMMENDED_AMOUNT_FOR_WITHDRAWALS: {
88178818
id: 'TR_STAKE_RECOMMENDED_AMOUNT_FOR_WITHDRAWALS',
88188819
defaultMessage:
8819-
"It's recommended to leave {amount} {networkSymbol} so you can pay for withdrawal fees.",
8820+
"It's recommended to leave {amount} {networkDisplaySymbol} so you can pay for withdrawal fees.",
88208821
},
88218822
TR_STAKE_CONFIRM_ENTRY_PERIOD: {
88228823
id: 'TR_STAKE_CONFIRM_ENTRY_PERIOD',
@@ -8838,7 +8839,7 @@ export default defineMessages({
88388839
TR_STAKE_ETH_WILL_BE_BLOCKED: {
88398840
id: 'TR_STAKE_ETH_WILL_BE_BLOCKED',
88408841
defaultMessage:
8841-
'Your {networkSymbol} will be blocked during this period, and you can’t cancel this. <a>Learn more</a>',
8842+
'Your {networkDisplaySymbol} will be blocked during this period, and you can’t cancel this. <a>Learn more</a>',
88428843
},
88438844
TR_STAKE_ACKNOWLEDGE_ENTRY_PERIOD: {
88448845
id: 'TR_STAKE_ACKNOWLEDGE_ENTRY_PERIOD',
@@ -8903,7 +8904,7 @@ export default defineMessages({
89038904
TR_STAKE_ETH_REWARDS_EARN_APY: {
89048905
id: 'TR_STAKE_ETH_REWARDS_EARN_APY',
89058906
defaultMessage:
8906-
'Your {networkSymbol} rewards also earn the APY rate. Keep your funds staked or add more to increase your rewards.',
8907+
'Your {networkDisplaySymbol} rewards also earn the APY rate. Keep your funds staked or add more to increase your rewards.',
89078908
},
89088909
TR_STAKE_REWARDS: {
89098910
id: 'TR_STAKE_REWARDS',
@@ -8996,7 +8997,7 @@ export default defineMessages({
89968997
},
89978998
TR_STAKE_MIN_AMOUNT_TOOLTIP: {
89988999
id: 'TR_STAKE_MIN_AMOUNT_TOOLTIP',
8999-
defaultMessage: 'Minimum amount to stake is {amount} {networkSymbol}',
9000+
defaultMessage: 'Minimum amount to stake is {amount} {networkDisplaySymbol}',
90009001
},
90019002
TOAST_TX_STAKED: {
90029003
id: 'TOAST_TX_STAKED',
@@ -9012,7 +9013,7 @@ export default defineMessages({
90129013
},
90139014
TOAST_SUCCESSFUL_CLAIM: {
90149015
id: 'TOAST_SUCCESSFUL_CLAIM',
9015-
defaultMessage: '{networkSymbol} claimed successfully',
9016+
defaultMessage: '{networkDisplaySymbol} claimed successfully',
90169017
},
90179018
TOAST_ESTIMATED_FEE_ERROR: {
90189019
id: 'TOAST_ESTIMATED_FEE_ERROR',
@@ -9050,7 +9051,7 @@ export default defineMessages({
90509051
TR_STAKE_EVERSTAKE_MANAGES: {
90519052
id: 'TR_STAKE_EVERSTAKE_MANAGES',
90529053
defaultMessage:
9053-
'Everstake maintains and protects your staked {networkSymbol} <t>with their smart contracts, infrastructure, and technology.</t>',
9054+
'Everstake maintains and protects your staked {networkDisplaySymbol} <t>with their smart contracts, infrastructure, and technology.</t>',
90549055
},
90559056
TR_STAKE_TREZOR_NO_LIABILITY: {
90569057
id: 'TR_STAKE_TREZOR_NO_LIABILITY',

packages/suite/src/views/wallet/receive/components/Header.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const Header = ({ account }: HeaderProps) => {
1818
const title = (
1919
<Translation
2020
id="RECEIVE_TITLE"
21-
values={{ networkSymbol: getNetworkDisplaySymbol(account.symbol) }}
21+
values={{ networkDisplaySymbol: getNetworkDisplaySymbol(account.symbol) }}
2222
/>
2323
);
2424
if (account.networkType === 'bitcoin') {

packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/StakingCard.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export const StakingCard = ({
171171
<Translation
172172
id="TR_STAKE_ETH_REWARDS_EARN_APY"
173173
values={{
174-
networkSymbol: getNetworkDisplaySymbol(
174+
networkDisplaySymbol: getNetworkDisplaySymbol(
175175
selectedAccount.symbol,
176176
),
177177
}}

packages/suite/src/views/wallet/transactions/components/AccountEmpty.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const AccountEmpty = ({ account }: AccountEmptyProps) => {
5555
children: (
5656
<Translation
5757
id="TR_RECEIVE_NETWORK"
58-
values={{ networkSymbol: displaySymbol }}
58+
values={{ displayNetworkSymbol: displaySymbol }}
5959
/>
6060
),
6161
},
@@ -66,7 +66,7 @@ export const AccountEmpty = ({ account }: AccountEmptyProps) => {
6666
children: (
6767
<Translation
6868
id="TR_BUY_NETWORK"
69-
values={{ networkSymbol: displaySymbol }}
69+
values={{ displayNetworkSymbol: displaySymbol }}
7070
/>
7171
),
7272
},

suite-common/wallet-core/src/send/sendFormEthereumThunks.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export const composeEthereumTransactionFeeLevelsThunk = createThunk<
244244
) {
245245
tx.errorMessage = {
246246
values: {
247-
symbol: getNetworkDisplaySymbol(network.symbol),
247+
networkDisplaySymbol: getNetworkDisplaySymbol(network.symbol),
248248
feeAmount: tx.errorMessage?.values?.feeAmount || '',
249249
},
250250
id: 'AMOUNT_NOT_ENOUGH_CURRENCY_FEE_WITH_ETH_AMOUNT',

0 commit comments

Comments
 (0)