aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorYarden Shoham <git@yardenshoham.com>2023-04-17 21:26:01 +0300
committerGitHub <noreply@github.com>2023-04-17 14:26:01 -0400
commitf045e58cc7ba076a0ac4b0b5bf0702fa155eaa59 (patch)
tree1df8a5337e1f915e3f8aae79d0c317668cd8b401 /templates
parent5eb4c6386709259a9280c5aad6e0488f381144c5 (diff)
downloadgitea-f045e58cc7ba076a0ac4b0b5bf0702fa155eaa59.tar.gz
gitea-f045e58cc7ba076a0ac4b0b5bf0702fa155eaa59.zip
Localize activity heatmap (except tooltip) (#24131)
The calculation of the total sum is moved to the backend so a full HTML string could be sent. ![image](https://user-images.githubusercontent.com/20454870/232112381-c11d896b-ba47-40f8-b2a3-71cf4b3208de.png) - Closes #10669 - 2nd attempt (the first was in #21570) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'templates')
-rw-r--r--templates/user/heatmap.tmpl8
1 files changed, 7 insertions, 1 deletions
diff --git a/templates/user/heatmap.tmpl b/templates/user/heatmap.tmpl
index 9d58bc8fc5..5d42a5435b 100644
--- a/templates/user/heatmap.tmpl
+++ b/templates/user/heatmap.tmpl
@@ -1,5 +1,11 @@
{{if .HeatmapData}}
- <div id="user-heatmap" data-heatmap-data="{{Json .HeatmapData}}">
+ <div id="user-heatmap"
+ data-heatmap-data="{{Json .HeatmapData}}"
+ data-locale-total-contributions="{{$.locale.Tr "heatmap.number_of_contributions_in_the_last_12_months" ($.locale.PrettyNumber .HeatmapTotalContributions)}}"
+ data-locale-no-contributions="{{.locale.Tr "heatmap.no_contributions"}}"
+ data-locale-more="{{.locale.Tr "heatmap.more"}}"
+ data-locale-less="{{.locale.Tr "heatmap.less"}}"
+ >
<div slot="loading">
<div class="ui active centered inline indeterminate text loader" id="loading-heatmap">{{.locale.Tr "user.heatmap.loading"}}</div>
</div>