mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 18:50:41 +01:00
add translation for 2 type widgets
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import renderService from "../../services/render.js";
|
||||
import TypeWidget from "./type_widget.js";
|
||||
import { t } from "../../services/i18n.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="note-detail-render note-detail-printable">
|
||||
@@ -10,9 +11,9 @@ const TPL = `
|
||||
</style>
|
||||
|
||||
<div class="note-detail-render-help alert alert-warning" style="margin: 50px; padding: 20px;">
|
||||
<p><strong>This help note is shown because this note of type Render HTML doesn't have required relation to function properly.</strong></p>
|
||||
<p><strong>${t("render.note_detail_render_help_1")}</strong></p>
|
||||
|
||||
<p>Render HTML note type is used for <a class="external" href="https://github.com/TriliumNext/Docs/blob/main/Wiki/scripts.md">scripting</a>. In short, you have a HTML code note (optionally with some JavaScript) and this note will render it. To make it work, you need to define a <a class="external" href="https://github.com/TriliumNext/Docs/blob/main/Wiki/attributes.md">relation</a> called "renderNote" pointing to the HTML note to render.</p>
|
||||
<p>${t("render.note_detail_render_help_2")}</p>
|
||||
</div>
|
||||
|
||||
<div class="note-detail-render-content"></div>
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
import { t } from "../../services/i18n.js";
|
||||
import TypeWidget from "./type_widget.js";
|
||||
import attributeService from "../../services/attributes.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="note-detail-web-view note-detail-printable" style="height: 100%">
|
||||
<div class="note-detail-web-view-help alert alert-warning" style="margin: 50px; padding: 20px 20px 0px 20px;">
|
||||
<h4>Web View</h4>
|
||||
<h4>${t("web_view.web_view")}</h4>
|
||||
|
||||
<p>Note of type Web View allow you to embed websites into Trilium.</p>
|
||||
<p>${t("web_view.embed_websites")}</p>
|
||||
|
||||
<p>To start, please create a label with a URL address you want to embed, e.g. <code>#webViewSrc="http://www.google.com"</code></p>
|
||||
<p>${t("web_view.create_label")}</p>
|
||||
|
||||
<h4>Disclaimer on the experimental status</h4>
|
||||
<h4>${t("web_view.disclaimer")}</h4>
|
||||
|
||||
<p>Web View is an experimental note type, and it might be removed or substantially changed in the future. Web View works also only in the desktop build.</p>
|
||||
<p>${t("web_view.experimental_note")}</p>
|
||||
</div>
|
||||
|
||||
<webview class="note-detail-web-view-content"></webview>
|
||||
@@ -42,8 +43,7 @@ export default class WebViewTypeWidget extends TypeWidget {
|
||||
this.$noteDetailWebViewContent
|
||||
.show()
|
||||
.attr("src", webViewSrc);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this.$noteDetailWebViewContent.hide();
|
||||
this.$noteDetailWebViewHelp.show();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user