mirror of
https://github.com/go-gitea/gitea
synced 2025-07-12 13:37:20 +00:00
@ -158,7 +158,14 @@ func Create(ctx *context.Context) {
|
||||
func handleCreateError(ctx *context.Context, owner *models.User, err error, name string, tpl base.TplName, form interface{}) {
|
||||
switch {
|
||||
case models.IsErrReachLimitOfRepo(err):
|
||||
ctx.RenderWithErr(ctx.Tr("repo.form.reach_limit_of_creation", owner.MaxCreationLimit()), tpl, form)
|
||||
var msg string
|
||||
maxCreationLimit := owner.MaxCreationLimit()
|
||||
if maxCreationLimit == 1 {
|
||||
msg = ctx.Tr("repo.form.reach_limit_of_creation_1", maxCreationLimit)
|
||||
} else {
|
||||
msg = ctx.Tr("repo.form.reach_limit_of_creation_n", maxCreationLimit)
|
||||
}
|
||||
ctx.RenderWithErr(msg, tpl, form)
|
||||
case models.IsErrRepoAlreadyExist(err):
|
||||
ctx.Data["Err_RepoName"] = true
|
||||
ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), tpl, form)
|
||||
|
Reference in New Issue
Block a user