mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
add translation for 2 type widgets
This commit is contained in:
parent
01f99d7f12
commit
9885abc626
@ -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();
|
||||
}
|
||||
|
@ -915,5 +915,16 @@
|
||||
"enter_title_of_new_note": "输入新笔记的标题",
|
||||
"default_new_note_title": "新笔记",
|
||||
"click_on_canvas_to_place_new_note": "点击画布以放置新笔记"
|
||||
},
|
||||
"render": {
|
||||
"note_detail_render_help_1": "之所以显示此帮助说明,是因为该类型的渲染HTML没有设置好必须的关联关系。",
|
||||
"note_detail_render_help_2": "渲染笔记类型用于编写 <a class=\"external\" href=\"https://github.com/TriliumNext/Docs/blob/main/Wiki/scripts.md\">脚本</a>。简单说就是你可以写HTML代码(或者加上一些JavaScript代码), 然后这个笔记会把页面渲染出来。要使其正常工作,您需要定义一个名为 \"renderNote\" 的关系 <a class=\"external\" href=\"https://github.com/TriliumNext/Docs/blob/main/Wiki/attributes.md\">关系</a> 指向要呈现的 HTML 笔记。"
|
||||
},
|
||||
"web_view": {
|
||||
"web_view": "网页视图",
|
||||
"embed_websites": "网页视图类型的笔记允许您将网站嵌入到 Trilium 中。",
|
||||
"create_label": "首先,请创建一个带有您要嵌入的 URL 地址的标签,例如 #webViewSrc=\"https://www.bing.com\"",
|
||||
"disclaimer": "实验性功能免责声明",
|
||||
"experimental_note": "网页视图是一种实验性的笔记类型,将来可能会被移除或大幅更改。网页视图只在桌面端有效。"
|
||||
}
|
||||
}
|
||||
|
@ -916,5 +916,16 @@
|
||||
"enter_title_of_new_note": "Enter title of new note",
|
||||
"default_new_note_title": "new note",
|
||||
"click_on_canvas_to_place_new_note": "Click on canvas to place new note"
|
||||
},
|
||||
"render": {
|
||||
"note_detail_render_help_1": "This help note is shown because this note of type Render HTML doesn't have required relation to function properly.",
|
||||
"note_detail_render_help_2": "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."
|
||||
},
|
||||
"web_view": {
|
||||
"web_view": "Web View",
|
||||
"embed_websites": "Note of type Web View allows you to embed websites into Trilium.",
|
||||
"create_label": "To start, please create a label with a URL address you want to embed, e.g. #webViewSrc=\"https://www.google.com\"",
|
||||
"disclaimer": "Disclaimer on the experimental status",
|
||||
"experimental_note": "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."
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user