Skip to content

Commit 5ec60d9

Browse files
authored
Merge pull request #20847 from dvdksn/use-i18n-strings
hugo: use i18n strings in callouts
2 parents 21b37d3 + 3249110 commit 5ec60d9

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

i18n/en.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ important: Important
1717
note: Note
1818
tip: Tip
1919
warning: Warning
20+
caution: Caution
2021

2122
## openapi strings:
2223

layouts/_default/_markup/render-blockquote.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<span class="icon-svg pb-1">{{ $i := index $icons .AlertType }}
2929
{{ partialCached "icon.html" $i $i }}
3030
</span>
31-
<strong>{{ or (i18n .AlertType) (title .AlertType) }}</strong>
31+
<strong>{{ i18n .AlertType }}</strong>
3232
</p>
3333
{{ .Text | safeHTML }}
3434
</blockquote>

layouts/shortcodes/experimental.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<span class="icon-svg pb-1">
44
{{ partialCached "icon.html" "science" "science" }}
55
</span>
6-
<strong>{{ .Get "title" | default "Experimental" }}</strong>
6+
<strong>{{ .Get "title" | default (i18n "experimental") }}</strong>
77
</p>
88
{{ .InnerDeindent | safe.HTML }}
99
</div>

layouts/shortcodes/restricted.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<span class="icon-svg pb-1">
44
{{ partialCached "icon.html" "rocket_launch" "rocket_launch" }}
55
</span>
6-
<strong>{{ .Get "title" | default "Restricted" }}</strong>
6+
<strong>{{ .Get "title" | default (i18n "restricted") }}</strong>
77
</p>
88
{{ .InnerDeindent | safe.HTML }}
99
</div>

0 commit comments

Comments
 (0)