Skip to content

Commit

Permalink
(android) Clean up and streamline translations (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpad85 committed Dec 21, 2023
1 parent 3ba72ca commit 51a8e52
Show file tree
Hide file tree
Showing 11 changed files with 111 additions and 282 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ private fun DetailsForLightningOutgoingPayment(
InvoiceSection(paymentRequest = details.paymentRequest)
}
is LightningOutgoingPayment.Details.SwapOut -> {
TechnicalRowSelectable(label = stringResource(id = R.string.paymentdetails_swapout_address_label), value = details.address)
TechnicalRowSelectable(label = stringResource(id = R.string.paymentdetails_bitcoin_address_label), value = details.address)
TechnicalRowSelectable(label = stringResource(id = R.string.paymentdetails_payment_hash_label), value = details.paymentHash.toHex())
}
is LightningOutgoingPayment.Details.KeySend -> {
Expand All @@ -329,15 +329,15 @@ private fun DetailsForChannelClose(
payment: ChannelCloseOutgoingPayment
) {
TechnicalRowSelectable(
label = stringResource(id = R.string.paymentdetails_closing_channel_label),
label = stringResource(id = R.string.paymentdetails_channel_id_label),
value = payment.channelId.toHex()
)
TechnicalRowSelectable(
label = stringResource(id = R.string.paymentdetails_closing_address_label),
label = stringResource(id = R.string.paymentdetails_bitcoin_address_label),
value = payment.address
)
TechnicalRow(
label = stringResource(id = R.string.paymentdetails_closing_tx_label),
label = stringResource(id = R.string.paymentdetails_tx_id_label),
content = { TransactionLinkButton(txId = payment.txId) }
)
TechnicalRowSelectable(
Expand All @@ -357,7 +357,7 @@ private fun DetailsForCpfp(
payment: SpliceCpfpOutgoingPayment
) {
TechnicalRow(
label = stringResource(id = R.string.paymentdetails_splice_cpfp_transaction_label),
label = stringResource(id = R.string.paymentdetails_tx_id_label),
content = { TransactionLinkButton(txId = payment.txId) }
)
}
Expand Down Expand Up @@ -385,11 +385,11 @@ private fun DetailsForSpliceOut(
value = payment.channelId.toHex()
)
TechnicalRowSelectable(
label = stringResource(id = R.string.paymentdetails_splice_out_address_label),
label = stringResource(id = R.string.paymentdetails_bitcoin_address_label),
value = payment.address
)
TechnicalRow(
label = stringResource(id = R.string.paymentdetails_splice_out_tx_label),
label = stringResource(id = R.string.paymentdetails_tx_id_label),
content = { TransactionLinkButton(txId = payment.txId) }
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private fun RequestLiquidityBottomSection(
LeaseEstimationView(amountRequested = amount, leaseFees = state.fees, actualFeerate = state.actualFeerate)
Spacer(modifier = Modifier.height(24.dp))
if (state.fees.serviceFee + state.fees.miningFee.toMilliSatoshi() > balance) {
ErrorMessage(header = "Total fees exceed your balance")
ErrorMessage(header = stringResource(id = R.string.liquidityads_over_balance))
} else {
FilledButton(
text = stringResource(id = R.string.liquidityads_request_button),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fun ImportChannelsData(
DefaultScreenLayout {
DefaultScreenHeader(onBackClick = onBackClick, title = stringResource(id = R.string.channelimport_title))
Card(internalPadding = PaddingValues(16.dp)) {
Text(text = stringResource(id = R.string.legacy_channels_import_instructions))
Text(text = stringResource(id = R.string.channelimport_instructions))
Spacer(modifier = Modifier.height(24.dp))
TextInput(
text = dataInput,
Expand Down Expand Up @@ -115,7 +115,7 @@ fun ImportChannelsData(
header = stringResource(id = R.string.channelimport_error_title),
details = when (result) {
is ChannelsImportResult.Failure.Generic -> result.error.message
is ChannelsImportResult.Failure.MalformedData -> stringResource(id = R.string.channelimport_error_decryption)
is ChannelsImportResult.Failure.MalformedData -> stringResource(id = R.string.channelimport_error_malformed)
is ChannelsImportResult.Failure.DecryptionError -> stringResource(id = R.string.channelimport_error_decryption)
is ChannelsImportResult.Failure.UnknownVersion -> stringResource(id = R.string.channelimport_error_unknown_version, result.version)
},
Expand Down
Loading

0 comments on commit 51a8e52

Please sign in to comment.