mirror of
https://github.com/go-gitea/gitea
synced 2025-08-09 11:08:19 +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:
@@ -12,22 +12,22 @@
|
||||
</a>
|
||||
<div class="labels df ac fw">
|
||||
{{if .IsArchived}}
|
||||
<span class="ui basic label">{{$.i18n.Tr "repo.desc.archived"}}</span>
|
||||
<span class="ui basic label">{{$.locale.Tr "repo.desc.archived"}}</span>
|
||||
{{end}}
|
||||
{{if .IsTemplate}}
|
||||
{{if .IsPrivate}}
|
||||
<span class="ui basic label">{{$.i18n.Tr "repo.desc.private_template"}}</span>
|
||||
<span class="ui basic label">{{$.locale.Tr "repo.desc.private_template"}}</span>
|
||||
{{else}}
|
||||
{{if .Owner.Visibility.IsPrivate}}
|
||||
<span class="ui basic label">{{$.i18n.Tr "repo.desc.internal_template"}}</span>
|
||||
<span class="ui basic label">{{$.locale.Tr "repo.desc.internal_template"}}</span>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{if .IsPrivate}}
|
||||
<span class="ui basic label">{{$.i18n.Tr "repo.desc.private"}}</span>
|
||||
<span class="ui basic label">{{$.locale.Tr "repo.desc.private"}}</span>
|
||||
{{else}}
|
||||
{{if .Owner.Visibility.IsPrivate}}
|
||||
<span class="ui basic label">{{$.i18n.Tr "repo.desc.internal"}}</span>
|
||||
<span class="ui basic label">{{$.locale.Tr "repo.desc.internal"}}</span>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -60,12 +60,12 @@
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.i18n}}</p>
|
||||
<p class="time">{{$.locale.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.locale}}</p>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div>
|
||||
{{$.i18n.Tr "explore.repo_no_results"}}
|
||||
{{$.locale.Tr "explore.repo_no_results"}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user