diff --git a/app/controllers/discourse_post_event/events_controller.rb b/app/controllers/discourse_post_event/events_controller.rb index 6c1f4c51a..84ea4f06a 100644 --- a/app/controllers/discourse_post_event/events_controller.rb +++ b/app/controllers/discourse_post_event/events_controller.rb @@ -71,18 +71,14 @@ def csv_bulk_invite else render json: failed_json.merge( - errors: [ - I18n.t("discourse_calendar.discourse_post_event.errors.bulk_invite.error"), - ], + errors: [I18n.t("discourse_post_event.errors.bulk_invite.error")], ), status: 422 end rescue StandardError render json: failed_json.merge( - errors: [ - I18n.t("discourse_calendar.discourse_post_event.errors.bulk_invite.error"), - ], + errors: [I18n.t("discourse_post_event.errors.bulk_invite.error")], ), status: 422 end @@ -108,9 +104,7 @@ def bulk_invite rescue StandardError render json: failed_json.merge( - errors: [ - I18n.t("discourse_calendar.discourse_post_event.errors.bulk_invite.error"), - ], + errors: [I18n.t("discourse_post_event.errors.bulk_invite.error")], ), status: 422 end diff --git a/app/models/discourse_post_event/event.rb b/app/models/discourse_post_event/event.rb index 26a353c55..058f1bc3f 100644 --- a/app/models/discourse_post_event/event.rb +++ b/app/models/discourse_post_event/event.rb @@ -128,10 +128,7 @@ def raw_invitees_length if self.raw_invitees && self.raw_invitees.length > 10 errors.add( :base, - I18n.t( - "discourse_calendar.discourse_post_event.errors.models.event.raw_invitees_length", - count: 10, - ), + I18n.t("discourse_post_event.errors.models.event.raw_invitees_length", count: 10), ) end end @@ -141,9 +138,7 @@ def raw_invitees_are_groups if self.raw_invitees && User.select(:id).where(username: self.raw_invitees).limit(1).count > 0 errors.add( :base, - I18n.t( - "discourse_calendar.discourse_post_event.errors.models.event.raw_invitees.only_group", - ), + I18n.t("discourse_post_event.errors.models.event.raw_invitees.only_group"), ) end end @@ -154,9 +149,7 @@ def ends_before_start self.original_starts_at >= self.original_ends_at errors.add( :base, - I18n.t( - "discourse_calendar.discourse_post_event.errors.models.event.ends_at_before_starts_at", - ), + I18n.t("discourse_post_event.errors.models.event.ends_at_before_starts_at"), ) end end @@ -168,10 +161,7 @@ def allowed_custom_fields if !allowed_custom_fields.include?(key) errors.add( :base, - I18n.t( - "discourse_calendar.discourse_post_event.errors.models.event.custom_field_is_invalid", - field: key, - ), + I18n.t("discourse_post_event.errors.models.event.custom_field_is_invalid", field: key), ) end end @@ -209,9 +199,9 @@ def create_notification!(user, post, predefined_attendance: false) message = if predefined_attendance - "discourse_calendar.discourse_post_event.notifications.invite_user_predefined_attendance_notification" + "discourse_post_event.notifications.invite_user_predefined_attendance_notification" else - "discourse_calendar.discourse_post_event.notifications.invite_user_notification" + "discourse_post_event.notifications.invite_user_notification" end attrs = { diff --git a/assets/javascripts/discourse/components/bulk-invite-sample-csv-file.hbs b/assets/javascripts/discourse/components/bulk-invite-sample-csv-file.hbs index e7086e1c2..0a3bef804 100644 --- a/assets/javascripts/discourse/components/bulk-invite-sample-csv-file.hbs +++ b/assets/javascripts/discourse/components/bulk-invite-sample-csv-file.hbs @@ -1,4 +1,4 @@ \ No newline at end of file diff --git a/assets/javascripts/discourse/components/discourse-post-event/creator.gjs b/assets/javascripts/discourse/components/discourse-post-event/creator.gjs index f115873d1..d877b9e48 100644 --- a/assets/javascripts/discourse/components/discourse-post-event/creator.gjs +++ b/assets/javascripts/discourse/components/discourse-post-event/creator.gjs @@ -10,9 +10,7 @@ export default class DiscoursePostEventCreator extends Component {