aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/release/new.tmpl
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2022-06-27 22:58:46 +0200
committerGitHub <noreply@github.com>2022-06-27 15:58:46 -0500
commitd55a0b723809f5b94acd948b924c8518014445e0 (patch)
tree0ef9ea54f30769ca1d16ce20e551bd7a078f7f5e /templates/repo/release/new.tmpl
parentb551bc2a089d3310dde5706d1b9702f112fe3ea0 (diff)
downloadgitea-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/release/new.tmpl')
-rw-r--r--templates/repo/release/new.tmpl56
1 files changed, 28 insertions, 28 deletions
diff --git a/templates/repo/release/new.tmpl b/templates/repo/release/new.tmpl
index 5275bf021d..1781a36cfc 100644
--- a/templates/repo/release/new.tmpl
+++ b/templates/repo/release/new.tmpl
@@ -4,11 +4,11 @@
<div class="ui container">
<h2 class="ui dividing header">
{{if .PageIsEditRelease}}
- {{.i18n.Tr "repo.release.edit_release"}}
- <div class="sub header">{{.i18n.Tr "repo.release.edit_subheader"}}</div>
+ {{.locale.Tr "repo.release.edit_release"}}
+ <div class="sub header">{{.locale.Tr "repo.release.edit_subheader"}}</div>
{{else}}
- {{.i18n.Tr "repo.release.new_release"}}
- <div class="sub header">{{.i18n.Tr "repo.release.new_subheader"}}</div>
+ {{.locale.Tr "repo.release.new_release"}}
+ <div class="sub header">{{.locale.Tr "repo.release.new_subheader"}}</div>
{{end}}
</h2>
{{template "base/alert" .}}
@@ -19,13 +19,13 @@
{{if .PageIsEditRelease}}
<b>{{.tag_name}}</b><span class="at">@</span><strong>{{.tag_target}}</strong>
{{else}}
- <input id="tag-name" name="tag_name" value="{{.tag_name}}" placeholder="{{.i18n.Tr "repo.release.tag_name"}}" autofocus required maxlength="255">
+ <input id="tag-name" name="tag_name" value="{{.tag_name}}" placeholder="{{.locale.Tr "repo.release.tag_name"}}" autofocus required maxlength="255">
<span class="at">@</span>
<div class="ui selection dropdown">
<input type="hidden" name="tag_target" value="{{.tag_target}}"/>
{{svg "octicon-git-branch"}}
<div class="text">
- {{.i18n.Tr "repo.release.target"}} :
+ {{.locale.Tr "repo.release.target"}} :
<strong id="repo-branch-current">{{.Repository.DefaultBranch}}</strong>
</div>
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
@@ -35,40 +35,40 @@
{{end}}
</div>
</div>
- <span class="help">{{.i18n.Tr "repo.release.tag_helper"}}</span>
+ <span class="help">{{.locale.Tr "repo.release.tag_helper"}}</span>
{{end}}
</div>
</div>
<div class="eleven wide column">
<div class="field {{if .Err_Title}}error{{end}}">
- <label>{{.i18n.Tr "repo.release.title"}}</label>
- <input name="title" placeholder="{{.i18n.Tr "repo.release.title"}}" value="{{.title}}" autofocus required maxlength="255">
+ <label>{{.locale.Tr "repo.release.title"}}</label>
+ <input name="title" placeholder="{{.locale.Tr "repo.release.title"}}" value="{{.title}}" autofocus required maxlength="255">
</div>
<div class="field content-editor">
- <label>{{.i18n.Tr "repo.release.content"}}</label>
+ <label>{{.locale.Tr "repo.release.content"}}</label>
<div class="ui top tabular menu" data-write="write" data-preview="preview">
- <a class="active write item" data-tab="write">{{$.i18n.Tr "write"}}</a>
- <a class="preview item" data-tab="preview" data-url="{{$.Repository.HTMLURL}}/markdown" data-context="{{$.RepoLink}}">{{$.i18n.Tr "preview"}}</a>
+ <a class="active write item" data-tab="write">{{$.locale.Tr "write"}}</a>
+ <a class="preview item" data-tab="preview" data-url="{{$.Repository.HTMLURL}}/markdown" data-context="{{$.RepoLink}}">{{$.locale.Tr "preview"}}</a>
</div>
<div class="ui bottom active tab" data-tab="write">
<textarea name="content">{{.content}}</textarea>
</div>
<div class="ui bottom tab markup" data-tab="preview">
- {{$.i18n.Tr "loading"}}
+ {{$.locale.Tr "loading"}}
</div>
</div>
{{range .attachments}}
<div class="field" id="attachment-{{.ID}}">
<div class="ui right df ac wrap_remove">
<a class="ui mini compact red button remove-rel-attach" data-id="{{.ID}}" data-uuid="{{.UUID}}">
- {{$.i18n.Tr "remove"}}
+ {{$.locale.Tr "remove"}}
</a>
</div>
<div class="df ac">
<input name="attachment-edit-{{.UUID}}" class="mr-3 attachment_edit" required value="{{.Name}}"/>
<input name="attachment-del-{{.UUID}}" type="hidden" value="false"/>
<span class="ui text grey mr-3">{{.Size | FileSize}}</span>
- <span class="tooltip" data-content="{{$.i18n.Tr "repo.release.download_count" (.DownloadCount | PrettyNumber)}}">
+ <span class="tooltip" data-content="{{$.locale.Tr "repo.release.download_count" (.DownloadCount | PrettyNumber)}}">
{{svg "octicon-info"}}
</span>
</div>
@@ -87,7 +87,7 @@
<div class="tag-message field">
<div class="ui checkbox">
<input type="checkbox" name="add_tag_msg">
- <label><strong>{{.i18n.Tr "repo.release.add_tag_msg"}}</strong></label>
+ <label><strong>{{.locale.Tr "repo.release.add_tag_msg"}}</strong></label>
</div>
</div>
{{else}}
@@ -96,35 +96,35 @@
<div class="prerelease field">
<div class="ui checkbox">
<input type="checkbox" name="prerelease" {{if .prerelease}}checked{{end}}>
- <label><strong>{{.i18n.Tr "repo.release.prerelease_desc"}}</strong></label>
+ <label><strong>{{.locale.Tr "repo.release.prerelease_desc"}}</strong></label>
</div>
</div>
- <span class="help">{{.i18n.Tr "repo.release.prerelease_helper"}}</span>
+ <span class="help">{{.locale.Tr "repo.release.prerelease_helper"}}</span>
<div class="field">
{{if .PageIsEditRelease}}
<a class="ui button" href="{{.RepoLink}}/releases">
- {{.i18n.Tr "repo.release.cancel"}}
+ {{.locale.Tr "repo.release.cancel"}}
</a>
<a class="ui red button delete-button" data-url="{{$.RepoLink}}/releases/delete" data-id="{{.ID}}">
- {{$.i18n.Tr "repo.release.delete_release"}}
+ {{$.locale.Tr "repo.release.delete_release"}}
</a>
{{if .IsDraft}}
- <input class="ui button" type="submit" name="draft" value="{{.i18n.Tr "repo.release.save_draft"}}"/>
+ <input class="ui button" type="submit" name="draft" value="{{.locale.Tr "repo.release.save_draft"}}"/>
<button class="ui primary button">
- {{.i18n.Tr "repo.release.publish"}}
+ {{.locale.Tr "repo.release.publish"}}
</button>
{{else}}
<button class="ui primary button">
- {{.i18n.Tr "repo.release.edit_release"}}
+ {{.locale.Tr "repo.release.edit_release"}}
</button>
{{end}}
{{else}}
{{if not .tag_name}}
- <input class="ui grey button" type="submit" name="tag_only" value="{{.i18n.Tr "repo.release.add_tag"}}"/>
+ <input class="ui grey button" type="submit" name="tag_only" value="{{.locale.Tr "repo.release.add_tag"}}"/>
{{end}}
- <input class="ui button" type="submit" name="draft" value="{{.i18n.Tr "repo.release.save_draft"}}"/>
+ <input class="ui button" type="submit" name="draft" value="{{.locale.Tr "repo.release.save_draft"}}"/>
<button class="ui primary button">
- {{.i18n.Tr "repo.release.publish"}}
+ {{.locale.Tr "repo.release.publish"}}
</button>
{{end}}
</div>
@@ -138,10 +138,10 @@
<div class="ui small basic delete modal">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "repo.release.deletion"}}
+ {{.locale.Tr "repo.release.deletion"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "repo.release.deletion_desc"}}</p>
+ <p>{{.locale.Tr "repo.release.deletion_desc"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>