feat(i18n): translate unknown content widget message

This commit is contained in:
Elian Doran 2025-03-02 21:17:04 +02:00
parent 67509bc92f
commit 43d8affcc8
No known key found for this signature in database
3 changed files with 8 additions and 1 deletions

View File

@ -39,6 +39,7 @@ import EditorOptions from "./options/text_notes/editor.js";
import ShareSettingsOptions from "./options/other/share_settings.js"; import ShareSettingsOptions from "./options/other/share_settings.js";
import type FNote from "../../entities/fnote.js"; import type FNote from "../../entities/fnote.js";
import type NoteContextAwareWidget from "../note_context_aware_widget.js"; import type NoteContextAwareWidget from "../note_context_aware_widget.js";
import { t } from "i18next";
const TPL = `<div class="note-detail-content-widget note-detail-printable"> const TPL = `<div class="note-detail-content-widget note-detail-printable">
<style> <style>
@ -119,7 +120,7 @@ export default class ContentWidgetTypeWidget extends TypeWidget {
await widget.refresh(); await widget.refresh();
} }
} else { } else {
this.$content.append(`Unknown widget for "${note.noteId}"`); this.$content.append(t("content_widget.unknown_widget", { id: note.noteId }));
} }
} }
} }

View File

@ -1682,5 +1682,8 @@
"tomorrow": "Tomorrow", "tomorrow": "Tomorrow",
"yesterday": "Yesterday" "yesterday": "Yesterday"
} }
},
"content_widget": {
"unknown_widget": "Unknown widget for \"{{id}}\"."
} }
} }

View File

@ -1685,5 +1685,8 @@
"tomorrow": "Mâine", "tomorrow": "Mâine",
"yesterday": "Ieri" "yesterday": "Ieri"
} }
},
"content_widget": {
"unknown_widget": "Nu s-a putut găsi widget-ul corespunzător pentru „{{id}}”."
} }
} }