FIX: Some error messages used wrong translation key (#12012)

This commit is contained in:
Gerhard Schlager 2021-02-08 17:57:59 +01:00 committed by GitHub
parent ceab1c9fdf
commit 9ce7ec24e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -333,14 +333,14 @@ class GroupsController < ApplicationController
end
if users.empty? && emails.empty?
raise Discourse::InvalidParameters.new(I18n.t("usernames_or_emails_required"))
raise Discourse::InvalidParameters.new(I18n.t("groups.errors.usernames_or_emails_required"))
end
if emails.any?
if SiteSetting.enable_sso?
raise Discourse::InvalidParameters.new(I18n.t("no_invites_with_discourse_connect"))
raise Discourse::InvalidParameters.new(I18n.t("groups.errors.no_invites_with_discourse_connect"))
elsif !SiteSetting.enable_local_logins?
raise Discourse::InvalidParameters.new(I18n.t("no_invites_without_local_logins"))
raise Discourse::InvalidParameters.new(I18n.t("groups.errors.no_invites_without_local_logins"))
end
end