Replaced hard coded text with resource strings

Added new translations for cs/de/se
Corrected "occurred"
This commit is contained in:
David Kaspar
2023-07-30 17:44:18 +01:00
parent 6acfaa97f3
commit 2e8760abe5
7 changed files with 29 additions and 9 deletions
@@ -120,7 +120,7 @@ fun RelaySelectionDialog(
val selectedRelays = relays.filter { it.isSelected }
if (selectedRelays.isEmpty()) {
scope.launch {
Toast.makeText(context, "Select a relay to continue", Toast.LENGTH_SHORT).show()
Toast.makeText(context, context.getString(R.string.select_a_relay_to_continue), Toast.LENGTH_SHORT).show()
}
return@PostButton
}
@@ -149,7 +149,7 @@ fun CashuPreview(token: CashuToken, accountViewModel: AccountViewModel) {
scope.launch {
Toast.makeText(
context,
"No Lightning Address set",
context.getString(R.string.no_lightning_address_set),
Toast.LENGTH_SHORT
).show()
}
@@ -180,7 +180,7 @@ fun CashuPreview(token: CashuToken, accountViewModel: AccountViewModel) {
var orignaltoken = token.token
clipboardManager.setText(AnnotatedString("$orignaltoken"))
scope.launch {
Toast.makeText(context, "Copied token to clipboard", Toast.LENGTH_SHORT).show()
Toast.makeText(context, context.getString(R.string.copied_token_to_clipboard), Toast.LENGTH_SHORT).show()
}
}
},
@@ -1015,7 +1015,7 @@ fun DisplayLNAddress(
scope.launch {
Toast.makeText(
context,
"Payment Successful", // Turn this into a UI animation
context.getString(R.string.payment_successful), // Turn this into a UI animation
Toast.LENGTH_LONG
).show()
}
@@ -1025,7 +1025,7 @@ fun DisplayLNAddress(
context,
response.error?.message
?: response.error?.code?.toString()
?: "Error parsing error message",
?: context.getString(R.string.error_parsing_error_message),
Toast.LENGTH_LONG
).show()
}