aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features/heatmap.js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/features/heatmap.js')
-rw-r--r--web_src/js/features/heatmap.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/web_src/js/features/heatmap.js b/web_src/js/features/heatmap.js
index 6e6202e866..368ddd0d77 100644
--- a/web_src/js/features/heatmap.js
+++ b/web_src/js/features/heatmap.js
@@ -1,6 +1,6 @@
import {createApp} from 'vue';
import ActivityHeatmap from '../components/ActivityHeatmap.vue';
-
+import {translateMonth, translateDay} from '../utils.js';
export default function initHeatmap() {
const el = document.getElementById('user-heatmap');
if (!el) return;
@@ -17,7 +17,14 @@ export default function initHeatmap() {
return {date: new Date(v), count: heatmap[v]};
});
- const View = createApp(ActivityHeatmap, {values});
+ const locale = {
+ months: new Array(12).fill().map((_, idx) => translateMonth(idx)),
+ days: new Array(7).fill().map((_, idx) => translateDay(idx)),
+ contributions: 'contributions',
+ no_contributions: 'No contributions',
+ };
+
+ const View = createApp(ActivityHeatmap, {values, locale});
View.mount(el);
} catch (err) {