Skip to content

Build your personal knowledge base with Trilium Notes

add translation for all text note options

Nriverc9d0d339eb86
diff --git a/src/public/app/widgets/type_widgets/options/text_notes/heading_style.js b/src/public/app/widgets/type_widgets/options/text_notes/heading_style.js
index cfe22b0a68..5f5a7da28b 100644
--- a/src/public/app/widgets/type_widgets/options/text_notes/heading_style.js
+++ b/src/public/app/widgets/type_widgets/options/text_notes/heading_style.js
@@ -1,13 +1,14 @@
import OptionsWidget from "../options_widget.js";
+import { t } from "../../../../services/i18n.js";
const TPL = `
<div class="options-section">
- <h4>Heading Style</h4>
+ <h4>${t("heading_style.title")}</h4>
<select class="heading-style form-control">
- <option value="plain">Plain</option>
- <option value="underline">Underline</option>
- <option value="markdown">Markdown-style</option>
+ <option value="plain">${t("heading_style.plain")}</option>
+ <option value="underline">${t("heading_style.underline")}</option>
+ <option value="markdown">${t("heading_style.markdown")}</option>
</select>
</div>`;
diff --git a/src/public/app/widgets/type_widgets/options/text_notes/highlights_list.js b/src/public/app/widgets/type_widgets/options/text_notes/highlights_list.js
index 90a931ea6b..7166e4023e 100644
--- a/src/public/app/widgets/type_widgets/options/text_notes/highlights_list.js
+++ b/src/public/app/widgets/type_widgets/options/text_notes/highlights_list.js
@@ -1,25 +1,26 @@
import OptionsWidget from "../options_widget.js";
+import { t } from "../../../../services/i18n.js";
const TPL = `
<div class="options-section">
- <h4>Highlights List</h4>
+ <h4>${t("highlights_list.title")}</h4>
- <p>You can customize the highlights list displayed in the right panel:</p>
+ <p>${t("highlights_list.description")}</p>
</div>
- <label><input type="checkbox" class="highlights-list-check" value="bold"> Bold font &nbsp;</label>
- <label><input type="checkbox" class="highlights-list-check" value="italic"> Italic font &nbsp;</label>
- <label><input type="checkbox" class="highlights-list-check" value="underline"> Underlined font &nbsp;</label>
- <label><input type="checkbox" class="highlights-list-check" value="color"> Font with color &nbsp;</label>
- <label><input type="checkbox" class="highlights-list-check" value="bgColor"> Font with background color &nbsp;</label>
+ <label><input type="checkbox" class="highlights-list-check" value="bold"> ${t("highlights_list.bold")} &nbsp;</label>
+ <label><input type="checkbox" class="highlights-list-check" value="italic"> ${t("highlights_list.italic")} &nbsp;</label>
+ <label><input type="checkbox" class="highlights-list-check" value="underline"> ${t("highlights_list.underline")} &nbsp;</label>
+ <label><input type="checkbox" class="highlights-list-check" value="color"> ${t("highlights_list.color")} &nbsp;</label>
+ <label><input type="checkbox" class="highlights-list-check" value="bgColor"> ${t("highlights_list.bg_color")} &nbsp;</label>
</div>
<br/><br/>
- <h5>Highlights List visibility</h5>
+ <h5>${t("highlights_list.visibility_title")}</h5>
- <p>You can hide the highlights widget per-note by adding a <code>#hideHighlightWidget</code> label.</p>
+ <p>${t("highlights_list.visibility_description")}</p>
- <p>You can configure a keyboard shortcut for quickly toggling the right pane (including Highlights) in the Options -> Shortcuts (name "toggleRightPane").</p>
+ <p>${t("highlights_list.shortcut_info")}</p>
</div>`;
export default class HighlightsListOptions extends OptionsWidget {
diff --git a/src/public/app/widgets/type_widgets/options/text_notes/table_of_contents.js b/src/public/app/widgets/type_widgets/options/text_notes/table_of_contents.js
index 5715cb48f2..6a73b7bea3 100644
--- a/src/public/app/widgets/type_widgets/options/text_notes/table_of_contents.js
+++ b/src/public/app/widgets/type_widgets/options/text_notes/table_of_contents.js
@@ -1,18 +1,19 @@
import OptionsWidget from "../options_widget.js";
+import { t } from "../../../../services/i18n.js";
const TPL = `
<div class="options-section">
- <h4>Table of Contents</h4>
+ <h4>${t("table_of_contents.title")}</h4>
- Table of contents will appear in text notes when the note has more than a defined number of headings. You can customize this number:
+ ${t("table_of_contents.description")}
<div class="form-group">
<input type="number" class="min-toc-headings form-control options-number-input options-number-input" min="0" max="9999999999999999" step="1" />
</div>
- <p>You can also use this option to effectively disable TOC by setting a very high number.</p>
+ <p>${t("table_of_contents.disable_info")}</p>
- <p>You can configure a keyboard shortcut for quickly toggling the right pane (including TOC) in the Options -> Shortcuts (name "toggleRightPane").</p>
+ <p>${t("table_of_contents.shortcut_info")}</p>
</div>`;
export default class TableOfContentsOptions extends OptionsWidget {
diff --git a/src/public/app/widgets/type_widgets/options/text_notes/text_auto_read_only_size.js b/src/public/app/widgets/type_widgets/options/text_notes/text_auto_read_only_size.js
index 28be14b8d1..5b858df135 100644
--- a/src/public/app/widgets/type_widgets/options/text_notes/text_auto_read_only_size.js
+++ b/src/public/app/widgets/type_widgets/options/text_notes/text_auto_read_only_size.js
@@ -1,13 +1,14 @@
import OptionsWidget from "../options_widget.js";
+import { t } from "../../../../services/i18n.js";
const TPL = `
<div class="options-section">
- <h4>Automatic Read-Only Size</h4>
+ <h4>${t("text_auto_read_only_size.title")}</h4>
- <p>Automatic read-only note size is the size after which notes will be displayed in a read-only mode (for performance reasons).</p>
+ <p>${t("text_auto_read_only_size.description")}</p>
<div class="form-group">
- <label>Automatic read-only size (text notes)</label>
+ <label>${t("text_auto_read_only_size.label")}</label>
<input class="auto-readonly-size-text form-control options-number-input" type="number" min="0">
</div>
</div>`;
diff --git a/src/public/translations/cn/translation.json b/src/public/translations/cn/translation.json
index e06342b19c..8893b962af 100644
--- a/src/public/translations/cn/translation.json
+++ b/src/public/translations/cn/translation.json
@@ -1085,5 +1085,34 @@
"tray": {
"title": "托盘",
"enable_tray": "启用托盘图标(需要重启生效)"
+ },
+ "heading_style": {
+ "title": "标题风格",
+ "plain": "纯文本",
+ "underline": "下划线",
+ "markdown": "Markdown风格"
+ },
+ "highlights_list": {
+ "title": "高亮列表",
+ "description": "您可以自定义右侧面板中显示的高亮列表:",
+ "bold": "粗体字",
+ "italic": "斜体字",
+ "underline": "下划线字体",
+ "color": "彩色字体",
+ "bg_color": "带背景色的字体",
+ "visibility_title": "高亮列表可见性",
+ "visibility_description": "您可以通过添加 #hideHighlightWidget 标签来隐藏每个笔记的高亮小部件。",
+ "shortcut_info": "您可以在选项 -> 快捷键中为快速切换右侧面板(包括高亮列表)配置键盘快捷键(名称为 'toggleRightPane')。"
+ },
+ "table_of_contents": {
+ "title": "目录",
+ "description": "当笔记中有超过一定数量的标题时,显示目录。您可以自定义此数量:",
+ "disable_info": "您可以设置一个非常大的数来禁用目录。",
+ "shortcut_info": "您可以在 “选项” -> “快捷键” 中配置一个键盘快捷键,以便快速切换右侧面板(包括目录)(名称为 'toggleRightPane')。"
+ },
+ "text_auto_read_only_size": {
+ "title": "自动只读大小",
+ "description": "自动只读笔记大小是超过该大小后,笔记将以只读模式显示(出于性能考虑)。",
+ "label": "自动只读大小(文本笔记)"
}
}
diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json
index f530302a7e..ec7d7f662b 100644
--- a/src/public/translations/en/translation.json
+++ b/src/public/translations/en/translation.json
@@ -1086,5 +1086,34 @@
"tray": {
"title": "Tray",
"enable_tray": "Enable tray (Trilium needs to be restarted for this change to take effect)"
+ },
+ "heading_style": {
+ "title": "Heading Style",
+ "plain": "Plain",
+ "underline": "Underline",
+ "markdown": "Markdown-style"
+ },
+ "highlights_list": {
+ "title": "Highlights List",
+ "description": "You can customize the highlights list displayed in the right panel:",
+ "bold": "Bold font",
+ "italic": "Italic font",
+ "underline": "Underlined font",
+ "color": "Font with color",
+ "bg_color": "Font with background color",
+ "visibility_title": "Highlights List visibility",
+ "visibility_description": "You can hide the highlights widget per-note by adding a #hideHighlightWidget label.",
+ "shortcut_info": "You can configure a keyboard shortcut for quickly toggling the right pane (including Highlights) in the Options -> Shortcuts (name 'toggleRightPane')."
+ },
+ "table_of_contents": {
+ "title": "Table of Contents",
+ "description": "Table of contents will appear in text notes when the note has more than a defined number of headings. You can customize this number:",
+ "disable_info": "You can also use this option to effectively disable TOC by setting a very high number.",
+ "shortcut_info": "You can configure a keyboard shortcut for quickly toggling the right pane (including TOC) in the Options -> Shortcuts (name 'toggleRightPane')."
+ },
+ "text_auto_read_only_size": {
+ "title": "Automatic Read-Only Size",
+ "description": "Automatic read-only note size is the size after which notes will be displayed in a read-only mode (for performance reasons).",
+ "label": "Automatic read-only size (text notes)"
}
}