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:
|
readingTime:
|
||||||
one: "{{ .Count }} minute read"
|
one: "{{ .Count }} minute read"
|
||||||
other: "{{ .Count }} minute read"
|
other: "{{ .Count }} minute read"
|
||||||
|
codeblock:
|
||||||
|
copy: Copy
|
||||||
|
copied: Copied!
|
||||||
|
|
||||||
notFound:
|
notFound:
|
||||||
title: Not Found
|
title: Not Found
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
<button
|
<button
|
||||||
class="codeblock-copy"
|
class="codeblock-copy"
|
||||||
data-id="codeblock-id-{{ .Ordinal }}"
|
data-id="codeblock-id-{{ .Ordinal }}"
|
||||||
data-copied-text="Copied!"
|
data-copied-text="{{ T `article.codeblock.copied` }}"
|
||||||
>
|
>
|
||||||
Copy
|
{{ T `article.codeblock.copy` }}
|
||||||
</button>
|
</button>
|
||||||
</header>
|
</header>
|
||||||
<code id="codeblock-id-{{ .Ordinal }}" style="display:none;">{{- .Inner -}}</code>
|
<code id="codeblock-id-{{ .Ordinal }}" style="display:none;">{{- .Inner -}}</code>
|
||||||
|
Loading…
Reference in New Issue
Block a user