aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/setting.go
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2021-12-31 08:43:03 +0000
committerGitHub <noreply@github.com>2021-12-31 16:43:03 +0800
commit7eb380baa49e76e8fc396872f943b5396019a9bd (patch)
tree091f958cf14b16a736f7ece3659746eee35f7e02 /routers/web/repo/setting.go
parenta3d685077f5ce331d6899426eb70c89e0fe6443a (diff)
downloadgitea-7eb380baa49e76e8fc396872f943b5396019a9bd.tar.gz
gitea-7eb380baa49e76e8fc396872f943b5396019a9bd.zip
Use correct translation key (#18135)
- Resolves #18122 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'routers/web/repo/setting.go')
-rw-r--r--routers/web/repo/setting.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/routers/web/repo/setting.go b/routers/web/repo/setting.go
index ff38f61d8b..5457e651d3 100644
--- a/routers/web/repo/setting.go
+++ b/routers/web/repo/setting.go
@@ -609,7 +609,12 @@ func SettingsPost(ctx *context.Context) {
}
if !ctx.Repo.Owner.CanCreateRepo() {
- ctx.Flash.Error(ctx.Tr("repo.form.reach_limit_of_creation", ctx.User.MaxCreationLimit()))
+ maxCreationLimit := ctx.User.MaxCreationLimit()
+ if maxCreationLimit == 1 {
+ ctx.Flash.Error(ctx.Tr("repo.form.reach_limit_of_creation_1", maxCreationLimit))
+ } else {
+ ctx.Flash.Error(ctx.Tr("repo.form.reach_limit_of_creation_n", maxCreationLimit))
+ }
ctx.Redirect(repo.Link() + "/settings")
return
}