Skip to content

Commit 39a2a4b

Browse files
committed
Localize number
1 parent cb7afee commit 39a2a4b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

web_src/js/components/ActivityHeatmap.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ export default {
6666
window.location.search = newSearch.length ? `?${newSearch}` : '';
6767
},
6868
tooltipFormatter(v, locale) {
69-
// TODO: use the localized number as below (why is it throwing Uncaught DOMException: Failed to execute
70-
// 'attachShadow' on 'Element': Shadow root cannot be created on a host which already hosts a shadow tree.?)
71-
// const number = `<gitea-locale-number data-number="${v.count}">${v.count}</gitea-locale-number>`;
72-
const number = v.count;
69+
const number = v.count.toLocaleString();
7370
const datetime = v.date.toISOString();
7471
const fallback = v.date.toLocaleDateString();
7572
const date = `<relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="${datetime}">${fallback}</relative-time>`;

0 commit comments

Comments
 (0)