Skip to content

Build your personal knowledge base with Trilium Notes

chore(client): use translations

Elian Doran426549a18981
diff --git a/apps/client/src/services/syntax_highlight.ts b/apps/client/src/services/syntax_highlight.ts
index 09d18f3a09..f6b7f8ff72 100644
--- a/apps/client/src/services/syntax_highlight.ts
+++ b/apps/client/src/services/syntax_highlight.ts
@@ -36,6 +36,7 @@ export async function formatCodeBlocks($container: JQuery<HTMLElement>) {
export function applyCopyToClipboardButton($codeBlock: JQuery<HTMLElement>) {
const $copyButton = $("<button>")
.addClass("bx component btn tn-tool-button bx-copy copy-button")
+ .attr("title", t("code_block.copy_title"))
.on("click", () => {
const text = $codeBlock.text();
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index cc3884e92f..7008ed7d83 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -1832,7 +1832,8 @@
"theme_group_light": "Light 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."
+ "copy_failed": "The code block could not be copied to the clipboard due to lack of permissions.",
+ "copy_title": "Copy to clipboard"
},
"classic_editor_toolbar": {
"title": "Formatting"