Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
i18n: Translate delete/restore branch
Elian Doranb5ee90a1d266
diff --git a/src/public/app/services/branches.js b/src/public/app/services/branches.jsindex 1f70556ed5..803c591476 100644--- a/src/public/app/services/branches.js+++ b/src/public/app/services/branches.js@@ -5,6 +5,7 @@ import froca from "./froca.js";import hoistedNoteService from "./hoisted_note.js";import ws from "./ws.js";import appContext from "../components/app_context.js";+import { t } from './i18n.js';async function moveBeforeBranch(branchIdsToMove, beforeBranchId) {branchIdsToMove = filterRootNote(branchIdsToMove);@@ -192,7 +193,7 @@ function filterRootNote(branchIds) {function makeToast(id, message) {return {id: id,- title: "Delete status",+ title: t("branches.delete-status"),message: message,icon: "trash"};@@ -207,9 +208,9 @@ ws.subscribeToMessages(async message => {toastService.closePersistent(message.taskId);toastService.showError(message.message);} else if (message.type === 'taskProgressCount') {- toastService.showPersistent(makeToast(message.taskId, `Delete notes in progress: ${message.progressCount}`));+ toastService.showPersistent(makeToast(message.taskId, t("branches.delete-notes-in-progress", { count: message.progressCount })));} else if (message.type === 'taskSucceeded') {- const toast = makeToast(message.taskId, "Delete finished successfully.");+ const toast = makeToast(message.taskId, t("branches.delete-finished-successfully"));toast.closeAfter = 5000;toastService.showPersistent(toast);@@ -225,9 +226,9 @@ ws.subscribeToMessages(async message => {toastService.closePersistent(message.taskId);toastService.showError(message.message);} else if (message.type === 'taskProgressCount') {- toastService.showPersistent(makeToast(message.taskId, `Undeleting notes in progress: ${message.progressCount}`));+ toastService.showPersistent(makeToast(message.taskId, t("branches.undeleting-notes-in-progress", { count: message.progressCount })));} else if (message.type === 'taskSucceeded') {- const toast = makeToast(message.taskId, "Undeleting notes finished successfully.");+ const toast = makeToast(message.taskId, t("branches.undeleting-notes-finished-successfully"));toast.closeAfter = 5000;toastService.showPersistent(toast);diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.jsonindex 2ca89c155a..35fb226e59 100644--- a/src/public/translations/en/translation.json+++ b/src/public/translations/en/translation.json@@ -1461,7 +1461,12 @@"sql-error": "Error occurred while executing SQL query: {{message}}"},"branches": {- "cannot-move-notes-here": "Cannot move notes here."+ "cannot-move-notes-here": "Cannot move notes here.",+ "delete-status": "Delete status",+ "delete-notes-in-progress": "Delete notes in progress: {{count}}",+ "delete-finished-successfully": "Delete finished successfully.",+ "undeleting-notes-in-progress": "Undeleting notes in progress: {{count}}",+ "undeleting-notes-finished-successfully": "Undeleting notes finished successfully."},"frontend_script_api": {"async_warning": "You're passing an async function to `api.runOnBackend()` which will likely not work as you intended.\\nEither make the function synchronous (by removing `async` keyword), or use `api.runAsyncOnBackendWithManualTransactionHandling()`.",diff --git a/src/public/translations/ro/translation.json b/src/public/translations/ro/translation.jsonindex dd4052b804..a6bed6d62e 100644--- a/src/public/translations/ro/translation.json+++ b/src/public/translations/ro/translation.json@@ -1461,7 +1461,12 @@"duplicated": "Notița „{{title}}” a fost dublificată."},"branches": {- "cannot-move-notes-here": "Nu se pot muta notițe aici."+ "cannot-move-notes-here": "Nu se pot muta notițe aici.",+ "delete-finished-successfully": "Ștergerea a avut succes.",+ "delete-notes-in-progress": "Ștergere în curs: {{count}}",+ "delete-status": "Starea ștergerii",+ "undeleting-notes-finished-successfully": "Restaurarea notițelor a avut succes.",+ "undeleting-notes-in-progress": "Restaurare notițe în curs: {{count}}"},"frontend_script_api": {"async_warning": "Ați trimis o funcție asincronă metodei `api.runOnBackend()` și este posibil să nu se comporte așa cum vă așteptați.\\nFie faceți metoda sincronă (prin ștergerea cuvântului-cheie `async`), sau folosiți `api.runAsyncOnBackendWithManualTransactionHandling()`.",