mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +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:
@@ -7,20 +7,20 @@
|
||||
{{template "base/alert" .}}
|
||||
{{if .Repository.IsArchived}}
|
||||
<div class="ui warning message">
|
||||
{{.i18n.Tr "repo.archive.title"}}
|
||||
{{.locale.Tr "repo.archive.title"}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .Repository.IsBroken}}
|
||||
<div class="ui segment center">
|
||||
{{.i18n.Tr "repo.broken_message"}}
|
||||
{{.locale.Tr "repo.broken_message"}}
|
||||
</div>
|
||||
{{else if .CanWriteCode}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.quick_guide"}}
|
||||
{{.locale.Tr "repo.quick_guide"}}
|
||||
</h4>
|
||||
<div class="ui attached guide table segment empty-repo-guide">
|
||||
<div class="item">
|
||||
<h3>{{.i18n.Tr "repo.clone_this_repo"}} <small>{{.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</small></h3>
|
||||
<h3>{{.locale.Tr "repo.clone_this_repo"}} <small>{{.locale.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</small></h3>
|
||||
<div class="ui action small input">
|
||||
{{template "repo/clone_buttons" .}}
|
||||
</div>
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="ui divider"></div>
|
||||
|
||||
<div class="item">
|
||||
<h3>{{.i18n.Tr "repo.create_new_repo_command"}}</h3>
|
||||
<h3>{{.locale.Tr "repo.create_new_repo_command"}}</h3>
|
||||
<div class="markup">
|
||||
<pre><code>touch README.md
|
||||
git init
|
||||
@@ -44,7 +44,7 @@ git push -u origin {{.Repository.DefaultBranch}}</code></pre>
|
||||
<div class="ui divider"></div>
|
||||
|
||||
<div class="item">
|
||||
<h3>{{.i18n.Tr "repo.push_exist_repo"}}</h3>
|
||||
<h3>{{.locale.Tr "repo.push_exist_repo"}}</h3>
|
||||
<div class="markup">
|
||||
<pre><code>git remote add origin <span class="clone-url"></span>
|
||||
git push -u origin {{.Repository.DefaultBranch}}</code></pre>
|
||||
@@ -67,7 +67,7 @@ git push -u origin {{.Repository.DefaultBranch}}</code></pre>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<div class="ui segment center">
|
||||
{{.i18n.Tr "repo.empty_message"}}
|
||||
{{.locale.Tr "repo.empty_message"}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user