feat: i18n support for codeblock copy text

This commit is contained in:
Jimmy Cai 2022-06-12 14:26:20 +00:00 committed by GitHub
parent 7a710cbb55
commit d89def07ac
2 changed files with 5 additions and 2 deletions

View File

@ -19,6 +19,9 @@ article:
readingTime:
one: "{{ .Count }} minute read"
other: "{{ .Count }} minute read"
codeblock:
copy: Copy
copied: Copied!
notFound:
title: Not Found

View File

@ -6,9 +6,9 @@
<button
class="codeblock-copy"
data-id="codeblock-id-{{ .Ordinal }}"
data-copied-text="Copied!"
data-copied-text="{{ T `article.codeblock.copied` }}"
>
Copy
{{ T `article.codeblock.copy` }}
</button>
</header>
<code id="codeblock-id-{{ .Ordinal }}" style="display:none;">{{- .Inner -}}</code>