mirror of
https://github.com/go-gitea/gitea
synced 2025-07-27 04:38:36 +00:00
Refactor i18n
to locale
(#20153)
* Refactor `i18n` to `locale` - Currently we're using the `i18n` variable naming for the `locale` struct. This contains locale's specific information and cannot be used for general i18n purpose, therefore refactoring it to `locale` makes more sense. - Ref: https://github.com/go-gitea/gitea/pull/20096#discussion_r906699200 * Update routers/install/install.go
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.repos"}}
|
||||
{{.locale.Tr "settings.repos"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{if or .allowAdopt .allowDelete}}
|
||||
@@ -29,7 +29,7 @@
|
||||
<a class="name" href="{{$repo.Link}}">{{$repo.OwnerName}}/{{$repo.Name}}</a>
|
||||
<span>{{FileSize $repo.Size}}</span>
|
||||
{{if $repo.IsFork}}
|
||||
{{$.i18n.Tr "repo.forked_from"}}
|
||||
{{$.locale.Tr "repo.forked_from"}}
|
||||
<span><a href="{{$repo.BaseRepo.Link}}">{{$repo.BaseRepo.OwnerName}}/{{$repo.BaseRepo.Name}}</a></span>
|
||||
{{end}}
|
||||
{{else}}
|
||||
@@ -37,14 +37,14 @@
|
||||
<span class="name">{{$.Owner.Name}}/{{$dir}}</span>
|
||||
<div class="right floated content">
|
||||
{{if $.allowAdopt}}
|
||||
<button class="ui button submit tiny green adopt show-modal" data-modal="#adopt-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-plus"}}</span><span class="label">{{$.i18n.Tr "repo.adopt_preexisting_label"}}</span></button>
|
||||
<button class="ui button submit tiny green adopt show-modal" data-modal="#adopt-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-plus"}}</span><span class="label">{{$.locale.Tr "repo.adopt_preexisting_label"}}</span></button>
|
||||
<div class="ui basic modal" id="adopt-unadopted-modal-{{$dirI}}">
|
||||
{{svg "octicon-x" 16 "close inside"}}
|
||||
<div class="header">
|
||||
<span class="label">{{$.i18n.Tr "repo.adopt_preexisting"}}</span>
|
||||
<span class="label">{{$.locale.Tr "repo.adopt_preexisting"}}</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{$.i18n.Tr "repo.adopt_preexisting_content" $dir}}</p>
|
||||
<p>{{$.locale.Tr "repo.adopt_preexisting_content" $dir}}</p>
|
||||
</div>
|
||||
<form class="ui form" method="POST" action="{{AppSubUrl}}/user/settings/repos/unadopted">
|
||||
{{$.CsrfTokenHtml}}
|
||||
@@ -53,25 +53,25 @@
|
||||
<div class="actions">
|
||||
<div class="ui red basic inverted cancel button">
|
||||
<i class="remove icon"></i>
|
||||
{{$.i18n.Tr "modal.no"}}
|
||||
{{$.locale.Tr "modal.no"}}
|
||||
</div>
|
||||
<button class="ui green basic inverted ok button">
|
||||
<i class="checkmark icon"></i>
|
||||
{{$.i18n.Tr "modal.yes"}}
|
||||
{{$.locale.Tr "modal.yes"}}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if $.allowDelete}}
|
||||
<button class="ui button submit tiny red delete show-modal" data-modal="#delete-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-x"}}</span><span class="label">{{$.i18n.Tr "repo.delete_preexisting_label"}}</span></button>
|
||||
<button class="ui button submit tiny red delete show-modal" data-modal="#delete-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-x"}}</span><span class="label">{{$.locale.Tr "repo.delete_preexisting_label"}}</span></button>
|
||||
<div class="ui basic modal" id="delete-unadopted-modal-{{$dirI}}">
|
||||
{{svg "octicon-x" 16 "close inside"}}
|
||||
<div class="header">
|
||||
<span class="label">{{$.i18n.Tr "repo.delete_preexisting"}}</span>
|
||||
<span class="label">{{$.locale.Tr "repo.delete_preexisting"}}</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{$.i18n.Tr "repo.delete_preexisting_content" $dir}}</p>
|
||||
<p>{{$.locale.Tr "repo.delete_preexisting_content" $dir}}</p>
|
||||
</div>
|
||||
<form class="ui form" method="POST" action="{{AppSubUrl}}/user/settings/repos/unadopted">
|
||||
{{$.CsrfTokenHtml}}
|
||||
@@ -80,11 +80,11 @@
|
||||
<div class="actions">
|
||||
<div class="ui red basic inverted cancel button">
|
||||
<i class="remove icon"></i>
|
||||
{{$.i18n.Tr "modal.no"}}
|
||||
{{$.locale.Tr "modal.no"}}
|
||||
</div>
|
||||
<button class="ui green basic inverted ok button">
|
||||
<i class="checkmark icon"></i>
|
||||
{{$.i18n.Tr "modal.yes"}}
|
||||
{{$.locale.Tr "modal.yes"}}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@@ -99,7 +99,7 @@
|
||||
{{template "base/paginate" .}}
|
||||
{{else}}
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.repos_none"}}
|
||||
{{.locale.Tr "settings.repos_none"}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{else}}
|
||||
@@ -122,7 +122,7 @@
|
||||
<a class="name" href="{{.Link}}">{{.OwnerName}}/{{.Name}}</a>
|
||||
<span>{{FileSize .Size}}</span>
|
||||
{{if .IsFork}}
|
||||
{{$.i18n.Tr "repo.forked_from"}}
|
||||
{{$.locale.Tr "repo.forked_from"}}
|
||||
<span><a href="{{.BaseRepo.Link}}">{{.BaseRepo.OwnerName}}/{{.BaseRepo.Name}}</a></span>
|
||||
{{end}}
|
||||
</div>
|
||||
@@ -132,7 +132,7 @@
|
||||
{{template "base/paginate" .}}
|
||||
{{else}}
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.repos_none"}}
|
||||
{{.locale.Tr "settings.repos_none"}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -143,10 +143,10 @@
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.i18n.Tr "settings.remove_account_link"}}
|
||||
{{.locale.Tr "settings.remove_account_link"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.remove_account_link_desc"}}</p>
|
||||
<p>{{.locale.Tr "settings.remove_account_link_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user