mirror of
https://github.com/go-gitea/gitea
synced 2025-08-04 00:28:36 +00:00
Always use ctx.Locale.Tr
inside templates (#27231)
This commit is contained in:
@@ -4,18 +4,18 @@
|
||||
<div class="gt-df gt-ac gt-sb gt-mb-4">
|
||||
<div class="small-menu-items ui compact tiny menu">
|
||||
<a class="{{if eq .Status 1}}active {{end}}item" href="{{AppSubUrl}}/notifications?q=unread">
|
||||
{{.locale.Tr "notification.unread"}}
|
||||
{{ctx.Locale.Tr "notification.unread"}}
|
||||
<div class="notifications-unread-count ui label {{if not $notificationUnreadCount}}gt-hidden{{end}}">{{$notificationUnreadCount}}</div>
|
||||
</a>
|
||||
<a class="{{if eq .Status 2}}active {{end}}item" href="{{AppSubUrl}}/notifications?q=read">
|
||||
{{.locale.Tr "notification.read"}}
|
||||
{{ctx.Locale.Tr "notification.read"}}
|
||||
</a>
|
||||
</div>
|
||||
{{if and (eq .Status 1)}}
|
||||
<form action="{{AppSubUrl}}/notifications/purge" method="post">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<div class="{{if not $notificationUnreadCount}}gt-hidden{{end}}">
|
||||
<button class="ui mini button primary gt-mr-0" title="{{$.locale.Tr "notification.mark_all_as_read"}}">
|
||||
<button class="ui mini button primary gt-mr-0" title="{{ctx.Locale.Tr "notification.mark_all_as_read"}}">
|
||||
{{svg "octicon-checklist"}}
|
||||
</button>
|
||||
</div>
|
||||
@@ -28,9 +28,9 @@
|
||||
<div class="gt-df gt-ac gt-fc gt-p-4">
|
||||
{{svg "octicon-inbox" 56 "gt-mb-4"}}
|
||||
{{if eq .Status 1}}
|
||||
{{.locale.Tr "notification.no_unread"}}
|
||||
{{ctx.Locale.Tr "notification.no_unread"}}
|
||||
{{else}}
|
||||
{{.locale.Tr "notification.no_read"}}
|
||||
{{ctx.Locale.Tr "notification.no_read"}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{else}}
|
||||
@@ -74,7 +74,7 @@
|
||||
{{$.CsrfTokenHtml}}
|
||||
<input type="hidden" name="notification_id" value="{{.ID}}">
|
||||
<input type="hidden" name="status" value="pinned">
|
||||
<button class="btn interact-bg gt-p-3" title="{{$.locale.Tr "notification.pin"}}"
|
||||
<button class="btn interact-bg gt-p-3" title="{{ctx.Locale.Tr "notification.pin"}}"
|
||||
data-url="{{AppSubUrl}}/notifications/status"
|
||||
data-status="pinned"
|
||||
data-page="{{$.Page.Paginater.Current}}"
|
||||
@@ -90,7 +90,7 @@
|
||||
<input type="hidden" name="notification_id" value="{{.ID}}">
|
||||
<input type="hidden" name="status" value="read">
|
||||
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}">
|
||||
<button class="btn interact-bg gt-p-3" title="{{$.locale.Tr "notification.mark_as_read"}}"
|
||||
<button class="btn interact-bg gt-p-3" title="{{ctx.Locale.Tr "notification.mark_as_read"}}"
|
||||
data-url="{{AppSubUrl}}/notifications/status"
|
||||
data-status="read"
|
||||
data-page="{{$.Page.Paginater.Current}}"
|
||||
@@ -105,7 +105,7 @@
|
||||
<input type="hidden" name="notification_id" value="{{.ID}}">
|
||||
<input type="hidden" name="status" value="unread">
|
||||
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}">
|
||||
<button class="btn interact-bg gt-p-3" title="{{$.locale.Tr "notification.mark_as_unread"}}"
|
||||
<button class="btn interact-bg gt-p-3" title="{{ctx.Locale.Tr "notification.mark_as_unread"}}"
|
||||
data-url="{{AppSubUrl}}/notifications/status"
|
||||
data-status="unread"
|
||||
data-page="{{$.Page.Paginater.Current}}"
|
||||
|
Reference in New Issue
Block a user