Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix(i18n): extract pay form amount labels into own localizable string
Browse files Browse the repository at this point in the history
address '"onchain" and "in channels" on the Pay screen' issue in #3045
  • Loading branch information
bolatovumar committed Oct 26, 2019
1 parent e876168 commit c74ebef
Show file tree
Hide file tree
Showing 36 changed files with 84 additions and 76 deletions.
20 changes: 14 additions & 6 deletions renderer/components/Pay/Pay.js
Original file line number Diff line number Diff line change
Expand Up @@ -736,14 +736,22 @@ class Pay extends React.Component {
<FormattedMessage {...messages.current_balance} />:
</Text>
<Text fontSize="xs" textAlign="center">
<CryptoValue value={walletBalanceConfirmed} />
{` `}
{cryptoUnitName} <FormattedMessage {...messages.onchain_label} />
<FormattedMessage
{...messages.onchain_balance}
values={{
amount: <CryptoValue value={walletBalanceConfirmed} />,
cryptoUnitName,
}}
/>
</Text>
<Text fontSize="xs" textAlign="center">
<CryptoValue value={channelBalance} />
{` `}
{cryptoUnitName} <FormattedMessage {...messages.in_channels_label} />
<FormattedMessage
{...messages.lightning_balance}
values={{
amount: <CryptoValue value={channelBalance} />,
cryptoUnitName,
}}
/>
</Text>
</React.Fragment>
)}
Expand Down
4 changes: 2 additions & 2 deletions renderer/components/Pay/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ export default defineMessages({
sweep_funds: 'Send all of your funds',
description:
'Paste a Lightning Payment Request or a {chain} address in the field below to send {chain} ({ticker}) through the Lightning Network or make an On-Chain Transaction.',
in_channels_label: '(in channels)',
onchain_label: '(onchain)',
onchain_balance: '{amount} {cryptoUnitName} (onchain)',
lightning_balance: '{amount} {cryptoUnitName} (in channels)',
})
4 changes: 2 additions & 2 deletions translations/af-ZA.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "",
"components.Pay.fee_upto": "",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "",
"components.Pay.next": "",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "",
"components.Pay.request_label_onchain": "",
Expand Down
4 changes: 2 additions & 2 deletions translations/ar-SA.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "",
"components.Pay.fee_upto": "",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "",
"components.Pay.next": "",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "",
"components.Pay.request_label_onchain": "",
Expand Down
4 changes: 2 additions & 2 deletions translations/bg-BG.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "",
"components.Pay.fee_upto": "",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "Бележка",
"components.Pay.next": "",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "",
"components.Pay.request_label_onchain": "",
Expand Down
4 changes: 2 additions & 2 deletions translations/ca-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "",
"components.Pay.fee_upto": "",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "",
"components.Pay.next": "",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "",
"components.Pay.request_label_onchain": "",
Expand Down
4 changes: 2 additions & 2 deletions translations/cs-CZ.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "Odečteno z celkového počtu",
"components.Pay.fee_unknown": "neznámý",
"components.Pay.fee_upto": "až do {maxFee} satoshi",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "Poznámka",
"components.Pay.next": "Další",
"components.Pay.next_block_confirmation": "další potvrzení bloku",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "Žádost o platbu nebo adresa",
"components.Pay.request_label_offchain": "Žádost o platbu",
"components.Pay.request_label_onchain": "Adresa",
Expand Down
4 changes: 2 additions & 2 deletions translations/da-DK.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "ukendt",
"components.Pay.fee_upto": "op til {maxFee} satoshi",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "Notat",
"components.Pay.next": "Næste",
"components.Pay.next_block_confirmation": "næste blok bekæftelse",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "Betalings Anmodning eller Adresse",
"components.Pay.request_label_offchain": "Betalings Anmodning",
"components.Pay.request_label_onchain": "Adresse",
Expand Down
4 changes: 2 additions & 2 deletions translations/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "Vom Totalen abgezogen",
"components.Pay.fee_unknown": "unbekannt",
"components.Pay.fee_upto": "bis zu {maxFee} satoshi",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "Memo",
"components.Pay.next": "Weiter",
"components.Pay.next_block_confirmation": "nächste Blockbestätigung",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "Zahlungsanforderung oder Adresse",
"components.Pay.request_label_offchain": "Zahlungsanfrage",
"components.Pay.request_label_onchain": "Adresse",
Expand Down
4 changes: 2 additions & 2 deletions translations/el-GR.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "",
"components.Pay.fee_upto": "",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "Τιμολόγιο",
"components.Pay.next": "",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "",
"components.Pay.request_label_onchain": "",
Expand Down
4 changes: 2 additions & 2 deletions translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "Deducted from total",
"components.Pay.fee_unknown": "unknown",
"components.Pay.fee_upto": "up to {maxFee} satoshi",
"components.Pay.in_channels_label": "(in channels)",
"components.Pay.lightning_balance": "{amount} {cryptoUnitName} (in channels)",
"components.Pay.memo": "Memo",
"components.Pay.next": "Next",
"components.Pay.next_block_confirmation": "next block confirmation",
"components.Pay.onchain_label": "(onchain)",
"components.Pay.onchain_balance": "{amount} {cryptoUnitName} (onchain)",
"components.Pay.request_label_combined": "Payment Request or Address",
"components.Pay.request_label_offchain": "Payment Request",
"components.Pay.request_label_onchain": "Address",
Expand Down
4 changes: 2 additions & 2 deletions translations/es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "Deducido del total",
"components.Pay.fee_unknown": "desconocido",
"components.Pay.fee_upto": "hasta {maxFee} satoshi",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "Memorándum",
"components.Pay.next": "Proximo",
"components.Pay.next_block_confirmation": "próxima confirmación de bloque",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "Solicitud de Pago o Dirección",
"components.Pay.request_label_offchain": "Solicitud de Pago",
"components.Pay.request_label_onchain": "Dirección",
Expand Down
4 changes: 2 additions & 2 deletions translations/fi-FI.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "",
"components.Pay.fee_upto": "",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "",
"components.Pay.next": "",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "",
"components.Pay.request_label_onchain": "",
Expand Down
4 changes: 2 additions & 2 deletions translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "Déduits du total",
"components.Pay.fee_unknown": "inconnu",
"components.Pay.fee_upto": "jusqu'à {maxFee} satoshis",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "Note",
"components.Pay.next": "Continuer",
"components.Pay.next_block_confirmation": "confirmation au prochain bloc",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "Demande de paiement ou adresse",
"components.Pay.request_label_offchain": "Demande de paiement",
"components.Pay.request_label_onchain": "Adresse",
Expand Down
4 changes: 2 additions & 2 deletions translations/ga-IE.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "Asbhainte ón iomlán",
"components.Pay.fee_unknown": "",
"components.Pay.fee_upto": "",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "Meabhrán",
"components.Pay.next": "",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "",
"components.Pay.request_label_onchain": "",
Expand Down
4 changes: 2 additions & 2 deletions translations/he-IL.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "",
"components.Pay.fee_upto": "",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "תזכיר",
"components.Pay.next": "",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "",
"components.Pay.request_label_onchain": "",
Expand Down
4 changes: 2 additions & 2 deletions translations/hi-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "",
"components.Pay.fee_upto": "",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "",
"components.Pay.next": "",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "",
"components.Pay.request_label_onchain": "",
Expand Down
4 changes: 2 additions & 2 deletions translations/hr-HR.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "nepoznat",
"components.Pay.fee_upto": "najviše {maxFee} satošija",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "Bilješka",
"components.Pay.next": "Slijedeće",
"components.Pay.next_block_confirmation": "potvrda u slijedećem bloku",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "Zahtjev za plaćanjem ili adresa",
"components.Pay.request_label_offchain": "Zahtjev za plaćanjem",
"components.Pay.request_label_onchain": "Adresa",
Expand Down
4 changes: 2 additions & 2 deletions translations/hu-HU.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "",
"components.Pay.fee_upto": "",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "",
"components.Pay.next": "",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "",
"components.Pay.request_label_onchain": "",
Expand Down
4 changes: 2 additions & 2 deletions translations/it-IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "",
"components.Pay.fee_upto": "",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "",
"components.Pay.next": "",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "",
"components.Pay.request_label_onchain": "",
Expand Down
4 changes: 2 additions & 2 deletions translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "",
"components.Pay.fee_upto": "",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "メモ",
"components.Pay.next": "",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "",
"components.Pay.request_label_onchain": "",
Expand Down
4 changes: 2 additions & 2 deletions translations/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "",
"components.Pay.fee_upto": "",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "",
"components.Pay.next": "",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "",
"components.Pay.request_label_onchain": "",
Expand Down
4 changes: 2 additions & 2 deletions translations/nl-NL.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "",
"components.Pay.fee_upto": "",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "",
"components.Pay.next": "",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "",
"components.Pay.request_label_onchain": "",
Expand Down
4 changes: 2 additions & 2 deletions translations/no-NO.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "ukjent",
"components.Pay.fee_upto": "opp til {maxFee} satoshi",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "Beskjed",
"components.Pay.next": "Neste",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "Betalingsforespørsel",
"components.Pay.request_label_onchain": "Adresse",
Expand Down
4 changes: 2 additions & 2 deletions translations/pl-PL.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "",
"components.Pay.fee_upto": "",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "Notatka",
"components.Pay.next": "",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "",
"components.Pay.request_label_onchain": "",
Expand Down
4 changes: 2 additions & 2 deletions translations/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "",
"components.Pay.fee_upto": "",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "",
"components.Pay.next": "",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "",
"components.Pay.request_label_onchain": "",
Expand Down
4 changes: 2 additions & 2 deletions translations/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@
"components.Pay.fee_subtraction": "",
"components.Pay.fee_unknown": "",
"components.Pay.fee_upto": "",
"components.Pay.in_channels_label": "",
"components.Pay.lightning_balance": "",
"components.Pay.memo": "",
"components.Pay.next": "",
"components.Pay.next_block_confirmation": "",
"components.Pay.onchain_label": "",
"components.Pay.onchain_balance": "",
"components.Pay.request_label_combined": "",
"components.Pay.request_label_offchain": "",
"components.Pay.request_label_onchain": "",
Expand Down
Loading

0 comments on commit c74ebef

Please sign in to comment.