Fix activity heat map padding & locale (#30823)
Fix #30808 --------- Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
parent
6ff2acc52c
commit
eb8bb82e58
4 changed files with 31 additions and 26 deletions
|
@ -20,13 +20,16 @@ export function initHeatmap() {
|
|||
|
||||
// last heatmap tooltip localization attempt https://github.com/go-gitea/gitea/pull/24131/commits/a83761cbbae3c2e3b4bced71e680f44432073ac8
|
||||
const locale = {
|
||||
months: new Array(12).fill().map((_, idx) => translateMonth(idx)),
|
||||
days: new Array(7).fill().map((_, idx) => translateDay(idx)),
|
||||
contributions: 'contributions',
|
||||
contributions_in_the_last_12_months: el.getAttribute('data-locale-total-contributions'),
|
||||
no_contributions: el.getAttribute('data-locale-no-contributions'),
|
||||
more: el.getAttribute('data-locale-more'),
|
||||
less: el.getAttribute('data-locale-less'),
|
||||
heatMapLocale: {
|
||||
months: new Array(12).fill().map((_, idx) => translateMonth(idx)),
|
||||
days: new Array(7).fill().map((_, idx) => translateDay(idx)),
|
||||
on: ' - ', // no correct locale support for it, because in many languages the sentence is not "something on someday"
|
||||
more: el.getAttribute('data-locale-more'),
|
||||
less: el.getAttribute('data-locale-less'),
|
||||
},
|
||||
tooltipUnit: 'contributions',
|
||||
textTotalContributions: el.getAttribute('data-locale-total-contributions'),
|
||||
noDataText: el.getAttribute('data-locale-no-contributions'),
|
||||
};
|
||||
|
||||
const View = createApp(ActivityHeatmap, {values, locale});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue