aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/settings/deploy_keys.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/settings/deploy_keys.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/settings/deploy_keys.tmpl')
-rw-r--r--templates/repo/settings/deploy_keys.tmpl38
1 files changed, 19 insertions, 19 deletions
diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl
index 6b9e129d9b..0a7e614ca8 100644
--- a/templates/repo/settings/deploy_keys.tmpl
+++ b/templates/repo/settings/deploy_keys.tmpl
@@ -5,12 +5,12 @@
<div class="ui container">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "repo.settings.deploy_keys"}}
+ {{.locale.Tr "repo.settings.deploy_keys"}}
<div class="ui right">
{{if not .DisableSSH}}
- <div class="ui primary tiny show-panel button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.settings.add_deploy_key"}}</div>
+ <div class="ui primary tiny show-panel button" data-panel="#add-deploy-key-panel">{{.locale.Tr "repo.settings.add_deploy_key"}}</div>
{{else}}
- <div class="ui primary tiny button disabled">{{.i18n.Tr "settings.ssh_disabled"}}</div>
+ <div class="ui primary tiny button disabled">{{.locale.Tr "settings.ssh_disabled"}}</div>
{{end}}
</div>
</h4>
@@ -19,30 +19,30 @@
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="field">
- {{.i18n.Tr "repo.settings.deploy_key_desc"}}
+ {{.locale.Tr "repo.settings.deploy_key_desc"}}
</div>
<div class="field {{if .Err_Title}}error{{end}}">
- <label for="title">{{.i18n.Tr "repo.settings.title"}}</label>
+ <label for="title">{{.locale.Tr "repo.settings.title"}}</label>
<input id="ssh-key-title" name="title" value="{{.title}}" autofocus required>
</div>
<div class="field {{if .Err_Content}}error{{end}}">
- <label for="content">{{.i18n.Tr "repo.settings.deploy_key_content"}}</label>
- <textarea id="ssh-key-content" name="content" placeholder="{{.i18n.Tr "settings.key_content_ssh_placeholder"}}" required>{{.content}}</textarea>
+ <label for="content">{{.locale.Tr "repo.settings.deploy_key_content"}}</label>
+ <textarea id="ssh-key-content" name="content" placeholder="{{.locale.Tr "settings.key_content_ssh_placeholder"}}" required>{{.content}}</textarea>
</div>
<div class="field">
<div class="ui checkbox {{if .Err_IsWritable}}error{{end}}">
<input id="ssh-key-is-writable" name="is_writable" class="hidden" type="checkbox" value="1">
<label for="is_writable">
- {{.i18n.Tr "repo.settings.is_writable"}}
+ {{.locale.Tr "repo.settings.is_writable"}}
</label>
- <small style="padding-left: 26px;">{{$.i18n.Tr "repo.settings.is_writable_info" | Str2html}}</small>
+ <small style="padding-left: 26px;">{{$.locale.Tr "repo.settings.is_writable_info" | Str2html}}</small>
</div>
</div>
<button class="ui green button">
- {{.i18n.Tr "repo.settings.add_deploy_key"}}
+ {{.locale.Tr "repo.settings.add_deploy_key"}}
</button>
<button class="ui hide-panel button" data-panel="#add-deploy-key-panel">
- {{.i18n.Tr "cancel"}}
+ {{.locale.Tr "cancel"}}
</button>
</form>
</div>
@@ -52,11 +52,11 @@
<div class="item">
<div class="right floated content">
<button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
- {{$.i18n.Tr "settings.delete_key"}}
+ {{$.locale.Tr "settings.delete_key"}}
</button>
</div>
<div class="left floated content">
- <i class="{{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted"{{end}}>{{svg "octicon-key" 32}}</i>
+ <i class="{{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.locale.Tr "settings.key_state_desc"}}" data-variation="inverted"{{end}}>{{svg "octicon-key" 32}}</i>
</div>
<div class="content">
<strong>{{.Name}}</strong>
@@ -64,14 +64,14 @@
{{.Fingerprint}}
</div>
<div class="activity meta">
- <i>{{$.i18n.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}} - <span>{{$.i18n.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{$.i18n.Tr "settings.can_write_info"}} {{end}}</span></i>
+ <i>{{$.locale.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}} - <span>{{$.locale.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{$.locale.Tr "settings.can_write_info"}} {{end}}</span></i>
</div>
</div>
</div>
{{end}}
</div>
{{else}}
- {{.i18n.Tr "repo.settings.no_deploy_keys"}}
+ {{.locale.Tr "repo.settings.no_deploy_keys"}}
{{end}}
</div>
</div>
@@ -80,19 +80,19 @@
<div class="ui small basic delete modal">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "repo.settings.deploy_key_deletion"}}
+ {{.locale.Tr "repo.settings.deploy_key_deletion"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "repo.settings.deploy_key_deletion_desc"}}</p>
+ <p>{{.locale.Tr "repo.settings.deploy_key_deletion_desc"}}</p>
</div>
<div class="actions">
<div class="ui red basic inverted cancel button">
<i class="remove icon"></i>
- {{.i18n.Tr "modal.no"}}
+ {{.locale.Tr "modal.no"}}
</div>
<div class="ui green basic inverted ok button">
<i class="checkmark icon"></i>
- {{.i18n.Tr "modal.yes"}}
+ {{.locale.Tr "modal.yes"}}
</div>
</div>
</div>