add translation for all text note options

This commit is contained in:
Nriver
2024-08-09 14:48:54 +08:00
parent d6aa4d26dd
commit c9d0d339eb
6 changed files with 83 additions and 21 deletions

View File

@@ -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>`;

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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>`;