mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 02:30:42 +01:00
add translation for 6 more dialogs
This commit is contained in:
@@ -5,13 +5,14 @@ import froca from "../../services/froca.js";
|
||||
import branchService from "../../services/branches.js";
|
||||
import treeService from "../../services/tree.js";
|
||||
import BasicWidget from "../basic_widget.js";
|
||||
import { t } from "../../services/i18n.js"; // Added import
|
||||
|
||||
const TPL = `
|
||||
<div class="move-to-dialog modal mx-auto" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" style="max-width: 1000px" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title mr-auto">Move notes to ...</h5>
|
||||
<h5 class="modal-title mr-auto">${t("move_to.dialog_title")}</h5>
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0 !important;">
|
||||
<span aria-hidden="true">×</span>
|
||||
@@ -19,21 +20,21 @@ const TPL = `
|
||||
</div>
|
||||
<form class="move-to-form">
|
||||
<div class="modal-body">
|
||||
<h5>Notes to move</h5>
|
||||
<h5>${t("move_to.notes_to_move")}</h5>
|
||||
|
||||
<ul class="move-to-note-list" style="max-height: 200px; overflow: auto;"></ul>
|
||||
|
||||
<div class="form-group">
|
||||
<label style="width: 100%">
|
||||
Target parent note
|
||||
${t("move_to.target_parent_note")}
|
||||
<div class="input-group">
|
||||
<input class="move-to-note-autocomplete form-control" placeholder="search for note by its name">
|
||||
<input class="move-to-note-autocomplete form-control" placeholder="${t("move_to.search_placeholder")}">
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary">Move to selected note <kbd>enter</kbd></button>
|
||||
<button type="submit" class="btn btn-primary">${t("move_to.move_button")}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -63,7 +64,7 @@ export default class MoveToDialog extends BasicWidget {
|
||||
froca.getBranchId(parentNoteId, noteId).then(branchId => this.moveNotesTo(branchId));
|
||||
}
|
||||
else {
|
||||
logError("No path to move to.");
|
||||
logError(t("move_to.error_no_path"));
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -96,6 +97,6 @@ export default class MoveToDialog extends BasicWidget {
|
||||
const parentBranch = froca.getBranch(parentBranchId);
|
||||
const parentNote = await parentBranch.getNote();
|
||||
|
||||
toastService.showMessage(`Selected notes have been moved into ${parentNote.title}`);
|
||||
toastService.showMessage(`${t("move_to.move_success_message")} ${parentNote.title}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user