forked from Sync/hugo-theme-stack
feat: i18n support for codeblock copy text
This commit is contained in:
parent
7a710cbb55
commit
d89def07ac
@ -19,6 +19,9 @@ article:
|
||||
readingTime:
|
||||
one: "{{ .Count }} minute read"
|
||||
other: "{{ .Count }} minute read"
|
||||
codeblock:
|
||||
copy: Copy
|
||||
copied: Copied!
|
||||
|
||||
notFound:
|
||||
title: Not Found
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user