diff options
author | Yarden Shoham <git@yardenshoham.com> | 2023-04-12 09:29:49 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 02:29:49 -0400 |
commit | 97176754beb4de23fa0f68df715c4737919c93b0 (patch) | |
tree | daa2bba8a913fb607d567dffeac7795c3284a0ff /templates | |
parent | 8aada1849f949d0c7f023f11061cacc957e0df8f (diff) | |
download | gitea-97176754beb4de23fa0f68df715c4737919c93b0.tar.gz gitea-97176754beb4de23fa0f68df715c4737919c93b0.zip |
Localize milestone related time strings (#24051)
- With #23988 in place, we can improve these timestamps
---------
Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/issue/milestone_issues.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/milestones.tmpl | 4 | ||||
-rw-r--r-- | templates/user/dashboard/milestones.tmpl | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/templates/repo/issue/milestone_issues.tmpl b/templates/repo/issue/milestone_issues.tmpl index c3c25843e8..1d55eb39cd 100644 --- a/templates/repo/issue/milestone_issues.tmpl +++ b/templates/repo/issue/milestone_issues.tmpl @@ -35,7 +35,7 @@ {{else}} {{svg "octicon-calendar"}} {{if .Milestone.DeadlineString}} - <span {{if .IsOverdue}}class="overdue"{{end}}>{{.Milestone.DeadlineString}}</span> + <span {{if .IsOverdue}}class="overdue"{{end}}>{{template "shared/datetime/short" (dict "Datetime" .Milestone.DeadlineString "Fallback" .Milestone.DeadlineString)}}</span> {{else}} {{$.locale.Tr "repo.milestones.no_due_date"}} {{end}} diff --git a/templates/repo/issue/milestones.tmpl b/templates/repo/issue/milestones.tmpl index 42a6c4f919..2864d38a08 100644 --- a/templates/repo/issue/milestones.tmpl +++ b/templates/repo/issue/milestones.tmpl @@ -77,7 +77,7 @@ {{else}} {{svg "octicon-calendar"}} {{if .DeadlineString}} - <span {{if .IsOverdue}}class="overdue"{{end}}>{{.DeadlineString}}</span> + <span {{if .IsOverdue}}class="overdue"{{end}}>{{template "shared/datetime/short" (dict "Datetime" .DeadlineString "Fallback" .DeadlineString)}}</span> {{else}} {{$.locale.Tr "repo.milestones.no_due_date"}} {{end}} @@ -88,7 +88,7 @@ {{svg "octicon-check" 16 "gt-mr-3"}} {{LocaleNumber .NumClosedIssues}} {{$.locale.Tr "repo.issues.closed_title"}} {{if .TotalTrackedTime}}{{svg "octicon-clock"}} {{.TotalTrackedTime|Sec2Time}}{{end}} - {{if .UpdatedUnix}}{{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.update_ago" (.TimeSinceUpdate|Sec2Time)}}{{end}} + {{if .UpdatedUnix}}{{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.updated"}} {{TimeSinceUnix .UpdatedUnix $.locale}}{{end}} </span> </div> {{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}} diff --git a/templates/user/dashboard/milestones.tmpl b/templates/user/dashboard/milestones.tmpl index 6788aa09a2..9915159721 100644 --- a/templates/user/dashboard/milestones.tmpl +++ b/templates/user/dashboard/milestones.tmpl @@ -97,7 +97,7 @@ {{else}} {{svg "octicon-calendar"}} {{if .DeadlineString}} - <span {{if .IsOverdue}}class="overdue"{{end}}>{{.DeadlineString}}</span> + <span {{if .IsOverdue}}class="overdue"{{end}}>{{template "shared/datetime/short" (dict "Datetime" .DeadlineString "Fallback" .DeadlineString)}}</span> {{else}} {{$.locale.Tr "repo.milestones.no_due_date"}} {{end}} |