diff options
author | Gusted <williamzijl7@hotmail.com> | 2022-06-27 22:58:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-27 15:58:46 -0500 |
commit | d55a0b723809f5b94acd948b924c8518014445e0 (patch) | |
tree | 0ef9ea54f30769ca1d16ce20e551bd7a078f7f5e /templates/user/project.tmpl | |
parent | b551bc2a089d3310dde5706d1b9702f112fe3ea0 (diff) | |
download | gitea-d55a0b723809f5b94acd948b924c8518014445e0.tar.gz gitea-d55a0b723809f5b94acd948b924c8518014445e0.zip |
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
Diffstat (limited to 'templates/user/project.tmpl')
-rw-r--r-- | templates/user/project.tmpl | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/templates/user/project.tmpl b/templates/user/project.tmpl index a385e0bdc5..b03787e5ef 100644 --- a/templates/user/project.tmpl +++ b/templates/user/project.tmpl @@ -5,12 +5,12 @@ <form class="ui form" action="{{.Link}}" method="post"> {{.CsrfTokenHtml}} <h3 class="ui top attached header"> - {{.i18n.Tr "new_project"}} + {{.locale.Tr "new_project"}} </h3> <div class="ui attached segment"> {{template "base/alert" .}} <div class="inline required field {{if .Err_Owner}}error{{end}}"> - <label>{{.i18n.Tr "repo.owner"}}</label> + <label>{{.locale.Tr "repo.owner"}}</label> <div class="ui selection owner dropdown"> <input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required> <span class="text truncated-item-container" title="{{.ContextUser.Name}}"> @@ -34,22 +34,22 @@ </div> <div class="inline field {{if .Err_Title}}error{{end}}"> - <label>{{.i18n.Tr "repo.projects.title"}}</label> - <input name="title" placeholder="{{.i18n.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required> + <label>{{.locale.Tr "repo.projects.title"}}</label> + <input name="title" placeholder="{{.locale.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required> </div> <div class="inline field"> - <label>{{.i18n.Tr "repo.projects.desc"}}</label> + <label>{{.locale.Tr "repo.projects.desc"}}</label> <textarea name="content">{{.content}}</textarea> </div> <div class="inline field"> - <label>{{.i18n.Tr "repo.projects.template.desc"}}</label> + <label>{{.locale.Tr "repo.projects.template.desc"}}</label> <div class="ui selection dropdown"> <input type="hidden" name="board_type" value="{{.type}}"> - <div class="default text">{{.i18n.Tr "repo.projects.template.desc_helper"}}</div> + <div class="default text">{{.locale.Tr "repo.projects.template.desc_helper"}}</div> <div class="menu"> {{range $element := .ProjectTypes}} - <div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{$.i18n.Tr $element.Translation}}</div> + <div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{$.locale.Tr $element.Translation}}</div> {{end}} </div> </div> @@ -58,9 +58,9 @@ <div class="inline field"> <label></label> <button class="ui green button"> - {{.i18n.Tr "repo.projects.create" }} + {{.locale.Tr "repo.projects.create" }} </button> - <a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a> + <a class="ui button" href="{{AppSubUrl}}/">{{.locale.Tr "cancel"}}</a> </div> </div> </form> |