mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	i18n: Translate toast messages
This commit is contained in:
		| @@ -178,7 +178,7 @@ export default class Entrypoints extends Component { | ||||
|             await appContext.triggerEvent('sqlQueryResults', {ntxId: ntxId, results: resp.results}); | ||||
|         } | ||||
|  | ||||
|         toastService.showMessage("Note executed"); | ||||
|         toastService.showMessage(t("entrypoints.note-executed")); | ||||
|     } | ||||
|  | ||||
|     hideAllPopups() { | ||||
| @@ -200,6 +200,6 @@ export default class Entrypoints extends Component { | ||||
|  | ||||
|         await server.post(`notes/${noteId}/revision`); | ||||
|  | ||||
|         toastService.showMessage("Note revision has been created."); | ||||
|         toastService.showMessage(t("entrypoints.note-revision-created")); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -154,7 +154,7 @@ export default class TreeContextMenu { | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|             toastService.showMessage(`${converted} notes have been converted to attachments.`); | ||||
|             toastService.showMessage(t("tree-context-menu.converted-to-attachments", { count: converted })); | ||||
|         } | ||||
|         else if (command === 'copyNotePathToClipboard') { | ||||
|             navigator.clipboard.writeText('#' + notePath); | ||||
|   | ||||
| @@ -78,7 +78,7 @@ async function copy(branchIds) { | ||||
|         clipboard.writeHTML(links.join(', ')); | ||||
|     } | ||||
|  | ||||
|     toastService.showMessage("Note(s) have been copied into clipboard."); | ||||
|     toastService.showMessage(t("clipboard.copied")); | ||||
| } | ||||
|  | ||||
| function cut(branchIds) { | ||||
| @@ -87,7 +87,7 @@ function cut(branchIds) { | ||||
|     if (clipboardBranchIds.length > 0) { | ||||
|         clipboardMode = 'cut'; | ||||
|  | ||||
|         toastService.showMessage("Note(s) have been cut into clipboard."); | ||||
|         toastService.showMessage(t("clipboard.cut")); | ||||
|     } | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -8,9 +8,9 @@ function copyImageReferenceToClipboard($imageWrapper) { | ||||
|         const success = document.execCommand('copy'); | ||||
|  | ||||
|         if (success) { | ||||
|             toastService.showMessage("A reference to the image has been copied to clipboard. This can be pasted in any text note."); | ||||
|             toastService.showMessage(t("image.copied-to-clipboard")); | ||||
|         } else { | ||||
|             toastService.showAndLogError("Could not copy the image reference to clipboard."); | ||||
|             toastService.showAndLogError(t("image.cannot-copy")); | ||||
|         } | ||||
|     } | ||||
|     finally { | ||||
|   | ||||
| @@ -119,7 +119,7 @@ async function duplicateSubtree(noteId, parentNotePath) { | ||||
|     activeNoteContext.setNote(`${parentNotePath}/${note.noteId}`); | ||||
|  | ||||
|     const origNote = await froca.getNote(noteId); | ||||
|     toastService.showMessage(`Note "${origNote.title}" has been duplicated`); | ||||
|     toastService.showMessage(t("note_create.duplicated", { title: origNote.title })); | ||||
| } | ||||
|  | ||||
| export default { | ||||
|   | ||||
| @@ -72,7 +72,7 @@ ws.subscribeToMessages(async message => { | ||||
|             protectedSessionDeferred = null; | ||||
|         } | ||||
|  | ||||
|         toastService.showMessage("Protected session has been started."); | ||||
|         toastService.showMessage(t("protected_session.started")); | ||||
|     } | ||||
|     else if (message.type === 'protectedSessionLogout') { | ||||
|         utils.reloadFrontendApp(`Protected session logout`); | ||||
|   | ||||
| @@ -5,7 +5,7 @@ async function syncNow(ignoreNotConfigured = false) { | ||||
|     const result = await server.post('sync/now'); | ||||
|  | ||||
|     if (result.success) { | ||||
|         toastService.showMessage("Sync finished successfully."); | ||||
|         toastService.showMessage(t("sync.finished-successfully")); | ||||
|     } | ||||
|     else { | ||||
|         if (result.message.length > 200) { | ||||
| @@ -13,7 +13,7 @@ async function syncNow(ignoreNotConfigured = false) { | ||||
|         } | ||||
|  | ||||
|         if (!ignoreNotConfigured || result.errorCode !== 'NOT_CONFIGURED') { | ||||
|             toastService.showError(`Sync failed: ${result.message}`); | ||||
|             toastService.showError(t("sync.failed", { message: result.message })); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -134,11 +134,11 @@ export default class NoteActionsWidget extends NoteContextAwareWidget { | ||||
|         const {attachment: newAttachment} = await server.post(`notes/${this.noteId}/convert-to-attachment`); | ||||
|  | ||||
|         if (!newAttachment) { | ||||
|             toastService.showMessage(`Converting note '${this.note.title}' failed.`); | ||||
|             toastService.showMessage(t("note_actions.convert_into_attachment_failed", { title: this.note.title })); | ||||
|             return; | ||||
|         } | ||||
|  | ||||
|         toastService.showMessage(`Note '${newAttachment.title}' has been converted to attachment.`); | ||||
|         toastService.showMessage(t("note_actions.convert_into_attachment_successful", { title: newAttachment.title })); | ||||
|         await ws.waitForMaxKnownEntityChangeId(); | ||||
|         await appContext.tabManager.getActiveContext().setNote(newAttachment.ownerId, { | ||||
|             viewScope: { | ||||
|   | ||||
| @@ -1031,7 +1031,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget { | ||||
|         activeNode.load(true); | ||||
|         activeNode.setExpanded(true, {noAnimation: true}); | ||||
|  | ||||
|         toastService.showMessage("Saved search note refreshed."); | ||||
|         toastService.showMessage(t("note_tree.saved-search-note-refreshed")); | ||||
|     } | ||||
|  | ||||
|     async batchUpdate(cb) { | ||||
| @@ -1075,7 +1075,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget { | ||||
|                     node.setExpanded(false); | ||||
|  | ||||
|                     if (noneCollapsedYet) { | ||||
|                         toastService.showMessage("Auto collapsing notes after inactivity..."); | ||||
|                         toastService.showMessage(t("note_tree.auto-collapsing-notes-after-inactivity")); | ||||
|                         noneCollapsedYet = false; | ||||
|                     } | ||||
|                 } | ||||
|   | ||||
| @@ -632,7 +632,9 @@ | ||||
|     "export_note": "Export note", | ||||
|     "delete_note": "Delete note", | ||||
|     "print_note": "Print note", | ||||
|     "save_revision": "Save revision" | ||||
|     "save_revision": "Save revision", | ||||
|     "convert_into_attachment_failed": "Converting note '{{title}}' failed.", | ||||
|     "convert_into_attachment_successful": "Note '{{title}' has been converted to attachment." | ||||
|   }, | ||||
|   "onclick_button": { | ||||
|     "no_click_handler": "Button widget '{{componentId}}' has no defined click handler" | ||||
| @@ -921,7 +923,8 @@ | ||||
|   }, | ||||
|   "protected_session": { | ||||
|     "enter_password_instruction": "Showing protected note requires entering your password:", | ||||
|     "start_session_button": "Start protected session" | ||||
|     "start_session_button": "Start protected session", | ||||
|     "started": "Protected session has been started." | ||||
|   }, | ||||
|   "relation_map": { | ||||
|     "open_in_new_tab": "Open in new tab", | ||||
| @@ -992,7 +995,9 @@ | ||||
|     "fill_entity_changes_button": "Fill entity changes records", | ||||
|     "full_sync_triggered": "Full sync triggered", | ||||
|     "filling_entity_changes": "Filling entity changes rows...", | ||||
|     "sync_rows_filled_successfully": "Sync rows filled successfully" | ||||
|     "sync_rows_filled_successfully": "Sync rows filled successfully", | ||||
|     "finished-successfully": "Sync finished successfully.", | ||||
|     "failed": "Sync failed: {{message}}" | ||||
|   }, | ||||
|   "vacuum_database": { | ||||
|     "title": "Vacuum Database", | ||||
| @@ -1311,7 +1316,8 @@ | ||||
|     "duplicate-subtree": "Duplicate subtree", | ||||
|     "export": "Export", | ||||
|     "import-into-note": "Import into note", | ||||
|     "apply-bulk-actions": "Apply bulk actions" | ||||
|     "apply-bulk-actions": "Apply bulk actions", | ||||
|     "converted-to-attachments": "{{count}} notes have been converted to attachments." | ||||
|   }, | ||||
|   "shared_info": { | ||||
|     "shared_publicly": "This note is shared publicly on", | ||||
| @@ -1380,7 +1386,9 @@ | ||||
|     "hide-archived-notes": "Hide archived notes", | ||||
|     "automatically-collapse-notes": "Automatically collapse notes", | ||||
|     "automatically-collapse-notes-title": "Notes will be collapsed after period of inactivity to declutter the tree.", | ||||
|     "save-changes": "Save & apply changes" | ||||
|     "save-changes": "Save & apply changes", | ||||
|     "auto-collapsing-notes-after-inactivity": "Auto collapsing notes after inactivity...", | ||||
|     "saved-search-note-refreshed": "Saved search note refreshed." | ||||
|   }, | ||||
|   "title_bar_buttons": { | ||||
|     "window-on-top": "Keep this window on top." | ||||
| @@ -1424,5 +1432,20 @@ | ||||
|   }, | ||||
|   "app_context": { | ||||
|     "please_wait_for_save": "Please wait for a couple of seconds for the save to finish, then you can try again." | ||||
|   }, | ||||
|   "note_create": { | ||||
|     "duplicated": "Note \"{{title}}\" has been duplicated." | ||||
|   }, | ||||
|   "image": { | ||||
|     "copied-to-clipboard": "A reference to the image has been copied to clipboard. This can be pasted in any text note.", | ||||
|     "cannot-copy": "Could not copy the image reference to clipboard." | ||||
|   }, | ||||
|   "clipboard": { | ||||
|     "cut": "Note(s) have been cut into clipboard.", | ||||
|     "copied": "Note(s) have been copied into clipboard." | ||||
|   }, | ||||
|   "entrypoints": { | ||||
|     "note-revision-created": "Note revision has been created.", | ||||
|     "note-executed": "Note executed." | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -785,7 +785,9 @@ | ||||
|     "print_note": "Imprimare notiță", | ||||
|     "re_render_note": "Reinterpretare notiță", | ||||
|     "save_revision": "Salvează o nouă revizie", | ||||
|     "search_in_note": "Caută în notiță" | ||||
|     "search_in_note": "Caută în notiță", | ||||
|     "convert_into_attachment_failed": "Nu s-a putut converti notița „{{title}}”.", | ||||
|     "convert_into_attachment_successful": "Notița „{{title}}” a fost convertită în atașament." | ||||
|   }, | ||||
|   "note_erasure_timeout": { | ||||
|     "deleted_notes_erased": "Notițele șterse au fost eliminate permanent.", | ||||
| @@ -903,7 +905,8 @@ | ||||
|   }, | ||||
|   "protected_session": { | ||||
|     "enter_password_instruction": "Afișarea notițelor protejate necesită introducerea parolei:", | ||||
|     "start_session_button": "Deschide sesiunea protejată" | ||||
|     "start_session_button": "Deschide sesiunea protejată", | ||||
|     "started": "Sesiunea protejată este activă." | ||||
|   }, | ||||
|   "protected_session_password": { | ||||
|     "close_label": "Închide", | ||||
| @@ -1134,7 +1137,9 @@ | ||||
|     "force_full_sync_button": "Forțează sincronizare completă", | ||||
|     "full_sync_triggered": "S-a activat o sincronizare completă", | ||||
|     "sync_rows_filled_successfully": "Rândurile de sincronizare s-au completat cu succes", | ||||
|     "title": "Sincronizare" | ||||
|     "title": "Sincronizare", | ||||
|     "failed": "Eroare la sincronizare: {{message}}", | ||||
|     "finished-successfully": "Sincronizarea a avut succes." | ||||
|   }, | ||||
|   "sync_2": { | ||||
|     "config_title": "Configurația sincronizării", | ||||
| @@ -1281,7 +1286,8 @@ | ||||
|     "sort-by": "Ordonare după...", | ||||
|     "unprotect-subtree": "Deprotejează ierarhia", | ||||
|     "hoist-note": "Focalizează notița", | ||||
|     "unhoist-note": "Defocalizează notița" | ||||
|     "unhoist-note": "Defocalizează notița", | ||||
|     "converted-to-attachments": "{{count}} notițe au fost convertite în atașamente." | ||||
|   }, | ||||
|   "shared_info": { | ||||
|     "help_link": "Pentru informații vizitați <a href=\"https://triliumnext.github.io/Docs/Wiki/sharing.html\">wiki-ul</a>.", | ||||
| @@ -1370,7 +1376,9 @@ | ||||
|     "hide-archived-notes": "Ascunde notițele arhivate", | ||||
|     "save-changes": "Salvează și aplică modificările", | ||||
|     "scroll-active-title": "Mergi la notița activă", | ||||
|     "tree-settings-title": "Setări ale ierarhiei notițelor" | ||||
|     "tree-settings-title": "Setări ale ierarhiei notițelor", | ||||
|     "auto-collapsing-notes-after-inactivity": "Se minimizează notițele după inactivitate...", | ||||
|     "saved-search-note-refreshed": "Notița de căutare salvată a fost reîmprospătată." | ||||
|   }, | ||||
|   "title_bar_buttons": { | ||||
|     "window-on-top": "Menține fereastra mereu vizibilă" | ||||
| @@ -1424,5 +1432,20 @@ | ||||
|     "file_last_modified": "Fișierul <code class=\"file-path\"></code> a fost ultima oară modificat la data de <span class=\"file-last-modified\"></span>.", | ||||
|     "ignore_this_change": "Ignoră această schimbare", | ||||
|     "upload_modified_file": "Încarcă fișier modificat" | ||||
|   }, | ||||
|   "clipboard": { | ||||
|     "copied": "Notițele au fost copiate în clipboard.", | ||||
|     "cut": "Notițele au fost decupate în clipboard." | ||||
|   }, | ||||
|   "entrypoints": { | ||||
|     "note-executed": "Notița a fost executată.", | ||||
|     "note-revision-created": "S-a creat o revizie a notiței." | ||||
|   }, | ||||
|   "image": { | ||||
|     "cannot-copy": "Nu s-a putut copia în clipboard referința către imagine.", | ||||
|     "copied-to-clipboard": "S-a copiat o referință către imagine în clipboard. Aceasta se poate lipi în orice notiță text." | ||||
|   }, | ||||
|   "note_create": { | ||||
|     "duplicated": "Notița „{{title}}” a fost dublificată." | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user