mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-28 10:32:27 +08:00
feat(i18n): translate unable to render note type
This commit is contained in:
parent
dadda026fb
commit
f86d9b11b1
@ -4,6 +4,7 @@ import assetPath from "../services/asset_path.js";
|
|||||||
import shareRoot from "./share_root.js";
|
import shareRoot from "./share_root.js";
|
||||||
import escapeHtml from "escape-html";
|
import escapeHtml from "escape-html";
|
||||||
import type SNote from "./shaca/entities/snote.js";
|
import type SNote from "./shaca/entities/snote.js";
|
||||||
|
import { t } from "i18next";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the output of the content renderer.
|
* Represents the output of the content renderer.
|
||||||
@ -43,7 +44,7 @@ function getContent(note: SNote) {
|
|||||||
} else if (note.type === "book") {
|
} else if (note.type === "book") {
|
||||||
result.isEmpty = true;
|
result.isEmpty = true;
|
||||||
} else {
|
} else {
|
||||||
result.content = "<p>This note type cannot be displayed.</p>";
|
result.content = `<p>${t("content_renderer.note-cannot-be-displayed")}</p>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -250,5 +250,8 @@
|
|||||||
"backend_log": {
|
"backend_log": {
|
||||||
"log-does-not-exist": "The backend log file '{{ fileName }}' does not exist (yet).",
|
"log-does-not-exist": "The backend log file '{{ fileName }}' does not exist (yet).",
|
||||||
"reading-log-failed": "Reading the backend log file '{{ fileName }}' failed."
|
"reading-log-failed": "Reading the backend log file '{{ fileName }}' failed."
|
||||||
|
},
|
||||||
|
"content_renderer": {
|
||||||
|
"note-cannot-be-displayed": "This note type cannot be displayed."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -251,5 +251,8 @@
|
|||||||
},
|
},
|
||||||
"geo-map": {
|
"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."
|
"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."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user