aboutsummaryrefslogtreecommitdiffstats
path: root/templates/user/settings
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-09-25 20:42:40 +0800
committerGitHub <noreply@github.com>2023-09-25 20:42:40 +0800
commit93bd4351bfb4a2f5f37ecb80d50496d044240e00 (patch)
tree4443b001284cf4f4f6932b909b9b70317b2428f7 /templates/user/settings
parent7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e (diff)
downloadgitea-93bd4351bfb4a2f5f37ecb80d50496d044240e00.tar.gz
gitea-93bd4351bfb4a2f5f37ecb80d50496d044240e00.zip
Fix more "locale" usages (#27259)
Diffstat (limited to 'templates/user/settings')
-rw-r--r--templates/user/settings/applications.tmpl2
-rw-r--r--templates/user/settings/keys_principal.tmpl2
-rw-r--r--templates/user/settings/keys_ssh.tmpl2
-rw-r--r--templates/user/settings/profile.tmpl4
-rw-r--r--templates/user/settings/security/webauthn.tmpl2
5 files changed, 6 insertions, 6 deletions
diff --git a/templates/user/settings/applications.tmpl b/templates/user/settings/applications.tmpl
index f3b2a9d8af..7553c798dc 100644
--- a/templates/user/settings/applications.tmpl
+++ b/templates/user/settings/applications.tmpl
@@ -36,7 +36,7 @@
</ul>
</details>
<div class="flex-item-body">
- <i>{{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="text green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
+ <i>{{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="text green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}}</i>
</div>
</div>
<div class="flex-item-trailing">
diff --git a/templates/user/settings/keys_principal.tmpl b/templates/user/settings/keys_principal.tmpl
index 4f6ce297cb..513afc2b61 100644
--- a/templates/user/settings/keys_principal.tmpl
+++ b/templates/user/settings/keys_principal.tmpl
@@ -22,7 +22,7 @@
<div class="flex-item-main">
<div class="flex-item-title">{{.Name}}</div>
<div class="flex-item-body">
- <i>{{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}} — {{svg "octicon-info" 16}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
+ <i>{{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}} — {{svg "octicon-info" 16}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}}</i>
</div>
</div>
<div class="flex-item-trailing">
diff --git a/templates/user/settings/keys_ssh.tmpl b/templates/user/settings/keys_ssh.tmpl
index 7d523c240d..f4aa7ef968 100644
--- a/templates/user/settings/keys_ssh.tmpl
+++ b/templates/user/settings/keys_ssh.tmpl
@@ -53,7 +53,7 @@
{{.Fingerprint}}
</div>
<div class="flex-item-body">
- <i>{{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="text green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
+ <i>{{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="text green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}}</i>
</div>
</div>
<div class="flex-item-trailing">
diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl
index 6280cf1b44..a508a5e835 100644
--- a/templates/user/settings/profile.tmpl
+++ b/templates/user/settings/profile.tmpl
@@ -73,14 +73,14 @@
<div class="field">
<div class="ui checkbox">
- <label data-tooltip-content="{{ctx.Locale.Tr "settings.keep_email_private_popup"}}"><strong>{{.locale.Tr "settings.keep_email_private"}}</strong></label>
+ <label data-tooltip-content="{{ctx.Locale.Tr "settings.keep_email_private_popup"}}"><strong>{{ctx.Locale.Tr "settings.keep_email_private"}}</strong></label>
<input name="keep_email_private" type="checkbox" {{if .SignedUser.KeepEmailPrivate}}checked{{end}}>
</div>
</div>
<div class="field">
<div class="ui checkbox" id="keep-activity-private">
- <label data-tooltip-content="{{ctx.Locale.Tr "settings.keep_activity_private_popup"}}"><strong>{{.locale.Tr "settings.keep_activity_private"}}</strong></label>
+ <label data-tooltip-content="{{ctx.Locale.Tr "settings.keep_activity_private_popup"}}"><strong>{{ctx.Locale.Tr "settings.keep_activity_private"}}</strong></label>
<input name="keep_activity_private" type="checkbox" {{if .SignedUser.KeepActivityPrivate}}checked{{end}}>
</div>
</div>
diff --git a/templates/user/settings/security/webauthn.tmpl b/templates/user/settings/security/webauthn.tmpl
index 213e10cbaf..28d8511fb4 100644
--- a/templates/user/settings/security/webauthn.tmpl
+++ b/templates/user/settings/security/webauthn.tmpl
@@ -10,7 +10,7 @@
</div>
<div class="flex-item-main">
<div class="flex-item-title">{{.Name}}</div>
- <span class="flex-item-body time">{{TimeSinceUnix .CreatedUnix $.locale}}</span>
+ <span class="flex-item-body time">{{TimeSinceUnix .CreatedUnix ctx.Locale}}</span>
</div>
<div class="flex-item-trailing">
<button class="ui red tiny button delete-button" data-modal-id="delete-registration" data-url="{{$.Link}}/webauthn/delete" data-id="{{.ID}}">