@@ -20,13 +20,16 @@ export function initHeatmap() {
2020
2121 // last heatmap tooltip localization attempt https://github.com/go-gitea/gitea/pull/24131/commits/a83761cbbae3c2e3b4bced71e680f44432073ac8
2222 const locale = {
23- months : new Array ( 12 ) . fill ( ) . map ( ( _ , idx ) => translateMonth ( idx ) ) ,
24- days : new Array ( 7 ) . fill ( ) . map ( ( _ , idx ) => translateDay ( idx ) ) ,
25- contributions : 'contributions' ,
26- contributions_in_the_last_12_months : el . getAttribute ( 'data-locale-total-contributions' ) ,
27- no_contributions : el . getAttribute ( 'data-locale-no-contributions' ) ,
28- more : el . getAttribute ( 'data-locale-more' ) ,
29- less : el . getAttribute ( 'data-locale-less' ) ,
23+ heatMapLocale : {
24+ months : new Array ( 12 ) . fill ( ) . map ( ( _ , idx ) => translateMonth ( idx ) ) ,
25+ days : new Array ( 7 ) . fill ( ) . map ( ( _ , idx ) => translateDay ( idx ) ) ,
26+ on : ' - ' , // no correct locale support for it, because in many languages the sentence is not "something on someday"
27+ more : el . getAttribute ( 'data-locale-more' ) ,
28+ less : el . getAttribute ( 'data-locale-less' ) ,
29+ } ,
30+ tooltipUnit : 'contributions' ,
31+ textTotalContributions : el . getAttribute ( 'data-locale-total-contributions' ) ,
32+ noDataText : el . getAttribute ( 'data-locale-no-contributions' ) ,
3033 } ;
3134
3235 const View = createApp ( ActivityHeatmap , { values, locale} ) ;
0 commit comments