diff --git a/src/public/app/widgets/type_widgets/render.js b/src/public/app/widgets/type_widgets/render.js index 9c694385f..91e699414 100644 --- a/src/public/app/widgets/type_widgets/render.js +++ b/src/public/app/widgets/type_widgets/render.js @@ -1,5 +1,6 @@ import renderService from "../../services/render.js"; import TypeWidget from "./type_widget.js"; +import { t } from "../../services/i18n.js"; const TPL = `
@@ -10,9 +11,9 @@ const TPL = `
-

This help note is shown because this note of type Render HTML doesn't have required relation to function properly.

+

${t("render.note_detail_render_help_1")}

-

Render HTML note type is used for scripting. 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 relation called "renderNote" pointing to the HTML note to render.

+

${t("render.note_detail_render_help_2")}

diff --git a/src/public/app/widgets/type_widgets/web_view.js b/src/public/app/widgets/type_widgets/web_view.js index 34e8fa65c..717392d26 100644 --- a/src/public/app/widgets/type_widgets/web_view.js +++ b/src/public/app/widgets/type_widgets/web_view.js @@ -1,18 +1,19 @@ +import { t } from "../../services/i18n.js"; import TypeWidget from "./type_widget.js"; import attributeService from "../../services/attributes.js"; const TPL = `
-

Web View

+

${t("web_view.web_view")}

-

Note of type Web View allow you to embed websites into Trilium.

+

${t("web_view.embed_websites")}

-

To start, please create a label with a URL address you want to embed, e.g. #webViewSrc="http://www.google.com"

+

${t("web_view.create_label")}

-

Disclaimer on the experimental status

+

${t("web_view.disclaimer")}

-

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.

+

${t("web_view.experimental_note")}

@@ -42,8 +43,7 @@ export default class WebViewTypeWidget extends TypeWidget { this.$noteDetailWebViewContent .show() .attr("src", webViewSrc); - } - else { + } else { this.$noteDetailWebViewContent.hide(); this.$noteDetailWebViewHelp.show(); } diff --git a/src/public/translations/cn/translation.json b/src/public/translations/cn/translation.json index 0745da583..47882d3e7 100644 --- a/src/public/translations/cn/translation.json +++ b/src/public/translations/cn/translation.json @@ -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": "渲染笔记类型用于编写 脚本。简单说就是你可以写HTML代码(或者加上一些JavaScript代码), 然后这个笔记会把页面渲染出来。要使其正常工作,您需要定义一个名为 \"renderNote\" 的关系 关系 指向要呈现的 HTML 笔记。" + }, + "web_view": { + "web_view": "网页视图", + "embed_websites": "网页视图类型的笔记允许您将网站嵌入到 Trilium 中。", + "create_label": "首先,请创建一个带有您要嵌入的 URL 地址的标签,例如 #webViewSrc=\"https://www.bing.com\"", + "disclaimer": "实验性功能免责声明", + "experimental_note": "网页视图是一种实验性的笔记类型,将来可能会被移除或大幅更改。网页视图只在桌面端有效。" } } diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json index 4c361e63c..a79cbf843 100644 --- a/src/public/translations/en/translation.json +++ b/src/public/translations/en/translation.json @@ -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 scripting. 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 relation 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." } }