diff options
author | delvh <dev.lh@web.de> | 2023-09-25 10:56:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-25 08:56:50 +0000 |
commit | 7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e (patch) | |
tree | cfcc4836ba1bb71518742f2aaf980f1f34248468 /templates/admin/packages | |
parent | e6d8b146207de0f5d88b7c08dc75b1f2f078cbbe (diff) | |
download | gitea-7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e.tar.gz gitea-7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e.zip |
Always use `ctx.Locale.Tr` inside templates (#27231)
Diffstat (limited to 'templates/admin/packages')
-rw-r--r-- | templates/admin/packages/list.tmpl | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/templates/admin/packages/list.tmpl b/templates/admin/packages/list.tmpl index 5d54fb3e82..85b44a6a94 100644 --- a/templates/admin/packages/list.tmpl +++ b/templates/admin/packages/list.tmpl @@ -1,13 +1,13 @@ {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}} <div class="admin-setting-content"> <h4 class="ui top attached header"> - {{.locale.Tr "admin.packages.package_manage_panel"}} ({{.locale.Tr "admin.total" .TotalCount}}, - {{.locale.Tr "admin.packages.total_size" (FileSize .TotalBlobSize)}}, - {{.locale.Tr "admin.packages.unreferenced_size" (FileSize .TotalUnreferencedBlobSize)}}) + {{ctx.Locale.Tr "admin.packages.package_manage_panel"}} ({{.locale.Tr "admin.total" .TotalCount}}, + {{ctx.Locale.Tr "admin.packages.total_size" (FileSize .TotalBlobSize)}}, + {{ctx.Locale.Tr "admin.packages.unreferenced_size" (FileSize .TotalUnreferencedBlobSize)}}) <div class="ui right"> <form method="post" action="/admin/packages/cleanup"> {{.CsrfTokenHtml}} - <button class="ui primary tiny button">{{.locale.Tr "admin.packages.cleanup"}}</button> + <button class="ui primary tiny button">{{ctx.Locale.Tr "admin.packages.cleanup"}}</button> </form> </div> </h4> @@ -16,13 +16,13 @@ <div class="ui fluid action input"> {{template "shared/searchinput" dict "Value" .Query "AutoFocus" true}} <select class="ui dropdown" name="type"> - <option value="">{{.locale.Tr "packages.filter.type"}}</option> - <option value="all">{{.locale.Tr "packages.filter.type.all"}}</option> + <option value="">{{ctx.Locale.Tr "packages.filter.type"}}</option> + <option value="all">{{ctx.Locale.Tr "packages.filter.type.all"}}</option> {{range $type := .AvailableTypes}} <option{{if eq $.PackageType $type}} selected="selected"{{end}} value="{{$type}}">{{$type.Name}}</option> {{end}} </select> - <button class="ui primary button">{{.locale.Tr "explore.search"}}</button> + <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button> </div> </form> </div> @@ -31,24 +31,24 @@ <thead> <tr> <th>ID</th> - <th>{{.locale.Tr "admin.packages.owner"}}</th> - <th>{{.locale.Tr "admin.packages.type"}}</th> + <th>{{ctx.Locale.Tr "admin.packages.owner"}}</th> + <th>{{ctx.Locale.Tr "admin.packages.type"}}</th> <th data-sortt-asc="name_asc" data-sortt-desc="name_desc"> - {{.locale.Tr "admin.packages.name"}} + {{ctx.Locale.Tr "admin.packages.name"}} {{SortArrow "name_asc" "name_desc" .SortType false}} </th> <th data-sortt-asc="version_desc" data-sortt-desc="version_asc"> - {{.locale.Tr "admin.packages.version"}} + {{ctx.Locale.Tr "admin.packages.version"}} {{SortArrow "version_desc" "version_asc" .SortType false}} </th> - <th>{{.locale.Tr "admin.packages.creator"}}</th> - <th>{{.locale.Tr "admin.packages.repository"}}</th> - <th>{{.locale.Tr "admin.packages.size"}}</th> + <th>{{ctx.Locale.Tr "admin.packages.creator"}}</th> + <th>{{ctx.Locale.Tr "admin.packages.repository"}}</th> + <th>{{ctx.Locale.Tr "admin.packages.size"}}</th> <th data-sortt-asc="created_asc" data-sortt-desc="created_desc"> - {{.locale.Tr "admin.packages.published"}} + {{ctx.Locale.Tr "admin.packages.published"}} {{SortArrow "created_asc" "created_desc" .SortType true}} </th> - <th>{{.locale.Tr "admin.notices.op"}}</th> + <th>{{ctx.Locale.Tr "admin.notices.op"}}</th> </tr> </thead> <tbody> @@ -85,10 +85,10 @@ <div class="ui g-modal-confirm delete modal"> <div class="header"> {{svg "octicon-trash"}} - {{.locale.Tr "packages.settings.delete"}} + {{ctx.Locale.Tr "packages.settings.delete"}} </div> <div class="content"> - {{.locale.Tr "packages.settings.delete.notice" `<span class="name"></span>` `<span class="dataVersion"></span>` | Safe}} + {{ctx.Locale.Tr "packages.settings.delete.notice" `<span class="name"></span>` `<span class="dataVersion"></span>` | Safe}} </div> {{template "base/modal_actions_confirm" .}} </div> |