-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Localize the issue due date events #24055
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -295,7 +295,9 @@ | |
{{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"}} | ||
{{template "shared/datetime/short" (dict "Datetime" .Content "Fallback" .Content)}} | ||
{{$createdStr}} | ||
Comment on lines
+298
to
+300
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can only see one suitable solution that will take some refactoring: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It could be like this:
Then pass the |
||
</span> | ||
</div> | ||
{{else if eq .Type 17}} | ||
|
@@ -305,7 +307,11 @@ | |
<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}} | ||
{{$.locale.Tr "repo.issues.due_date_modified_from"}} | ||
{{template "shared/datetime/short" (dict "Datetime" (index $parsedDeadline 1) "Fallback" (index $parsedDeadline 1))}} | ||
{{$.locale.Tr "repo.issues.due_date_modified_to"}} | ||
{{template "shared/datetime/short" (dict "Datetime" (index $parsedDeadline 0) "Fallback" (index $parsedDeadline 0))}} | ||
{{$createdStr}} | ||
</span> | ||
</div> | ||
{{else if eq .Type 18}} | ||
|
@@ -314,7 +320,9 @@ | |
{{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"}} | ||
{{template "shared/datetime/short" (dict "Datetime" .Content "Fallback" .Content)}} | ||
{{$createdStr}} | ||
</span> | ||
</div> | ||
{{else if eq .Type 19}} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better not to do so. At least, wait for a proper i18n system (with correct datetime support)