File tree 4 files changed +2
-15
lines changed
4 files changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -125,8 +125,6 @@ number_of_contributions_in_the_last_12_months = %s contributions in the last 12
125
125
no_contributions = No contributions
126
126
less = Less
127
127
more = More
128
- number_of_contributions_on_date_n = <b>%[2]s contributions</b> on %[1]s
129
- number_of_contributions_on_date_1 = <b>1 contribution</b> on %[1]s
130
128
131
129
[editor]
132
130
buttons.heading.tooltip = Add heading
Original file line number Diff line number Diff line change 5
5
data-locale-no-contributions="{{.locale.Tr "heatmap.no_contributions"}}"
6
6
data-locale-more="{{.locale.Tr "heatmap.more"}}"
7
7
data-locale-less="{{.locale.Tr "heatmap.less"}}"
8
- data-locale-contributions-on-n="{{.locale.Tr "heatmap.number_of_contributions_on_date_n"}}"
9
- data-locale-contributions-on-1="{{.locale.Tr "heatmap.number_of_contributions_on_date_1"}}"
10
8
>
11
9
<div slot="loading">
12
10
<div class="ui active centered inline indeterminate text loader" id="loading-heatmap">{{.locale.Tr "user.heatmap.loading"}}</div>
Original file line number Diff line number Diff line change 5
5
<calendar-heatmap
6
6
:locale =" locale"
7
7
:no-data-text =" locale.no_contributions"
8
- :tooltip-formatter = " (v) => tooltipFormatter(v, locale) "
8
+ :tooltip-unit = " locale.contributions "
9
9
:end-date =" endDate"
10
10
:values =" values"
11
11
:range-color =" colorRange"
@@ -64,14 +64,6 @@ export default {
64
64
65
65
const newSearch = params .toString ();
66
66
window .location .search = newSearch .length ? ` ?${ newSearch} ` : ' ' ;
67
- },
68
- tooltipFormatter (v , locale ) {
69
- const number = v .count .toLocaleString ();
70
- const datetime = v .date .toISOString ();
71
- const fallback = v .date .toLocaleDateString ();
72
- const date = ` <relative-time format="datetime" year="numeric" month="short" day="numeric" weekday="" datetime="${ datetime} ">${ fallback} </relative-time>` ;
73
- const stringToFormat = v .count === 1 ? locale .contributions_on_1 : locale .contributions_on_n ;
74
- return stringToFormat .replace (' %[2]s' , number).replace (' %[1]s' , date);
75
67
}
76
68
},
77
69
};
Original file line number Diff line number Diff line change @@ -21,12 +21,11 @@ export function initHeatmap() {
21
21
const locale = {
22
22
months : new Array ( 12 ) . fill ( ) . map ( ( _ , idx ) => translateMonth ( idx ) ) ,
23
23
days : new Array ( 7 ) . fill ( ) . map ( ( _ , idx ) => translateDay ( idx ) ) ,
24
+ contributions : 'contributions' ,
24
25
contributions_in_the_last_12_months_html : el . getAttribute ( 'data-locale-total-contributions-html' ) ,
25
26
no_contributions : el . getAttribute ( 'data-locale-no-contributions' ) ,
26
27
more : el . getAttribute ( 'data-locale-more' ) ,
27
28
less : el . getAttribute ( 'data-locale-less' ) ,
28
- contributions_on_n : el . getAttribute ( 'data-locale-contributions-on-n' ) ,
29
- contributions_on_1 : el . getAttribute ( 'data-locale-contributions-on-1' ) ,
30
29
} ;
31
30
32
31
const View = createApp ( ActivityHeatmap , { values, locale} ) ;
You can’t perform that action at this time.
0 commit comments