summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2022-06-07 18:40:12 +0100
committerGitHub <noreply@github.com>2022-06-07 13:40:12 -0400
commitd8236f1b164b98306fe5779863c3e4f58aed3032 (patch)
treeb226bad2e0467b08f8605d63ab3e03de1cee9ae0 /templates
parent81cf006863cb854609b09fd9f43189e2cab26b81 (diff)
downloadgitea-d8236f1b164b98306fe5779863c3e4f58aed3032.tar.gz
gitea-d8236f1b164b98306fe5779863c3e4f58aed3032.zip
Ensure minimum mirror interval is reported on settings page (#19895)
* Ensure minimum mirror interval is reported on settings page Expecting users to guess the minimum mirror interval appears a little unkind. In this PR we simply change the locale string to include the minimum interval. This will of course be affected by our current localization framework but... we can fix that else where. This PR also includes some fixes for error handling on the settings page as previously the mirror block amongst others would simply disappear on error. Fix #3737 Signed-off-by: Andrew Thornton <art27@cantab.net> * Update options/locale/locale_en-US.ini Co-authored-by: Gusted <williamzijl7@hotmail.com> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> * Update options/locale/locale_en-US.ini Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Gusted <williamzijl7@hotmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/settings/options.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index e2d6c5e1d5..f44d9c98ad 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -116,7 +116,7 @@
</div>
</div>
<div class="inline field {{if .Err_Interval}}error{{end}}">
- <label for="interval">{{.i18n.Tr "repo.mirror_interval"}}</label>
+ <label for="interval">{{.i18n.Tr "repo.mirror_interval" .MinimumMirrorInterval}}</label>
<input id="interval" name="interval" value="{{.MirrorInterval}}">
</div>
{{$address := MirrorRemoteAddress $.Context .Mirror}}
@@ -220,7 +220,7 @@
</div>
</details>
<div class="inline field {{if .Err_PushMirrorInterval}}error{{end}}">
- <label for="push_mirror_interval">{{.i18n.Tr "repo.mirror_interval"}}</label>
+ <label for="push_mirror_interval">{{.i18n.Tr "repo.mirror_interval" .MinimumMirrorInterval}}</label>
<input id="push_mirror_interval" name="push_mirror_interval" value="{{if .push_mirror_interval}}{{.push_mirror_interval}}{{else}}{{.DefaultMirrorInterval}}{{end}}">
</div>
<div class="field">