summaryrefslogtreecommitdiffstats
path: root/templates/explore
diff options
context:
space:
mode:
authorYarden Shoham <hrsi88@gmail.com>2022-10-17 07:08:21 +0300
committerGitHub <noreply@github.com>2022-10-17 12:08:21 +0800
commitacdb92ad425b1f7035b677f430516ab4a9f645c2 (patch)
tree5b330de8147223502f49623fa71f8855edb7995a /templates/explore
parent683c9af89fea6eaa126e31f30270cc995fcb2e22 (diff)
downloadgitea-acdb92ad425b1f7035b677f430516ab4a9f645c2.tar.gz
gitea-acdb92ad425b1f7035b677f430516ab4a9f645c2.zip
Localize all timestamps (#21440)
Following * #21410 We are now able to localize all timestamps. Some examples: `short-date` format, French, user profile page: ![image](https://user-images.githubusercontent.com/20454870/195622461-aa0d5b93-f8df-42ad-881c-9c16606bf387.png) `date-time` format, Portuguese, mirror repository settings page: ![image](https://user-images.githubusercontent.com/20454870/195623191-7a37d77c-4a02-4140-846d-f290a65ea21d.png) Signed-off-by: Yarden Shoham <hrsi88@gmail.com> Signed-off-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: Gusted <williamzijl7@hotmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'templates/explore')
-rw-r--r--templates/explore/organizations.tmpl2
-rw-r--r--templates/explore/users.tmpl2
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/explore/organizations.tmpl b/templates/explore/organizations.tmpl
index 2073b8c69c..36267baf33 100644
--- a/templates/explore/organizations.tmpl
+++ b/templates/explore/organizations.tmpl
@@ -23,7 +23,7 @@
{{svg "octicon-link"}}
<a href="{{.Website}}" rel="nofollow">{{.Website}}</a>
{{end}}
- {{svg "octicon-clock"}} {{$.locale.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
+ {{svg "octicon-clock"}} {{$.locale.Tr "user.join_on"}} <time data-format="short-date" datetime="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</time>
</div>
</div>
</div>
diff --git a/templates/explore/users.tmpl b/templates/explore/users.tmpl
index 94a21d9959..5fb79c0dd0 100644
--- a/templates/explore/users.tmpl
+++ b/templates/explore/users.tmpl
@@ -18,7 +18,7 @@
{{svg "octicon-mail"}}
<a href="mailto:{{.Email}}" rel="nofollow">{{.Email}}</a>
{{end}}
- {{svg "octicon-clock"}} {{$.locale.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
+ {{svg "octicon-clock"}} {{$.locale.Tr "user.join_on"}} <time data-format="short-date" datetime="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</time>
</div>
</div>
</div>