Skip to content

Commit

Permalink
Localize due date
Browse files Browse the repository at this point in the history
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
  • Loading branch information
yardenshoham committed Apr 22, 2023
1 parent a4ba062 commit 015c407
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions templates/repo/issue/view_content/comments.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@
{{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.due_date_added" .Content $createdStr | Safe}}
{{$.locale.Tr "repo.issues.due_date_added" (DateTime "long" .Content .Content) $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 17}}
Expand All @@ -305,7 +305,9 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$parsedDeadline := .Content | ParseDeadline}}
{{$.locale.Tr "repo.issues.due_date_modified" (index $parsedDeadline 0) (index $parsedDeadline 1) $createdStr | Safe}}
{{$from := DateTime "long" (index $parsedDeadline 1) (index $parsedDeadline 1)}}
{{$to := DateTime "long" (index $parsedDeadline 0) (index $parsedDeadline 0)}}
{{$.locale.Tr "repo.issues.due_date_modified" $to $from $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 18}}
Expand All @@ -314,7 +316,7 @@
{{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.due_date_remove" .Content $createdStr | Safe}}
{{$.locale.Tr "repo.issues.due_date_remove" (DateTime "long" .Content .Content) $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 19}}
Expand Down

0 comments on commit 015c407

Please sign in to comment.