mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	i18n: Translate delete/restore branch
This commit is contained in:
		
							parent
							
								
									9ed7eb977e
								
							
						
					
					
						commit
						b5ee90a1d2
					
				| @ -5,6 +5,7 @@ import froca from "./froca.js"; | |||||||
| import hoistedNoteService from "./hoisted_note.js"; | import hoistedNoteService from "./hoisted_note.js"; | ||||||
| import ws from "./ws.js"; | import ws from "./ws.js"; | ||||||
| import appContext from "../components/app_context.js"; | import appContext from "../components/app_context.js"; | ||||||
|  | import { t } from './i18n.js'; | ||||||
| 
 | 
 | ||||||
| async function moveBeforeBranch(branchIdsToMove, beforeBranchId) { | async function moveBeforeBranch(branchIdsToMove, beforeBranchId) { | ||||||
|     branchIdsToMove = filterRootNote(branchIdsToMove); |     branchIdsToMove = filterRootNote(branchIdsToMove); | ||||||
| @ -192,7 +193,7 @@ function filterRootNote(branchIds) { | |||||||
| function makeToast(id, message) { | function makeToast(id, message) { | ||||||
|     return { |     return { | ||||||
|         id: id, |         id: id, | ||||||
|         title: "Delete status", |         title: t("branches.delete-status"), | ||||||
|         message: message, |         message: message, | ||||||
|         icon: "trash" |         icon: "trash" | ||||||
|     }; |     }; | ||||||
| @ -207,9 +208,9 @@ ws.subscribeToMessages(async message => { | |||||||
|         toastService.closePersistent(message.taskId); |         toastService.closePersistent(message.taskId); | ||||||
|         toastService.showError(message.message); |         toastService.showError(message.message); | ||||||
|     } else if (message.type === 'taskProgressCount') { |     } 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') { |     } 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; |         toast.closeAfter = 5000; | ||||||
| 
 | 
 | ||||||
|         toastService.showPersistent(toast); |         toastService.showPersistent(toast); | ||||||
| @ -225,9 +226,9 @@ ws.subscribeToMessages(async message => { | |||||||
|         toastService.closePersistent(message.taskId); |         toastService.closePersistent(message.taskId); | ||||||
|         toastService.showError(message.message); |         toastService.showError(message.message); | ||||||
|     } else if (message.type === 'taskProgressCount') { |     } 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') { |     } 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; |         toast.closeAfter = 5000; | ||||||
| 
 | 
 | ||||||
|         toastService.showPersistent(toast); |         toastService.showPersistent(toast); | ||||||
|  | |||||||
| @ -1461,7 +1461,12 @@ | |||||||
|     "sql-error": "Error occurred while executing SQL query: {{message}}" |     "sql-error": "Error occurred while executing SQL query: {{message}}" | ||||||
|   }, |   }, | ||||||
|   "branches": { |   "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": { |   "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()`.", |     "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()`.", | ||||||
|  | |||||||
| @ -1461,7 +1461,12 @@ | |||||||
|     "duplicated": "Notița „{{title}}” a fost dublificată." |     "duplicated": "Notița „{{title}}” a fost dublificată." | ||||||
|   }, |   }, | ||||||
|   "branches": { |   "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": { |   "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()`.", |     "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()`.", | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran