translate 5 more dialogs and refine some translation

This commit is contained in:
Nriver 2024-07-23 17:38:22 +08:00
parent cb9b4c07e5
commit 935e882f3e
8 changed files with 330 additions and 116 deletions

View File

@ -6,7 +6,7 @@ import froca from "../../services/froca.js";
import branchService from "../../services/branches.js";
import appContext from "../../components/app_context.js";
import BasicWidget from "../basic_widget.js";
import { t } from "../../services/i18n.js"; // Added import for i18n
import { t } from "../../services/i18n.js";
const TPL = `
<div class="clone-to-dialog modal mx-auto" tabindex="-1" role="dialog">

View File

@ -1,4 +1,5 @@
import BasicWidget from "../basic_widget.js";
import { t } from "../../services/i18n.js";
const DELETE_NOTE_BUTTON_CLASS = "confirm-dialog-delete-note";
@ -7,7 +8,7 @@ const TPL = `
<div class="modal-dialog modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title mr-auto">Confirmation</h5>
<h5 class="modal-title mr-auto">${t('confirm.confirmation')}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
@ -19,11 +20,11 @@ const TPL = `
<div class="confirm-dialog-custom"></div>
</div>
<div class="modal-footer">
<button class="confirm-dialog-cancel-button btn btn-sm">Cancel</button>
<button class="confirm-dialog-cancel-button btn btn-sm">${t('confirm.cancel')}</button>
&nbsp;
<button class="confirm-dialog-ok-button btn btn-primary btn-sm">OK</button>
<button class="confirm-dialog-ok-button btn btn-primary btn-sm">${t('confirm.ok')}</button>
</div>
</div>
</div>
@ -82,7 +83,7 @@ export default class ConfirmDialog extends BasicWidget {
showConfirmDeleteNoteBoxWithNoteDialogEvent({title, callback}) {
glob.activeDialog = this.$widget;
this.$confirmContent.text(`Are you sure you want to remove the note "${title}" from relation map?`);
this.$confirmContent.text(`${t('confirm.are_you_sure_remove_note', {title: title})}`);
this.$custom.empty()
.append("<br/>")
@ -92,13 +93,13 @@ export default class ConfirmDialog extends BasicWidget {
$("<label>")
.addClass("form-check-label")
.attr("style", "text-decoration: underline dotted var(--main-text-color)")
.attr("title", "If you don't check this, the note will be only removed from the relation map.")
.attr("title", `${t('confirm.if_you_dont_check')}`)
.append(
$("<input>")
.attr("type", "checkbox")
.addClass(`form-check-input ${DELETE_NOTE_BUTTON_CLASS}`)
)
.append("Also delete the note")
.append(`${t('confirm.also_delete_note')}`)
));
this.$custom.show();

View File

@ -3,13 +3,14 @@ import froca from "../../services/froca.js";
import linkService from "../../services/link.js";
import utils from "../../services/utils.js";
import BasicWidget from "../basic_widget.js";
import { t } from "../../services/i18n.js";
const TPL = `
<div class="delete-notes-dialog modal mx-auto" tabindex="-1" role="dialog">
<div class="modal-dialog modal-dialog-scrollable modal-xl" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title mr-auto">Delete notes preview</h4>
<h4 class="modal-title mr-auto">${t('delete_notes.delete_notes_preview')}</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
@ -20,42 +21,42 @@ const TPL = `
<label>
<input class="delete-all-clones" value="1" type="checkbox">
delete also all clones (can be undone in recent changes)
${t('delete_notes.delete_all_clones_description')}
</label>
</div>
<div class="checkbox">
<label title="Normal (soft) deletion only marks the notes as deleted and they can be undeleted (in recent changes dialog) within a period of time. Checking this option will erase the notes immediately and it won't be possible to undelete the notes.">
<label title="${t('delete_notes.erase_notes_description')}">
<input class="erase-notes" value="1" type="checkbox">
erase notes permanently (can't be undone), including all clones. This will force application reload.
${t('delete_notes.erase_notes_warning')}
</label>
</div>
<div class="delete-notes-list-wrapper">
<h4>Following notes will be deleted (<span class="deleted-notes-count"></span>)</h4>
<h4>${t('delete_notes.notes_to_be_deleted')} (<span class="deleted-notes-count"></span>)</h4>
<ul class="delete-notes-list" style="max-height: 200px; overflow: auto;"></ul>
</div>
<div class="no-note-to-delete-wrapper alert alert-info">
No note will be deleted (only clones).
${t('delete_notes.no_note_to_delete')}
</div>
<div class="broken-relations-wrapper">
<div class="alert alert-danger">
<h4>Following relations will be broken and deleted (<span class="broke-relations-count"></span>)</h4>
<h4>${t('delete_notes.broken_relations_to_be_deleted')} (<span class="broke-relations-count"></span>)</h4>
<ul class="broken-relations-list" style="max-height: 200px; overflow: auto;"></ul>
</div>
</div>
</div>
<div class="modal-footer">
<button class="delete-notes-dialog-cancel-button btn btn-sm">Cancel</button>
<button class="delete-notes-dialog-cancel-button btn btn-sm">${t('delete_notes.cancel')}</button>
&nbsp;
<button class="delete-notes-dialog-ok-button btn btn-primary btn-sm">OK</button>
<button class="delete-notes-dialog-ok-button btn btn-primary btn-sm">${t('delete_notes.ok')}</button>
</div>
</div>
</div>
@ -135,9 +136,9 @@ export default class DeleteNotesDialog extends BasicWidget {
for (const attr of response.brokenRelations) {
this.$brokenRelationsList.append(
$("<li>")
.append(`Note `)
.append(`${t('delete_notes.note')} `)
.append(await linkService.createLink(attr.value))
.append(` (to be deleted) is referenced by relation <code>${attr.name}</code> originating from `)
.append(` ${t('delete_notes.to_be_deleted', {attrName: attr.name})} `)
.append(await linkService.createLink(attr.noteId))
);
}

View File

@ -5,6 +5,7 @@ import toastService from "../../services/toast.js";
import froca from "../../services/froca.js";
import openService from "../../services/open.js";
import BasicWidget from "../basic_widget.js";
import { t } from "../../services/i18n.js";
const TPL = `
<div class="export-dialog modal fade mx-auto" tabindex="-1" role="dialog">
@ -32,8 +33,8 @@ const TPL = `
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Export note "<span class="export-note-title"></span>"</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<h5 class="modal-title">${t('export.export_note_title', { noteTitle: '<span class="export-note-title"></span>' })}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="${t('export.close')}">
<span aria-hidden="true">&times;</span>
</button>
</div>
@ -42,7 +43,7 @@ const TPL = `
<div class="form-check">
<label class="form-check-label">
<input class="export-type-subtree form-check-input" type="radio" name="export-type" value="subtree">
this note and all of its descendants
${t('export.export_type_subtree')}
</label>
</div>
@ -50,21 +51,21 @@ const TPL = `
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="radio" name="export-subtree-format" value="html">
HTML in ZIP archive - this is recommended since this preserves all the formatting.
${t('export.format_html')}
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="radio" name="export-subtree-format" value="markdown">
Markdown - this preserves most of the formatting.
${t('export.format_markdown')}
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="radio" name="export-subtree-format" value="opml">
OPML - outliner interchange format for text only. Formatting, images and files are not included.
${t('export.format_opml')}
</label>
</div>
@ -72,14 +73,14 @@ const TPL = `
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="radio" name="opml-version" value="1.0">
OPML v1.0 - plain text only
${t('export.opml_version_1')}
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="radio" name="opml-version" value="2.0">
OMPL v2.0 - allows also HTML
${t('export.opml_version_2')}
</label>
</div>
</div>
@ -88,7 +89,7 @@ const TPL = `
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="radio" name="export-type" value="single">
only this note without its descendants
${t('export.export_type_single')}
</label>
</div>
@ -96,20 +97,20 @@ const TPL = `
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="radio" name="export-single-format" value="html">
HTML - this is recommended since this preserves all the formatting.
${t('export.format_html')}
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="radio" name="export-single-format" value="markdown">
Markdown - this preserves most of the formatting.
${t('export.format_markdown')}
</label>
</div>
</div>
</div>
<div class="modal-footer">
<button class="export-button btn btn-primary">Export</button>
<button class="export-button btn btn-primary">${t('export.export')}</button>
</div>
</form>
</div>
@ -141,8 +142,7 @@ export default class ExportDialog extends BasicWidget {
const exportType = this.$widget.find("input[name='export-type']:checked").val();
if (!exportType) {
// this shouldn't happen as we always choose a default export type
toastService.showError("Choose export type first please");
toastService.showError(t('export.choose_export_type'));
return;
}
@ -189,14 +189,12 @@ export default class ExportDialog extends BasicWidget {
}
async showExportDialogEvent({notePath, defaultType}) {
// each opening of the dialog resets the taskId, so we don't associate it with previous exports anymore
this.taskId = '';
this.$exportButton.removeAttr("disabled");
if (defaultType === 'subtree') {
this.$subtreeType.prop("checked", true).trigger('change');
// to show/hide OPML versions
this.$widget.find("input[name=export-subtree-format]:checked").trigger('change');
}
else if (defaultType === 'single') {
@ -228,7 +226,7 @@ export default class ExportDialog extends BasicWidget {
ws.subscribeToMessages(async message => {
const makeToast = (id, message) => ({
id: id,
title: "Export status",
title: t('export.export_status'),
message: message,
icon: "arrow-square-up-right"
});
@ -242,10 +240,10 @@ ws.subscribeToMessages(async message => {
toastService.showError(message.message);
}
else if (message.type === 'taskProgressCount') {
toastService.showPersistent(makeToast(message.taskId, `Export in progress: ${message.progressCount}`));
toastService.showPersistent(makeToast(message.taskId, t('export.export_in_progress', { progressCount: message.progressCount })));
}
else if (message.type === 'taskSucceeded') {
const toast = makeToast(message.taskId, "Export finished successfully.");
const toast = makeToast(message.taskId, t('export.export_finished_successfully'));
toast.closeAfter = 5000;
toastService.showPersistent(toast);

View File

@ -1,14 +1,15 @@
import utils from "../../services/utils.js";
import BasicWidget from "../basic_widget.js";
import { t } from "../../services/i18n.js";
const TPL = `
<div class="help-dialog modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document" style="min-width: 100%; height: 100%; margin: 0;">
<div class="modal-content" style="height: auto;">
<div class="modal-header">
<h5 class="modal-title mr-auto">Help (full documentation is available <a class="external" href="https://github.com/zadam/trilium/wiki">online</a>)</h5>
<h5 class="modal-title mr-auto">${t('help.fullDocumentation')}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<button type="button" class="close" data-dismiss="modal" aria-label="${t('help.close')}">
<span aria-hidden="true">&times;</span>
</button>
</div>
@ -16,18 +17,18 @@ const TPL = `
<div class="card-columns help-cards">
<div class="card">
<div class="card-body">
<h5 class="card-title">Note navigation</h5>
<h5 class="card-title">${t('help.noteNavigation')}</h5>
<p class="card-text">
<ul>
<li><kbd>UP</kbd>, <kbd>DOWN</kbd> - go up/down in the list of notes</li>
<li><kbd>LEFT</kbd>, <kbd>RIGHT</kbd> - collapse/expand node</li>
<li><kbd data-command="backInNoteHistory">not set</kbd>, <kbd data-command="forwardInNoteHistory">not set</kbd> - go back / forwards in the history</li>
<li><kbd data-command="jumpToNote">not set</kbd> - show <a class="external" href="https://github.com/zadam/trilium/wiki/Note-navigation#jump-to-note">"Jump to" dialog</a></li>
<li><kbd data-command="scrollToActiveNote">not set</kbd> - scroll to active note</li>
<li><kbd>Backspace</kbd> - jump to parent note</li>
<li><kbd data-command="collapseTree">not set</kbd> - collapse whole note tree</li>
<li><kbd data-command="collapseSubtree">not set</kbd> - collapse sub-tree</li>
<li><kbd>UP</kbd>, <kbd>DOWN</kbd> - ${t('help.goUpDown')}</li>
<li><kbd>LEFT</kbd>, <kbd>RIGHT</kbd> - ${t('help.collapseExpand')}</li>
<li><kbd data-command="backInNoteHistory">${t('help.notSet')}</kbd>, <kbd data-command="forwardInNoteHistory">${t('help.notSet')}</kbd> - ${t('help.goBackForwards')}</li>
<li><kbd data-command="jumpToNote">${t('help.notSet')}</kbd> - ${t('help.showJumpToNoteDialog')}</li>
<li><kbd data-command="scrollToActiveNote">${t('help.notSet')}</kbd> - ${t('help.scrollToActiveNote')}</li>
<li><kbd>Backspace</kbd> - ${t('help.jumpToParentNote')}</li>
<li><kbd data-command="collapseTree">${t('help.notSet')}</kbd> - ${t('help.collapseWholeTree')}</li>
<li><kbd data-command="collapseSubtree">${t('help.notSet')}</kbd> - ${t('help.collapseSubTree')}</li>
</ul>
</p>
</div>
@ -35,19 +36,19 @@ const TPL = `
<div class="card">
<div class="card-body">
<h5 class="card-title">Tab shortcuts</h5>
<h5 class="card-title">${t('help.tabShortcuts')}</h5>
<p class="card-text">
<ul>
<li><kbd>CTRL+click</kbd> (or middle mouse click) on note link opens note in a new tab</li>
<li><kbd>CTRL+click</kbd> ${t('help.newTabNoteLink')}</li>
</ul>
Only in desktop (electron build):
${t('help.onlyInDesktop')}:
<ul>
<li><kbd data-command="openNewTab">not set</kbd> open empty tab</li>
<li><kbd data-command="closeActiveTab">not set</kbd> close active tab</li>
<li><kbd data-command="activateNextTab">not set</kbd> activate next tab</li>
<li><kbd data-command="activatePreviousTab">not set</kbd> activate previous tab</li>
<li><kbd data-command="openNewTab">${t('help.notSet')}</kbd> ${t('help.openEmptyTab')}</li>
<li><kbd data-command="closeActiveTab">${t('help.notSet')}</kbd> ${t('help.closeActiveTab')}</li>
<li><kbd data-command="activateNextTab">${t('help.notSet')}</kbd> ${t('help.activateNextTab')}</li>
<li><kbd data-command="activatePreviousTab">${t('help.notSet')}</kbd> ${t('help.activatePreviousTab')}</li>
</ul>
</p>
</div>
@ -55,13 +56,13 @@ const TPL = `
<div class="card">
<div class="card-body">
<h5 class="card-title">Creating notes</h5>
<h5 class="card-title">${t('help.creatingNotes')}</h5>
<p class="card-text">
<ul>
<li><kbd data-command="createNoteAfter">not set</kbd> - create new note after the active note</li>
<li><kbd data-command="createNoteInto">not set</kbd> - create new sub-note into active note</li>
<li><kbd data-command="editBranchPrefix">not set</kbd> - edit <a class="external" href="https://github.com/zadam/trilium/wiki/Tree concepts#prefix">prefix</a> of active note clone</li>
<li><kbd data-command="createNoteAfter">${t('help.notSet')}</kbd> - ${t('help.createNoteAfter')}</li>
<li><kbd data-command="createNoteInto">${t('help.notSet')}</kbd> - ${t('help.createNoteInto')}</li>
<li><kbd data-command="editBranchPrefix">${t('help.notSet')}</kbd> - ${t('help.editBranchPrefix')}</li>
</ul>
</p>
</div>
@ -69,19 +70,19 @@ const TPL = `
<div class="card">
<div class="card-body">
<h5 class="card-title">Moving / cloning notes</h5>
<h5 class="card-title">${t('help.movingCloningNotes')}</h5>
<p class="card-text">
<ul>
<li><kbd data-command="moveNoteUp">not set</kbd>, <kbd data-command="moveNoteDown">not set</kbd> - move note up/down in the note list</li>
<li><kbd data-command="moveNoteUpInHierarchy">not set</kbd>, <kbd data-command="moveNoteDownInHierarchy">not set</kbd> - move note up in the hierarchy</li>
<li><kbd data-command="addNoteAboveToSelection">not set</kbd>, <kbd data-command="addNoteBelowToSelection">not set</kbd> - multi-select note above/below</li>
<li><kbd data-command="selectAllNotesInParent">not set</kbd> - select all notes in the current level</li>
<li><kbd>Shift+click</kbd> - select note</li>
<li><kbd data-command="copyNotesToClipboard">not set</kbd> - copy active note (or current selection) into clipboard (used for <a class="external" href="https://github.com/zadam/trilium/wiki/Cloning notes">cloning</a>)</li>
<li><kbd data-command="cutNotesToClipboard">not set</kbd> - cut current (or current selection) note into clipboard (used for moving notes)</li>
<li><kbd data-command="pasteNotesFromClipboard">not set</kbd> - paste note(s) as sub-note into active note (which is either move or clone depending on whether it was copied or cut into clipboard)</li>
<li><kbd data-command="deleteNotes">not set</kbd> - delete note / sub-tree</li>
<li><kbd data-command="moveNoteUp">${t('help.notSet')}</kbd>, <kbd data-command="moveNoteDown">${t('help.notSet')}</kbd> - ${t('help.moveNoteUpDown')}</li>
<li><kbd data-command="moveNoteUpInHierarchy">${t('help.notSet')}</kbd>, <kbd data-command="moveNoteDownInHierarchy">${t('help.notSet')}</kbd> - ${t('help.moveNoteUpHierarchy')}</li>
<li><kbd data-command="addNoteAboveToSelection">${t('help.notSet')}</kbd>, <kbd data-command="addNoteBelowToSelection">${t('help.notSet')}</kbd> - ${t('help.multiSelectNote')}</li>
<li><kbd data-command="selectAllNotesInParent">${t('help.notSet')}</kbd> - ${t('help.selectAllNotes')}</li>
<li><kbd>Shift+click</kbd> - ${t('help.selectNote')}</li>
<li><kbd data-command="copyNotesToClipboard">${t('help.notSet')}</kbd> - ${t('help.copyNotes')}</li>
<li><kbd data-command="cutNotesToClipboard">${t('help.notSet')}</kbd> - ${t('help.cutNotes')}</li>
<li><kbd data-command="pasteNotesFromClipboard">${t('help.notSet')}</kbd> - ${t('help.pasteNotes')}</li>
<li><kbd data-command="deleteNotes">${t('help.notSet')}</kbd> - ${t('help.deleteNotes')}</li>
</ul>
</p>
</div>
@ -89,17 +90,16 @@ const TPL = `
<div class="card">
<div class="card-body">
<h5 class="card-title">Editing notes</h5>
<h5 class="card-title">${t('help.editingNotes')}</h5>
<p class="card-text">
<ul>
<li><kbd data-command="editNoteTitle">not set</kbd> in tree pane will switch from tree pane into note title. Enter from note title will switch focus to text editor.
<kbd data-command="scrollToActiveNote">not set</kbd> will switch back from editor to tree pane.</li>
<li><kbd>Ctrl+K</kbd> - create / edit external link</li>
<li><kbd data-command="addLinkToText">not set</kbd> - create internal link</li>
<li><kbd data-command="followLinkUnderCursor">not set</kbd> - follow link under cursor</li>
<li><kbd data-command="insertDateTimeToText">not set</kbd> - insert current date and time at caret position</li>
<li><kbd data-command="scrollToActiveNote">not set</kbd> - jump away to the tree pane and scroll to active note</li>
<li><kbd data-command="editNoteTitle">${t('help.notSet')}</kbd> ${t('help.editNoteTitle')}</li>
<li><kbd>Ctrl+K</kbd> - ${t('help.createEditLink')}</li>
<li><kbd data-command="addLinkToText">${t('help.notSet')}</kbd> - ${t('help.createInternalLink')}</li>
<li><kbd data-command="followLinkUnderCursor">${t('help.notSet')}</kbd> - ${t('help.followLink')}</li>
<li><kbd data-command="insertDateTimeToText">${t('help.notSet')}</kbd> - ${t('help.insertDateTime')}</li>
<li><kbd data-command="scrollToActiveNote">${t('help.notSet')}</kbd> - ${t('help.jumpToTreePane')}</li>
</ul>
</p>
</div>
@ -107,14 +107,14 @@ const TPL = `
<div class="card">
<div class="card-body">
<h5 class="card-title"><a class="external" href="https://github.com/zadam/trilium/wiki/Text-notes#autoformat">Markdown-like autoformatting</a></h5>
<h5 class="card-title"><a class="external" href="https://github.com/zadam/trilium/wiki/Text-notes#autoformat">${t('help.markdownAutoformat')}</a></h5>
<p class="card-text">
<ul>
<li><kbd>##</kbd>, <kbd>###</kbd>, <kbd>####</kbd> etc. followed by space for headings</li>
<li><kbd>*</kbd> or <kbd>-</kbd> followed by space for bullet list</li>
<li><kbd>1.</kbd> or <kbd>1)</kbd> followed by space for numbered list</li>
<li>start a line with <kbd>&gt;</kbd> followed by space for block quote</li>
<li><kbd>##</kbd>, <kbd>###</kbd>, <kbd>####</kbd> ${t('help.headings')}</li>
<li>${t('help.bulletList')}</li>
<li>${t('help.numberedList')}</li>
<li>${t('help.blockQuote')}</li>
</ul>
</p>
</div>
@ -122,13 +122,13 @@ const TPL = `
<div class="card">
<div class="card-body">
<h5 class="card-title">Troubleshooting</h5>
<h5 class="card-title">${t('help.troubleshooting')}</h5>
<p class="card-text">
<ul>
<li><kbd data-command="reloadFrontendApp">not set</kbd> - reload Trilium frontend</li>
<li><kbd data-command="openDevTools">not set</kbd> - show developer tools</li>
<li><kbd data-command="showSQLConsole">not set</kbd> - show SQL console</li>
<li><kbd data-command="reloadFrontendApp">${t('help.notSet')}</kbd> - ${t('help.reloadFrontend')}</li>
<li><kbd data-command="openDevTools">${t('help.notSet')}</kbd> - ${t('help.showDevTools')}</li>
<li><kbd data-command="showSQLConsole">${t('help.notSet')}</kbd> - ${t('help.showSQLConsole')}</li>
</ul>
</p>
</div>
@ -136,12 +136,12 @@ const TPL = `
<div class="card">
<div class="card-body">
<h5 class="card-title">Other</h5>
<h5 class="card-title">${t('help.other')}</h5>
<p class="card-text">
<ul>
<li><kbd data-command="quickSearch">not set</kbd> - focus on quick search input</li>
<li><kbd data-command="findInText">not set</kbd> - in page search</li>
<li><kbd data-command="quickSearch">${t('help.notSet')}</kbd> - ${t('help.quickSearch')}</li>
<li><kbd data-command="findInText">${t('help.notSet')}</kbd> - ${t('help.inPageSearch')}</li>
</ul>
</p>
</div>

View File

@ -3,75 +3,74 @@ import treeService from "../../services/tree.js";
import importService from "../../services/import.js";
import options from "../../services/options.js";
import BasicWidget from "../basic_widget.js";
import { t } from "../../services/i18n.js";
const TPL = `
<div class="import-dialog modal fade mx-auto" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Import into note</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<h5 class="modal-title">${t('import.importIntoNote')}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="${t('import.close')}">
<span aria-hidden="true">&times;</span>
</button>
</div>
<form class="import-form">
<div class="modal-body">
<div class="form-group">
<label for="import-file-upload-input"><strong>Choose import file</strong></label>
<label for="import-file-upload-input"><strong>${t('import.chooseImportFile')}</strong></label>
<input type="file" class="import-file-upload-input form-control-file" multiple />
<p>Content of the selected file(s) will be imported as child note(s) into <strong class="import-note-title"></strong>.
<p>${t('import.importDescription')} <strong class="import-note-title"></strong>.
</div>
<div class="form-group">
<strong>Options:</strong>
<strong>${t('import.options')}:</strong>
<div class="checkbox">
<label data-toggle="tooltip" title="Trilium <code>.zip</code> export files can contain executable scripts which may contain harmful behavior. Safe import will deactivate automatic execution of all imported scripts. Uncheck &quot;Safe import&quot; only if the imported tar archive is supposed to contain executable scripts and you completely trust the contents of the import file.">
<label data-toggle="tooltip" title="${t('import.safeImportTooltip')}">
<input class="safe-import-checkbox" value="1" type="checkbox" checked>
<span>Safe import</span>
<span>${t('import.safeImport')}</span>
</label>
</div>
<div class="checkbox">
<label data-toggle="tooltip" title="If this is checked then Trilium will read <code>.zip</code>, <code>.enex</code> and <code>.opml</code> files and create notes from files insides those archives. If unchecked, then Trilium will attach the archives themselves to the note.">
<label data-toggle="tooltip" title="${t('import.explodeArchivesTooltip')}">
<input class="explode-archives-checkbox" value="1" type="checkbox" checked>
<span>Read contents of <code>.zip</code>, <code>.enex</code> and <code>.opml</code> archives.</span>
<span>${t('import.explodeArchives')}</span>
</label>
</div>
<div class="checkbox">
<label data-toggle="tooltip" title="<p>If you check this option, Trilium will attempt to shrink the imported images by scaling and optimization which may affect the perceived image quality. If unchecked, images will be imported without changes.</p><p>This doesn't apply to <code>.zip</code> imports with metadata since it is assumed these files are already optimized.</p>">
<input class="shrink-images-checkbox" value="1" type="checkbox" checked> <span>Shrink images</span>
<label data-toggle="tooltip" title="${t('import.shrinkImagesTooltip')}">
<input class="shrink-images-checkbox" value="1" type="checkbox" checked> <span>${t('import.shrinkImages')}</span>
</label>
</div>
<div class="checkbox">
<label>
<input class="text-imported-as-text-checkbox" value="1" type="checkbox" checked>
Import HTML, Markdown and TXT as text notes if it's unclear from metadata
${t('import.textImportedAsText')}
</label>
</div>
<div class="checkbox">
<label>
<input class="code-imported-as-code-checkbox" value="1" type="checkbox" checked> Import recognized code files (e.g. <code>.json</code>) as code notes if it's unclear from metadata
<input class="code-imported-as-code-checkbox" value="1" type="checkbox" checked> ${t('import.codeImportedAsCode')}
</label>
</div>
<div class="checkbox">
<label>
<input class="replace-underscores-with-spaces-checkbox" value="1" type="checkbox" checked>
Replace underscores with spaces in imported note names
${t('import.replaceUnderscoresWithSpaces')}
</label>
</div>
</div>
</div>
<div class="modal-footer">
<button class="import-button btn btn-primary">Import</button>
<button class="import-button btn btn-primary">${t('import.import')}</button>
</div>
</form>
</div>

View File

@ -5,8 +5,8 @@
"app_version": "应用版本:",
"db_version": "数据库版本:",
"sync_version": "同步版本:",
"build_date": "构建日期:",
"build_revision": "构建修订版",
"build_date": "编译日期:",
"build_revision": "编译版本",
"data_directory": "数据目录:"
},
"add_link": {
@ -14,14 +14,14 @@
"help_on_links": "链接帮助",
"close": "关闭",
"note": "笔记",
"search_note": "名称搜索笔记",
"link_title_mirrors": "链接标题与笔记当前标题同步",
"link_title_arbitrary": "链接标题可以任意更改",
"search_note": "根据名称搜索笔记",
"link_title_mirrors": "链接标题跟随笔记标题变化",
"link_title_arbitrary": "链接标题可随意修改",
"link_title": "链接标题"
},
"branch_prefix": {
"edit_branch_prefix": "编辑分支前缀",
"help_on_tree_prefix": "树前缀帮助",
"help_on_tree_prefix": "有关树前缀帮助",
"close": "关闭",
"prefix": "前缀:",
"save": "保存",
@ -31,7 +31,7 @@
"bulk_actions": "批量操作",
"close": "关闭",
"affected_notes": "受影响的笔记",
"include_descendants": "包括所选笔记的后代",
"include_descendants": "包括所选笔记的子笔记",
"available_actions": "可用操作",
"chosen_actions": "选择的操作",
"execute_bulk_actions": "执行批量操作",
@ -43,12 +43,119 @@
"help_on_links": "链接帮助",
"notes_to_clone": "要克隆的笔记",
"target_parent_note": "目标父笔记",
"search_for_note_by_its_name": "名称搜索笔记",
"search_for_note_by_its_name": "根据名称搜索笔记",
"cloned_note_prefix_title": "克隆的笔记将在笔记树中显示给定的前缀",
"prefix_optional": "前缀(可选)",
"clone_to_selected_note": "克隆到选定的笔记",
"no_path_to_clone_to": "没有克隆路径。",
"note_cloned": "笔记 \"{{clonedTitle}}\" 已克隆到 \"{{targetTitle}}\""
},
"confirm": {
"confirmation": "确认",
"cancel": "取消",
"ok": "确定",
"are_you_sure_remove_note": "确定要从关系图中移除笔记 \"{{title}}\" ",
"if_you_dont_check": "如果不选中此项,笔记将仅从关系图中移除。",
"also_delete_note": "同时删除笔记"
},
"delete_notes": {
"delete_notes_preview": "删除笔记预览",
"delete_all_clones_description": "同时删除所有克隆(可以在最近更改中撤消)",
"erase_notes_description": "通常(软)删除仅标记笔记为已删除,可以在一段时间内通过最近修改对话框撤消。选中此选项将立即擦除笔记,不可撤销。",
"erase_notes_warning": "永久擦除笔记(无法撤销),包括所有克隆。这将强制应用程序重新加载。",
"notes_to_be_deleted": "将删除以下笔记(<span class=\"deleted-notes-count\"></span>",
"no_note_to_delete": "没有笔记将被删除(仅克隆)。",
"broken_relations_to_be_deleted": "将删除以下关系并断开连接(<span class=\"broke-relations-count\"></span>",
"cancel": "取消",
"ok": "确定",
"note": "笔记",
"to_be_deleted": "(将被删除的笔记) 被以下关系 <code>{{attrName}}</code> 引用, 来自 "
},
"export": {
"export_note_title": "导出笔记 \"{{noteTitle}}\"",
"close": "关闭",
"export_type_subtree": "此笔记及其所有子笔记",
"format_html": "HTML ZIP 归档 - 建议使用此选项,因为它保留了所有格式。",
"format_markdown": "Markdown - 保留大部分格式。",
"format_opml": "OPML - 大纲交换格式,仅限文本。不包括格式、图像和文件。",
"opml_version_1": "OPML v1.0 - 仅限纯文本",
"opml_version_2": "OMPL v2.0 - 还允许 HTML",
"export_type_single": "仅此笔记,不包括子笔记",
"export": "导出",
"choose_export_type": "请先选择导出类型",
"export_status": "导出状态",
"export_in_progress": "导出进行中:{{progressCount}}",
"export_finished_successfully": "导出成功完成。"
},
"help": {
"fullDocumentation": "帮助(完整<a class=\"external\" href=\"https://github.com/zadam/trilium/wiki\">在线文档</a>)",
"close": "关闭",
"noteNavigation": "笔记导航",
"goUpDown": "在笔记列表中向上/向下移动",
"collapseExpand": "折叠/展开节点",
"notSet": "未设置",
"goBackForwards": "在历史记录中前后移动",
"showJumpToNoteDialog": "显示“跳转到”对话框",
"scrollToActiveNote": "滚动到活动笔记",
"jumpToParentNote": "跳转到父笔记",
"collapseWholeTree": "折叠整个笔记树",
"collapseSubTree": "折叠子树",
"tabShortcuts": "标签快捷键",
"newTabNoteLink": "在笔记链接上使用CTRL+点击(或中键点击)在新标签中打开笔记",
"onlyInDesktop": "仅在桌面版(电子构建)中",
"openEmptyTab": "打开空白标签页",
"closeActiveTab": "关闭活动标签页",
"activateNextTab": "激活下一个标签页",
"activatePreviousTab": "激活上一个标签页",
"creatingNotes": "创建笔记",
"createNoteAfter": "在活动笔记后创建新笔记",
"createNoteInto": "在活动笔记中创建新子笔记",
"editBranchPrefix": "编辑活动笔记克隆的前缀",
"movingCloningNotes": "移动/克隆笔记",
"moveNoteUpDown": "在笔记列表中向上/向下移动笔记",
"moveNoteUpHierarchy": "在层级结构中向上移动笔记",
"multiSelectNote": "多选上/下笔记",
"selectAllNotes": "选择当前级别的所有笔记",
"selectNote": "选择笔记",
"copyNotes": "将活动笔记(或当前选择)复制到剪贴板(用于克隆)",
"cutNotes": "将当前笔记(或当前选择)剪切到剪贴板(用于移动笔记)",
"pasteNotes": "将笔记粘贴为活动笔记的子笔记(根据是复制还是剪切到剪贴板来决定是移动还是克隆)",
"deleteNotes": "删除笔记/子树",
"editingNotes": "编辑笔记",
"editNoteTitle": "在树面板中从树面板切换到笔记标题。从笔记标题进入将焦点切换到文本编辑器。将从编辑器切换回树面板。",
"createEditLink": "创建/编辑外部链接",
"createInternalLink": "创建内部链接",
"followLink": "跟随光标下的链接",
"insertDateTime": "在插入点插入当前日期和时间",
"jumpToTreePane": "跳转到树面板并滚动到活动笔记",
"markdownAutoformat": "类Markdown自动格式化",
"headings": " 等,后跟空格,自动转换为标题",
"bulletList": "<kbd>*</kbd> 或 <kbd>-</kbd> 后跟空格,自动转换为项目符号列表",
"numberedList": "<kbd>1.</kbd> or <kbd>1)</kbd> 后跟空格,自动转换为编号列表",
"blockQuote": "一行以 <kbd>></kbd> 开头并后跟空格,自动转换为块引用",
"troubleshooting": "故障排除",
"reloadFrontend": "重新加载Trilium前端",
"showDevTools": "显示开发者工具",
"showSQLConsole": "显示SQL控制台",
"other": "其他",
"quickSearch": "定位到快速搜索框",
"inPageSearch": "页面内搜索"
},
"import": {
"importIntoNote": "导入到笔记",
"close": "关闭",
"chooseImportFile": "选择导入文件",
"importDescription": "所选文件的内容将作为子笔记导入到",
"options": "选项",
"safeImportTooltip": "Trilium <code>.zip</code> 导出文件可能包含可能有害的可执行脚本。安全导入将停用所有导入脚本的自动执行。仅当您完全信任导入的可执行脚本的内容时,才取消选中“安全导入”。",
"safeImport": "安全导入",
"explodeArchivesTooltip": "如果选中此项则Trilium将读取<code>.zip</code>、<code>.enex</code>和<code>.opml</code>文件并从这些归档文件内部的文件创建笔记。如果未选中则Trilium会将这些归档文件本身附加到笔记中。",
"explodeArchives": "读取<code>.zip</code>、<code>.enex</code>和<code>.opml</code>归档文件的内容。",
"shrinkImagesTooltip": "<p>如果选中此选项Trilium将尝试通过缩放和优化来缩小导入的图像这可能会影响图像的感知质量。如果未选中图像将不做更改地导入。</p><p>这不适用于带有元数据的<code>.zip</code>导入,因为这些文件已被假定为已优化。</p>",
"shrinkImages": "压缩图像",
"textImportedAsText": "如果元数据不明确将HTML、Markdown和TXT导入为文本笔记",
"codeImportedAsCode": "如果元数据不明确,将识别的代码文件(例如<code>.json</code>)导入为代码笔记",
"replaceUnderscoresWithSpaces": "在导入的笔记名称中将下划线替换为空格",
"import": "导入"
}
}

View File

@ -49,6 +49,114 @@
"clone_to_selected_note": "Clone to selected note",
"no_path_to_clone_to": "No path to clone to.",
"note_cloned": "Note \"{{clonedTitle}}\" has been cloned into \"{{targetTitle}}\""
},
"confirm": {
"confirmation": "Confirmation",
"cancel": "Cancel",
"ok": "OK",
"are_you_sure_remove_note": "Are you sure you want to remove the note \"{{title}}\" from relation map? ",
"if_you_dont_check": "If you don't check this, the note will be only removed from the relation map.",
"also_delete_note": "Also delete the note"
},
"delete_notes": {
"delete_notes_preview": "Delete notes preview",
"delete_all_clones_description": "delete also all clones (can be undone in recent changes)",
"erase_notes_description": "Normal (soft) deletion only marks the notes as deleted and they can be undeleted (in recent changes dialog) within a period of time. Checking this option will erase the notes immediately and it won't be possible to undelete the notes.",
"erase_notes_warning": "erase notes permanently (can't be undone), including all clones. This will force application reload.",
"notes_to_be_deleted": "Following notes will be deleted (<span class=\"deleted-notes-count\"></span>)",
"no_note_to_delete": "No note will be deleted (only clones).",
"broken_relations_to_be_deleted": "Following relations will be broken and deleted (<span class=\"broke-relations-count\"></span>)",
"cancel": "Cancel",
"ok": "OK",
"note": "Note",
"to_be_deleted": " (to be deleted) is referenced by relation <code>{{attrName}}</code> originating from "
},
"export": {
"export_note_title": "Export note \"{{noteTitle}}\"",
"close": "Close",
"export_type_subtree": "this note and all of its descendants",
"format_html": "HTML in ZIP archive - this is recommended since this preserves all the formatting.",
"format_markdown": "Markdown - this preserves most of the formatting.",
"format_opml": "OPML - outliner interchange format for text only. Formatting, images and files are not included.",
"opml_version_1": "OPML v1.0 - plain text only",
"opml_version_2": "OMPL v2.0 - allows also HTML",
"export_type_single": "only this note without its descendants",
"export": "Export",
"choose_export_type": "Choose export type first please",
"export_status": "Export status",
"export_in_progress": "Export in progress: {{progressCount}}",
"export_finished_successfully": "Export finished successfully."
},
"help": {
"fullDocumentation": "Help (full documentation is available <a class=\"external\" href=\"https://github.com/zadam/trilium/wiki\">online</a>)",
"close": "Close",
"noteNavigation": "Note navigation",
"goUpDown": "go up/down in the list of notes",
"collapseExpand": "collapse/expand node",
"notSet": "not set",
"goBackForwards": "go back / forwards in the history",
"showJumpToNoteDialog": "show \"Jump to\" dialog",
"scrollToActiveNote": "scroll to active note",
"jumpToParentNote": "jump to parent note",
"collapseWholeTree": "collapse whole note tree",
"collapseSubTree": "collapse sub-tree",
"tabShortcuts": "Tab shortcuts",
"newTabNoteLink": "(or middle mouse click) on note link opens note in a new tab",
"onlyInDesktop": "Only in desktop (electron build)",
"openEmptyTab": "open empty tab",
"closeActiveTab": "close active tab",
"activateNextTab": "activate next tab",
"activatePreviousTab": "activate previous tab",
"creatingNotes": "Creating notes",
"createNoteAfter": "create new note after the active note",
"createNoteInto": "create new sub-note into active note",
"editBranchPrefix": "edit prefix of active note clone",
"movingCloningNotes": "Moving / cloning notes",
"moveNoteUpDown": "move note up/down in the note list",
"moveNoteUpHierarchy": "move note up in the hierarchy",
"multiSelectNote": "multi-select note above/below",
"selectAllNotes": "select all notes in the current level",
"selectNote": "select note",
"copyNotes": "copy active note (or current selection) into clipboard (used for cloning)",
"cutNotes": "cut current (or current selection) note into clipboard (used for moving notes)",
"pasteNotes": "paste note(s) as sub-note into active note (which is either move or clone depending on whether it was copied or cut into clipboard)",
"deleteNotes": "delete note / sub-tree",
"editingNotes": "Editing notes",
"editNoteTitle": "in tree pane will switch from tree pane into note title. Enter from note title will switch focus to text editor. will switch back from editor to tree pane.",
"createEditLink": "create / edit external link",
"createInternalLink": "create internal link",
"followLink": "follow link under cursor",
"insertDateTime": "insert current date and time at caret position",
"jumpToTreePane": "jump away to the tree pane and scroll to active note",
"markdownAutoformat": "Markdown-like autoformatting",
"headings": " etc. followed by space for headings",
"bulletList": "<kbd>*</kbd> or <kbd>-</kbd> followed by space for bullet list",
"numberedList": "<kbd>1.</kbd> or <kbd>1)</kbd> followed by space for numbered list",
"blockQuote": "start a line with <kbd>></kbd> followed by space for block quote",
"troubleshooting": "Troubleshooting",
"reloadFrontend": "reload Trilium frontend",
"showDevTools": "show developer tools",
"showSQLConsole": "show SQL console",
"other": "Other",
"quickSearch": "focus on quick search input",
"inPageSearch": "in page search"
},
"import": {
"importIntoNote": "Import into note",
"close": "Close",
"chooseImportFile": "Choose import file",
"importDescription": "Content of the selected file(s) will be imported as child note(s) into",
"options": "Options",
"safeImportTooltip": "Trilium <code>.zip</code> export files can contain executable scripts which may contain harmful behavior. Safe import will deactivate automatic execution of all imported scripts. Uncheck \"Safe import\" only if the imported archive is supposed to contain executable scripts and you completely trust the contents of the import file.",
"safeImport": "Safe import",
"explodeArchivesTooltip": "If this is checked then Trilium will read <code>.zip</code>, <code>.enex</code> and <code>.opml</code> files and create notes from files insides those archives. If unchecked, then Trilium will attach the archives themselves to the note.",
"explodeArchives": "Read contents of <code>.zip</code>, <code>.enex</code> and <code>.opml</code> archives.",
"shrinkImagesTooltip": "<p>If you check this option, Trilium will attempt to shrink the imported images by scaling and optimization which may affect the perceived image quality. If unchecked, images will be imported without changes.</p><p>This doesn't apply to <code>.zip</code> imports with metadata since it is assumed these files are already optimized.</p>",
"shrinkImages": "Shrink images",
"textImportedAsText": "Import HTML, Markdown and TXT as text notes if it's unclear from metadata",
"codeImportedAsCode": "Import recognized code files (e.g. <code>.json</code>) as code notes if it's unclear from metadata",
"replaceUnderscoresWithSpaces": "Replace underscores with spaces in imported note names",
"import": "Import"
}
}