Fix heatmap localization

Fixes #2552

(cherry picked from commit 708f4bc3b6)
This commit is contained in:
0ko 2024-03-19 14:37:03 +05:00 committed by Earl Warren
parent cc1c000ac8
commit 26e4af4268
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
25 changed files with 57 additions and 33 deletions

View file

@ -59,8 +59,22 @@ export default {
</div>
<calendar-heatmap
:locale="locale"
:no-data-text="locale.no_contributions"
:tooltip-unit="locale.contributions"
:no-data-text="locale.contributions_zero"
:tooltip-formatter="
(v) =>
locale.contributions_format
.replace(
'{contributions}',
`<b>${v.count} ${
v.count === 1
? locale.contributions_one
: locale.contributions_few
}</b>`
)
.replace('{month}', locale.months[v.date.getMonth()])
.replace('{day}', v.date.getDate())
.replace('{year}', v.date.getFullYear())
"
:end-date="endDate"
:values="values"
:range-color="colorRange"