mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
add translation for errors checking group name (#27196)
Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
parent
5114c3b7cd
commit
206ff6e697
@ -1226,10 +1226,10 @@ func (a *App) isUniqueToGroupNames(val string) *model.AppError {
|
||||
var notFoundErr *store.ErrNotFound
|
||||
group, err := a.Srv().Store().Group().GetByName(val, model.GroupSearchOpts{})
|
||||
if err != nil && !errors.As(err, ¬FoundErr) {
|
||||
return model.NewAppError("isUniqueToGroupNames", model.NoTranslation, nil, "", http.StatusInternalServerError).Wrap(err)
|
||||
return model.NewAppError("isUniqueToGroupNames", "app.user.save.groupname.app_error", nil, "", http.StatusInternalServerError).Wrap(err)
|
||||
}
|
||||
if group != nil {
|
||||
return model.NewAppError("isUniqueToGroupNames", model.NoTranslation, nil, fmt.Sprintf("group name %s exists", val), http.StatusBadRequest)
|
||||
return model.NewAppError("isUniqueToGroupNames", "app.user.save.username_exists.app_error", nil, fmt.Sprintf("group name %s exists", val), http.StatusBadRequest)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -6830,6 +6830,10 @@
|
||||
"id": "app.user.save.existing.app_error",
|
||||
"translation": "Must call update for existing user."
|
||||
},
|
||||
{
|
||||
"id": "app.user.save.groupname.app_error",
|
||||
"translation": "Unable to determine if that username already exists"
|
||||
},
|
||||
{
|
||||
"id": "app.user.save.username_exists.app_error",
|
||||
"translation": "An account with that username already exists."
|
||||
|
Loading…
Reference in New Issue
Block a user