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