Skip to content

Speakr is a personal, self-hosted web application designed for transcribing audio recordings

Python

i18n: add missing keys (buttons.send, recovery modal); warn once per missing key

Murtaza Nasir4c491fe48908
diff --git a/static/js/i18n.js b/static/js/i18n.js
index 78acb7bd..1af59649 100644
--- a/static/js/i18n.js
+++ b/static/js/i18n.js
@@ -118,7 +118,14 @@ class I18n {
}
if (!translation) {
- console.warn(`Translation not found for key: ${key}`);
+ // Warn ONCE per missing key. Without this, a missing key used in a
+ // component that re-renders rapidly (e.g. the chat modal during a
+ // drag) floods the console with the same warning every frame.
+ if (!this._warnedMissingKeys) this._warnedMissingKeys = new Set();
+ if (!this._warnedMissingKeys.has(key)) {
+ this._warnedMissingKeys.add(key);
+ console.warn(`Translation not found for key: ${key}`);
+ }
return key; // Return the key itself as fallback
}
diff --git a/static/locales/en.json b/static/locales/en.json
index a3a4d70d..765e2e80 100644
--- a/static/locales/en.json
+++ b/static/locales/en.json
@@ -315,6 +315,7 @@
"clearCompleted": "Clear completed uploads",
"clearSearchText": "Clear search text",
"close": "Close",
+ "send": "Send",
"copy": "Copy",
"copyMessage": "Copy message",
"copyNotes": "Copy notes",
@@ -655,7 +656,8 @@
"shareTarget_too_large": "The shared audio file is larger than Speakr's upload limit.",
"shareTarget_save_failed": "Speakr could not save the shared audio. Please try uploading directly.",
"shareTarget_queue_failed": "The shared audio was saved but could not be queued for transcription.",
- "recordingFinalizeFallback": "Server-side stitch failed; uploading as a single file instead."
+ "recordingFinalizeFallback": "Server-side stitch failed; uploading as a single file instead.",
+ "recordingNotResumable": "That recording can no longer be resumed."
},
"eventExtraction": {
"description": "When enabled, the AI will identify meetings, appointments, and deadlines mentioned in your recordings and create downloadable calendar events.",
@@ -1261,6 +1263,10 @@
"recoveryDescription": "We found an unfinished recording from a previous session. Would you like to restore it?",
"recoveryFound": "Unsaved Recording Detected",
"recoveryTitle": "Recover Recording",
+ "recoveryServerFound": "In-progress recording found on the server",
+ "recoveryServerDescription": "A recording from this browser was still being saved on the server. You can finish processing it now, or discard it.",
+ "recoveryChunksUploaded": "Chunks uploaded",
+ "recoveryFinishProcessing": "Finish processing",
"restoreRecording": "Restore",
"resumeRecording": "Resume",
"saveRecording": "Save Recording",