Skip to content

Commit 0a8e401

Browse files
committed
add translation keys for copy button text
1 parent b089652 commit 0a8e401

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

i18n/en.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@
1717

1818
- id: home
1919
translation: "Home"
20+
21+
- id: copy
22+
translation: "copy"
23+
24+
- id: copied
25+
translation: "copied!"

layouts/partials/footer.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@
104104

105105
const copybutton = document.createElement('button');
106106
copybutton.classList.add('copy-code');
107-
copybutton.innerText = 'copy';
107+
copybutton.innerText = '{{- i18n "copy" | default "copy" }}';
108108

109109
function copyingDone() {
110-
copybutton.innerText = 'copied!';
110+
copybutton.innerText = '{{- i18n "copied" | default "copied!" }}';
111111
setTimeout(() => {
112-
copybutton.innerText = 'copy';
112+
copybutton.innerText = '{{- i18n "copy" | default "copy" }}';
113113
}, 2000);
114114
}
115115

0 commit comments

Comments
 (0)