diff options
author | bugreport0 <32939607+bugreport0@users.noreply.github.com> | 2018-02-25 14:56:25 +0100 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-02-25 15:56:25 +0200 |
commit | 521945a2d2af421f365b5ed368833f0eb62bc0b9 (patch) | |
tree | 8064d1a85e69d0949a08ebd57f1b264f98677d17 /routers/user | |
parent | fc265b036f6441f8b738cf32c85fd1193b5dd2f0 (diff) | |
download | gitea-521945a2d2af421f365b5ed368833f0eb62bc0b9.tar.gz gitea-521945a2d2af421f365b5ed368833f0eb62bc0b9.zip |
Fix missing translations when updating username. (#3564)
* Fix missing translations when updating username.
* Fix reserved username translated string test.
* Fix 'username reserved' string test a bit more.
Diffstat (limited to 'routers/user')
-rw-r--r-- | routers/user/setting.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/user/setting.go b/routers/user/setting.go index b674c24b44..2d8b53ff63 100644 --- a/routers/user/setting.go +++ b/routers/user/setting.go @@ -61,16 +61,16 @@ func handleUsernameChange(ctx *context.Context, newName string) { if err := models.ChangeUserName(ctx.User, newName); err != nil { switch { case models.IsErrUserAlreadyExist(err): - ctx.Flash.Error(ctx.Tr("newName_been_taken")) + ctx.Flash.Error(ctx.Tr("form.username_been_taken")) ctx.Redirect(setting.AppSubURL + "/user/settings") case models.IsErrEmailAlreadyUsed(err): ctx.Flash.Error(ctx.Tr("form.email_been_used")) ctx.Redirect(setting.AppSubURL + "/user/settings") case models.IsErrNameReserved(err): - ctx.Flash.Error(ctx.Tr("user.newName_reserved")) + ctx.Flash.Error(ctx.Tr("user.form.name_reserved", newName)) ctx.Redirect(setting.AppSubURL + "/user/settings") case models.IsErrNamePatternNotAllowed(err): - ctx.Flash.Error(ctx.Tr("user.newName_pattern_not_allowed")) + ctx.Flash.Error(ctx.Tr("user.form.name_pattern_not_allowed", newName)) ctx.Redirect(setting.AppSubURL + "/user/settings") default: ctx.ServerError("ChangeUserName", err) |