mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	chore(client): use translations
This commit is contained in:
		
							parent
							
								
									b177e7a637
								
							
						
					
					
						commit
						612566d9d2
					
				@ -2,6 +2,7 @@ import { ensureMimeTypes, highlight, highlightAuto, loadTheme, Themes } from "@t
 | 
				
			|||||||
import mime_types from "./mime_types.js";
 | 
					import mime_types from "./mime_types.js";
 | 
				
			||||||
import options from "./options.js";
 | 
					import options from "./options.js";
 | 
				
			||||||
import toast from "./toast.js";
 | 
					import toast from "./toast.js";
 | 
				
			||||||
 | 
					import { t } from "./i18n.js";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
let highlightingLoaded = false;
 | 
					let highlightingLoaded = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -40,9 +41,9 @@ export function applyCopyToClipboardButton($codeBlock: JQuery<HTMLElement>) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            try {
 | 
					            try {
 | 
				
			||||||
                navigator.clipboard.writeText(text);
 | 
					                navigator.clipboard.writeText(text);
 | 
				
			||||||
                toast.showMessage("The code block was copied to clipboard.");
 | 
					                toast.showMessage(t("code_block.copy_success"));
 | 
				
			||||||
            } catch (e) {
 | 
					            } catch (e) {
 | 
				
			||||||
                toast.showError("The code block could not be copied to the clipboard due to lack of permissions.");
 | 
					                toast.showError(t("code_block.copy_failed"));
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    $codeBlock.parent().append($copyButton);
 | 
					    $codeBlock.parent().append($copyButton);
 | 
				
			||||||
 | 
				
			|||||||
@ -1830,7 +1830,9 @@
 | 
				
			|||||||
    "word_wrapping": "Word wrapping",
 | 
					    "word_wrapping": "Word wrapping",
 | 
				
			||||||
    "theme_none": "No syntax highlighting",
 | 
					    "theme_none": "No syntax highlighting",
 | 
				
			||||||
    "theme_group_light": "Light themes",
 | 
					    "theme_group_light": "Light themes",
 | 
				
			||||||
    "theme_group_dark": "Dark themes"
 | 
					    "theme_group_dark": "Dark themes",
 | 
				
			||||||
 | 
					    "copy_success": "The code block was copied to clipboard.",
 | 
				
			||||||
 | 
					    "copy_failed": "The code block could not be copied to the clipboard due to lack of permissions."
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "classic_editor_toolbar": {
 | 
					  "classic_editor_toolbar": {
 | 
				
			||||||
    "title": "Formatting"
 | 
					    "title": "Formatting"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user