diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/uploads/RecordingIndicators.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/uploads/RecordingIndicators.kt
index 76125fdad..9b81d710f 100644
--- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/uploads/RecordingIndicators.kt
+++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/uploads/RecordingIndicators.kt
@@ -49,6 +49,8 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
+import com.vitorpamplona.amethyst.R
+import com.vitorpamplona.amethyst.ui.stringRes
/**
* Animated expanding circles that pulse outward from the recording button
@@ -176,6 +178,9 @@ fun FloatingRecordingIndicator(
) {
if (!isRecording) return
+ val recordingLabel = stringRes(id = R.string.recording_indicator_description)
+ val recordingWithTime = stringRes(id = R.string.recording_indicator_with_time, formatSecondsToTime(elapsedSeconds))
+
Box(
modifier =
modifier
@@ -207,7 +212,7 @@ fun FloatingRecordingIndicator(
Icon(
imageVector = Icons.Default.FiberManualRecord,
- contentDescription = "Recording",
+ contentDescription = recordingLabel,
tint = Color.White,
modifier =
Modifier
@@ -216,7 +221,7 @@ fun FloatingRecordingIndicator(
)
Text(
- text = "Recording ${formatSecondsToTime(elapsedSeconds)}",
+ text = recordingWithTime,
color = Color.White,
fontSize = 14.sp,
fontWeight = FontWeight.Medium,
diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/ShortNotePostViewModel.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/ShortNotePostViewModel.kt
index a477ddd95..8b671c856 100644
--- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/ShortNotePostViewModel.kt
+++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/ShortNotePostViewModel.kt
@@ -965,6 +965,14 @@ open class ShortNotePostViewModel :
onError: (title: String, message: String) -> Unit,
) {
val recording = voiceRecording ?: return
+ val appContext = Amethyst.instance.appContext
+ val uploadErrorTitle = stringRes(appContext, R.string.upload_error_title)
+ val uploadVoiceNip95NotSupported = stringRes(appContext, R.string.upload_error_voice_message_nip95_not_supported)
+ val uploadVoiceFailed = stringRes(appContext, R.string.upload_error_voice_message_failed)
+ val uploadVoiceUnexpected = stringRes(appContext, R.string.upload_error_voice_message_unexpected_state)
+ val uploadVoiceExceptionMessage: (String) -> String = { detail ->
+ stringRes(appContext, R.string.upload_error_voice_message_exception, detail)
+ }
isUploadingVoice = true
@@ -982,7 +990,7 @@ open class ShortNotePostViewModel :
compressionQuality = CompressorQuality.UNCOMPRESSED,
server = server,
account = account,
- context = Amethyst.instance.appContext,
+ context = appContext,
useH265 = false,
)
@@ -1006,20 +1014,20 @@ open class ShortNotePostViewModel :
is UploadOrchestrator.OrchestratorResult.NIP95Result -> {
// For NIP95, we need to create the event and get the nevent URL
// This is handled differently - skip for now
- onError("Upload Error", "NIP95 not yet supported for voice messages")
+ onError(uploadErrorTitle, uploadVoiceNip95NotSupported)
}
}
}
is UploadingState.Error -> {
- onError("Upload Error", "Failed to upload voice message")
+ onError(uploadErrorTitle, uploadVoiceFailed)
voiceRecording = null
}
else -> {
- onError("Upload Error", "Unexpected upload state")
+ onError(uploadErrorTitle, uploadVoiceUnexpected)
}
}
} catch (e: Exception) {
- onError("Upload Error", e.message ?: e.javaClass.simpleName)
+ onError(uploadErrorTitle, uploadVoiceExceptionMessage(e.message ?: e.javaClass.simpleName))
voiceRecording = null
} finally {
isUploadingVoice = false
diff --git a/amethyst/src/main/res/values-cs-rCZ/strings.xml b/amethyst/src/main/res/values-cs-rCZ/strings.xml
index 4578cac80..26e878db3 100644
--- a/amethyst/src/main/res/values-cs-rCZ/strings.xml
+++ b/amethyst/src/main/res/values-cs-rCZ/strings.xml
@@ -1176,4 +1176,12 @@
Broadcast sady doporučení
Smazat seznam
Smazat sadu doporučení
+ Nahrávání
+ Nahrávání %1$s
+ Chyba nahrávání
+ Nepodařilo se nahrát hlasovou zprávu
+ Neočekávaný stav nahrávání
+ NIP-95 zatím není pro hlasové zprávy podporován
+ Nahrávání hlasu selhalo: %1$s
+
diff --git a/amethyst/src/main/res/values-de-rDE/strings.xml b/amethyst/src/main/res/values-de-rDE/strings.xml
index 02887615c..3afa6ac9d 100644
--- a/amethyst/src/main/res/values-de-rDE/strings.xml
+++ b/amethyst/src/main/res/values-de-rDE/strings.xml
@@ -1181,4 +1181,12 @@ anz der Bedingungen ist erforderlich
Empfehlungspaket veröffentlichen
Liste löschen
Empfehlungspaket löschen
+ Aufnahme
+ Aufnahme %1$s
+ Upload-Fehler
+ Sprachnachricht konnte nicht hochgeladen werden
+ Unerwarteter Upload-Status
+ NIP-95 wird für Sprachnachrichten noch nicht unterstützt
+ Sprach-Upload fehlgeschlagen: %1$s
+
diff --git a/amethyst/src/main/res/values-pt-rBR/strings.xml b/amethyst/src/main/res/values-pt-rBR/strings.xml
index be0152b9b..09490718a 100644
--- a/amethyst/src/main/res/values-pt-rBR/strings.xml
+++ b/amethyst/src/main/res/values-pt-rBR/strings.xml
@@ -1176,4 +1176,12 @@
Transmitir pacote de recomendações
Excluir lista
Excluir pacote de recomendações
+ Gravando
+ Gravando %1$s
+ Erro de upload
+ Falha ao enviar mensagem de voz
+ Estado de upload inesperado
+ O NIP-95 ainda não é suportado para mensagens de voz
+ Falha no upload de voz: %1$s
+
diff --git a/amethyst/src/main/res/values-sv-rSE/strings.xml b/amethyst/src/main/res/values-sv-rSE/strings.xml
index 435c7b261..cfa126897 100644
--- a/amethyst/src/main/res/values-sv-rSE/strings.xml
+++ b/amethyst/src/main/res/values-sv-rSE/strings.xml
@@ -1175,4 +1175,12 @@
Sänd rekommendationspaket
Ta bort lista
Ta bort rekommendationspaket
+ Spelar in
+ Spelar in %1$s
+ Uppladdningsfel
+ Misslyckades med att ladda upp röstmeddelandet
+ Oväntat uppladdningstillstånd
+ NIP-95 stöds ännu inte för röstmeddelanden
+ Uppladdning av röst misslyckades: %1$s
+
diff --git a/amethyst/src/main/res/values/strings.xml b/amethyst/src/main/res/values/strings.xml
index 61221bc95..8db1152f4 100644
--- a/amethyst/src/main/res/values/strings.xml
+++ b/amethyst/src/main/res/values/strings.xml
@@ -170,7 +170,14 @@
Record a message
Record a message
Click and hold to record a message
+ Recording
+ Recording %1$s
Uploading…
+ Upload Error
+ Failed to upload voice message
+ Unexpected upload state
+ NIP-95 is not supported for voice messages yet
+ Voice upload failed: %1$s
User does not have a lightning address set up to receive sats
"reply here.. "
Copies the Note ID to the clipboard for sharing in Nostr