Skip to content

Commit 96c9702

Browse files
committed
Add i18n support for heatmap
1 parent e286018 commit 96c9702

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

layouts/shortcodes/heatmap.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<div>
4141
<div style="display: flex; justify-content: center; align-items: center">
4242
<p style="margin-right: 15px; margin-bottom: 0; padding: 8px">
43-
Article Activity
43+
{{ default "Article Activity" (.Get "title_text") }}
4444
</p>
4545
<select id="yearSelector">
4646
<!-- Years will be dynamically added here -->
@@ -229,10 +229,10 @@
229229
yearLabel: { show: false },
230230
dayLabel: {
231231
firstDay: 1,
232-
nameMap: 'EN'
232+
nameMap: {{ default "EN" (.Get "language")}}
233233
},
234234
monthLabel: {
235-
nameMap: 'EN'
235+
nameMap: {{ default "EN" (.Get "language")}}
236236
},
237237
splitLine: {
238238
show: false,
@@ -242,7 +242,7 @@
242242
hideDelay: 1000,
243243
enterable: true,
244244
formatter: function (params) {
245-
const thousandWordsText = 'k words';
245+
const thousandWordsText = {{ default "EN" (.Get "language")}} === "EN" ? 'k words': '千字';
246246
const date = params.data[0];
247247
const posts = postsByDate.get(date).get("posts");
248248
var content = `${date}`;

0 commit comments

Comments
 (0)