add translation for all code note options

This commit is contained in:
Nriver 2024-08-09 13:46:26 +08:00
parent b78ac44e73
commit 38f19e21f0
6 changed files with 44 additions and 8 deletions

View File

@ -1,13 +1,14 @@
import { t } from "../../../../services/i18n.js";
import OptionsWidget from "../options_widget.js";
const TPL = `
<div class="options-section">
<h4>Automatic Read-Only Size</h4>
<h4>${t('code_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('code_auto_read_only_size.description')}</p>
<div class="form-group">
<label>Automatic read-only size (code notes)</label>
<label>${t('code_auto_read_only_size.label')}</label>
<input class="auto-readonly-size-code form-control options-number-input" type="number" min="0">
</div>
</div>`;

View File

@ -1,9 +1,10 @@
import { t } from "../../../../services/i18n.js";
import OptionsWidget from "../options_widget.js";
import mimeTypesService from "../../../../services/mime_types.js";
const TPL = `
<div class="options-section">
<h4>Available MIME types in the dropdown</h4>
<h4>${t('code_mime_types.title')}</h4>
<ul class="options-mime-types" style="list-style-type: none;"></ul>
</div>`;

View File

@ -1,11 +1,12 @@
import OptionsWidget from "../options_widget.js";
import { t } from "../../../../services/i18n.js";
const TPL = `
<div class="options-section">
<h4>Use vim keybindings in code notes (no ex mode)</h4>
<h4>${t('vim_key_bindings.use_vim_keybindings_in_code_notes')}</h4>
<label>
<input type="checkbox" class="vim-keymap-enabled">
Enable Vim Keybindings
${t('vim_key_bindings.enable_vim_keybindings')}
</label>
</div>`;

View File

@ -1,11 +1,12 @@
import OptionsWidget from "../options_widget.js";
import { t } from "../../../../services/i18n.js";
const TPL = `
<div class="options-section">
<h4>Wrap lines in code notes</h4>
<h4>${t("wrap_lines.wrap_lines_in_code_notes")}</h4>
<label>
<input type="checkbox" class="line-wrap-enabled">
Enable Line Wrap (change might need a frontend reload to take effect)
${t("wrap_lines.enable_line_wrap")}
</label>
</div>`;

View File

@ -1018,5 +1018,21 @@
"zoom_factor": {
"title": "缩放系数(仅桌面客户端有效)",
"description": "缩放也可以通过 CTRL+- 和 CTRL+= 快捷键进行控制。"
},
"code_auto_read_only_size": {
"title": "自动只读大小",
"description": "自动只读大小是指笔记超过设置的大小后自动设置为只读模式(为性能考虑)。",
"label": "自动只读大小(代码笔记)"
},
"code_mime_types": {
"title": "下拉菜单可用的MIME文件类型"
},
"vim_key_bindings": {
"use_vim_keybindings_in_code_notes": "在代码笔记中使用Vim键绑定无ex模式",
"enable_vim_keybindings": "启用Vim键绑定"
},
"wrap_lines": {
"wrap_lines_in_code_notes": "代码笔记自动换行",
"enable_line_wrap": "启用自动换行(需要重新加载前端才会生效)"
}
}

View File

@ -1019,5 +1019,21 @@
"zoom_factor": {
"title": "Zoom Factor (desktop build only)",
"description": "Zooming can be controlled with CTRL+- and CTRL+= shortcuts as well."
},
"code_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 (code notes)"
},
"code_mime_types": {
"title": "Available MIME types in the dropdown"
},
"vim_key_bindings": {
"use_vim_keybindings_in_code_notes": "Use vim keybindings in code notes (no ex mode)",
"enable_vim_keybindings": "Enable Vim Keybindings"
},
"wrap_lines": {
"wrap_lines_in_code_notes": "Wrap lines in code notes",
"enable_line_wrap": "Enable Line Wrap (change might need a frontend reload to take effect)"
}
}