mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 10:15:52 +01:00
add translation for all other options
This commit is contained in:
@@ -1,21 +1,22 @@
|
||||
import OptionsWidget from "../options_widget.js";
|
||||
import server from "../../../../services/server.js";
|
||||
import toastService from "../../../../services/toast.js";
|
||||
import { t } from "../../../../services/i18n.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="options-section">
|
||||
<h4>Attachment Erasure Timeout</h4>
|
||||
<h4>${t("attachment_erasure_timeout.attachment_erasure_timeout")}</h4>
|
||||
|
||||
<p>Attachments get automatically deleted (and erased) if they are not referenced by their note anymore after a defined time out.</p>
|
||||
<p>${t("attachment_erasure_timeout.attachment_auto_deletion_description")}</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Erase attachments after X seconds of not being used in its note</label>
|
||||
<label>${t("attachment_erasure_timeout.erase_attachments_after_x_seconds")}</label>
|
||||
<input class="erase-unused-attachments-after-time-in-seconds form-control options-number-input" type="number" min="0">
|
||||
</div>
|
||||
|
||||
<p>You can also trigger erasing manually (without considering the timeout defined above):</p>
|
||||
<p>${t("attachment_erasure_timeout.manual_erasing_description")}</p>
|
||||
|
||||
<button class="erase-unused-attachments-now-button btn">Erase unused attachment notes now</button>
|
||||
<button class="erase-unused-attachments-now-button btn">${t("attachment_erasure_timeout.erase_unused_attachments_now")}</button>
|
||||
</div>`;
|
||||
|
||||
export default class AttachmentErasureTimeoutOptions extends OptionsWidget {
|
||||
@@ -27,7 +28,7 @@ export default class AttachmentErasureTimeoutOptions extends OptionsWidget {
|
||||
this.$eraseUnusedAttachmentsNowButton = this.$widget.find(".erase-unused-attachments-now-button");
|
||||
this.$eraseUnusedAttachmentsNowButton.on('click', () => {
|
||||
server.post('notes/erase-unused-attachments-now').then(() => {
|
||||
toastService.showMessage("Unused attachments have been erased.");
|
||||
toastService.showMessage(t("attachment_erasure_timeout.unused_attachments_erased"));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import OptionsWidget from "../options_widget.js";
|
||||
import { t } from "../../../../services/i18n.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="options-section">
|
||||
<h4>Network Connections</h4>
|
||||
<h4>${t("network_connections.network_connections_title")}</h4>
|
||||
|
||||
<label>
|
||||
<input class="check-for-updates" type="checkbox" name="check-for-updates">
|
||||
Check for updates automatically
|
||||
${t("network_connections.check_for_updates")}
|
||||
</label>
|
||||
</div>`;
|
||||
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
import OptionsWidget from "../options_widget.js";
|
||||
import server from "../../../../services/server.js";
|
||||
import toastService from "../../../../services/toast.js";
|
||||
import { t } from "../../../../services/i18n.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="options-section">
|
||||
<h4>Note Erasure Timeout</h4>
|
||||
<h4>${t("note_erasure_timeout.note_erasure_timeout_title")}</h4>
|
||||
|
||||
<p>Deleted notes (and attributes, revisions...) are at first only marked as deleted and it is possible to recover them
|
||||
from Recent Notes dialog. After a period of time, deleted notes are "erased" which means
|
||||
their content is not recoverable anymore. This setting allows you to configure the length
|
||||
of the period between deleting and erasing the note.</p>
|
||||
<p>${t("note_erasure_timeout.note_erasure_description")}</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Erase notes after X seconds</label>
|
||||
<label>${t("note_erasure_timeout.erase_notes_after_x_seconds")}</label>
|
||||
<input class="erase-entities-after-time-in-seconds form-control options-number-input" type="number" min="0">
|
||||
</div>
|
||||
|
||||
<p>You can also trigger erasing manually (without considering the timeout defined above):</p>
|
||||
<p>${t("note_erasure_timeout.manual_erasing_description")}</p>
|
||||
|
||||
<button class="erase-deleted-notes-now-button btn">Erase deleted notes now</button>
|
||||
<button class="erase-deleted-notes-now-button btn">${t("note_erasure_timeout.erase_deleted_notes_now")}</button>
|
||||
</div>`;
|
||||
|
||||
export default class NoteErasureTimeoutOptions extends OptionsWidget {
|
||||
@@ -30,7 +28,7 @@ export default class NoteErasureTimeoutOptions extends OptionsWidget {
|
||||
this.$eraseDeletedNotesButton = this.$widget.find(".erase-deleted-notes-now-button");
|
||||
this.$eraseDeletedNotesButton.on('click', () => {
|
||||
server.post('notes/erase-deleted-notes-now').then(() => {
|
||||
toastService.showMessage("Deleted notes have been erased.");
|
||||
toastService.showMessage(t("note_erasure_timeout.deleted_notes_erased"));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import OptionsWidget from "../options_widget.js";
|
||||
import { t } from "../../../../services/i18n.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="options-section">
|
||||
<h4>Note Revisions Snapshot Interval</h4>
|
||||
<h4>${t("revisions_snapshot_interval.note_revisions_snapshot_interval_title")}</h4>
|
||||
|
||||
<p>Note revision snapshot time interval is time in seconds after which a new note revision will be created for the note. See <a href="https://github.com/TriliumNext/Docs/blob/main/Wiki/note-revisions.md" class="external">wiki</a> for more info.</p>
|
||||
<p>${t("revisions_snapshot_interval.note_revisions_snapshot_description")}</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Note revision snapshot time interval (in seconds)</label>
|
||||
<label>${t("revisions_snapshot_interval.snapshot_time_interval_label")}</label>
|
||||
<input class="revision-snapshot-time-interval-in-seconds form-control options-number-input" type="number" min="10">
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
@@ -1,35 +1,36 @@
|
||||
import OptionsWidget from "../options_widget.js";
|
||||
import utils from "../../../../services/utils.js";
|
||||
import { t } from "../../../../services/i18n.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="options-section">
|
||||
<h4>Search Engine</h4>
|
||||
<h4>${t("search_engine.title")}</h4>
|
||||
|
||||
<p>Custom search engine requires both a name and a URL to be set. If either of these is not set, DuckDuckGo will be used as the default search engine.</p>
|
||||
<p>${t("search_engine.custom_search_engine_info")}</p>
|
||||
|
||||
<form class="sync-setup-form">
|
||||
<div class="form-group">
|
||||
<label>Predefined search engine templates</label>
|
||||
<label>${t("search_engine.predefined_templates_label")}</label>
|
||||
<select class="predefined-search-engine-select form-control">
|
||||
<option value="Bing">Bing</option>
|
||||
<option value="Baidu">Baidu</option>
|
||||
<option value="DuckDuckGo">Duckduckgo</option>
|
||||
<option value="Google">Google</option>
|
||||
<option value="Bing">${t("search_engine.bing")}</option>
|
||||
<option value="Baidu">${t("search_engine.baidu")}</option>
|
||||
<option value="DuckDuckGo">${t("search_engine.duckduckgo")}</option>
|
||||
<option value="Google">${t("search_engine.google")}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Custom search engine name</label>
|
||||
<input type="text" class="custom-search-engine-name form-control" placeholder="Customize search engine name">
|
||||
<label>${t("search_engine.custom_name_label")}</label>
|
||||
<input type="text" class="custom-search-engine-name form-control" placeholder="${t("search_engine.custom_name_placeholder")}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Custom search engine URL should include <code>{keyword}</code> as a placeholder for the search term.</label>
|
||||
<input type="text" class="custom-search-engine-url form-control" placeholder="Customize search engine url">
|
||||
<label>${t("search_engine.custom_url_label")}</label>
|
||||
<input type="text" class="custom-search-engine-url form-control" placeholder="${t("search_engine.custom_url_placeholder")}">
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between;">
|
||||
<button class="btn btn-primary">Save</button>
|
||||
<button class="btn btn-primary">${t("search_engine.save_button")}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>`;
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import OptionsWidget from "../options_widget.js";
|
||||
import { t } from "../../../../services/i18n.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="options-section">
|
||||
<h4>Tray</h4>
|
||||
<h4>${t("tray.title")}</h4>
|
||||
|
||||
<label>
|
||||
<input type="checkbox" class="tray-enabled">
|
||||
Enable tray (Trilium needs to be restarted for this change to take effect)
|
||||
${t("tray.enable_tray")}
|
||||
</label>
|
||||
</div>`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user