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/repo/wiki/new.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/repo/wiki/new.tmpl')
-rw-r--r-- | templates/repo/wiki/new.tmpl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl index 1f9c3788a2..d3085a1068 100644 --- a/templates/repo/wiki/new.tmpl +++ b/templates/repo/wiki/new.tmpl @@ -4,10 +4,10 @@ <div class="ui container"> {{template "base/alert" .}} <div class="ui header"> - {{.i18n.Tr "repo.wiki.new_page"}} + {{.locale.Tr "repo.wiki.new_page"}} {{if .PageIsWikiEdit}} <div class="ui right"> - <a class="ui green small button" href="{{.RepoLink}}/wiki?action=_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a> + <a class="ui green small button" href="{{.RepoLink}}/wiki?action=_new">{{.locale.Tr "repo.wiki.new_page_button"}}</a> </div> {{end}} </div> @@ -17,23 +17,23 @@ <input name="title" value="{{.title}}" autofocus required> </div> <div class="help"> - {{.i18n.Tr "repo.wiki.page_name_desc"}} + {{.locale.Tr "repo.wiki.page_name_desc"}} </div> <div class="ui top attached tabular menu previewtabs" data-write="write" data-preview="preview"> - <a class="active item" data-tab="write">{{.i18n.Tr "write"}}</a> - <a class="item" data-tab="preview" data-url="{{$.Repository.HTMLURL}}/markdown" data-context="{{$.RepoLink}}">{{$.i18n.Tr "preview"}}</a> + <a class="active item" data-tab="write">{{.locale.Tr "write"}}</a> + <a class="item" data-tab="preview" data-url="{{$.Repository.HTMLURL}}/markdown" data-context="{{$.RepoLink}}">{{$.locale.Tr "preview"}}</a> </div> - <div class="field content" data-loading="{{.i18n.Tr "loading"}}"> + <div class="field content" data-loading="{{.locale.Tr "loading"}}"> <div class="ui bottom active tab" data-tab="write"> - <textarea class="js-quick-submit" id="edit_area" name="content" data-id="wiki-{{.title}}" data-url="{{.Repository.HTMLURL}}/markdown" data-context="{{.RepoLink}}">{{if .PageIsWikiEdit}}{{.content}}{{else}}{{.i18n.Tr "repo.wiki.welcome"}}{{end}}</textarea> + <textarea class="js-quick-submit" id="edit_area" name="content" data-id="wiki-{{.title}}" data-url="{{.Repository.HTMLURL}}/markdown" data-context="{{.RepoLink}}">{{if .PageIsWikiEdit}}{{.content}}{{else}}{{.locale.Tr "repo.wiki.welcome"}}{{end}}</textarea> </div> </div> <div class="field"> - <input name="message" placeholder="{{.i18n.Tr "repo.wiki.default_commit_message"}}"> + <input name="message" placeholder="{{.locale.Tr "repo.wiki.default_commit_message"}}"> </div> <div class="text right"> <button class="ui green button"> - {{.i18n.Tr "repo.wiki.save_page"}} + {{.locale.Tr "repo.wiki.save_page"}} </button> </div> </form> |