feat(i18n): translate unable to render note type

This commit is contained in:
Elian Doran 2025-01-29 18:37:02 +02:00
parent dadda026fb
commit f86d9b11b1
No known key found for this signature in database
3 changed files with 8 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import assetPath from "../services/asset_path.js";
import shareRoot from "./share_root.js";
import escapeHtml from "escape-html";
import type SNote from "./shaca/entities/snote.js";
import { t } from "i18next";
/**
* Represents the output of the content renderer.
@ -43,7 +44,7 @@ function getContent(note: SNote) {
} else if (note.type === "book") {
result.isEmpty = true;
} else {
result.content = "<p>This note type cannot be displayed.</p>";
result.content = `<p>${t("content_renderer.note-cannot-be-displayed")}</p>`;
}
return result;

View File

@ -250,5 +250,8 @@
"backend_log": {
"log-does-not-exist": "The backend log file '{{ fileName }}' does not exist (yet).",
"reading-log-failed": "Reading the backend log file '{{ fileName }}' failed."
},
"content_renderer": {
"note-cannot-be-displayed": "This note type cannot be displayed."
}
}

View File

@ -251,5 +251,8 @@
},
"geo-map": {
"create-child-note-instruction": "Clic pe hartă pentru a crea o nouă notiță la acea poziție sau apăsați Escape pentru a renunța."
},
"content_renderer": {
"note-cannot-be-displayed": "Acest tip de notiță nu poate fi afișat."
}
}