@@ -21,7 +21,7 @@ def create # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
2121
2222 respond_to do |format |
2323 if @platform_invitation . save
24- flash [ :notice ] = 'Invitation was successfully created.'
24+ flash [ :notice ] = t ( 'flash.generic.created' , resource : t ( 'resources.invitation' ) )
2525 format . html { redirect_to @platform , notice : flash [ :notice ] }
2626 format . turbo_stream do
2727 render turbo_stream : [
@@ -34,7 +34,7 @@ def create # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
3434 ]
3535 end
3636 else
37- flash . now [ :alert ] = 'Error creating platform_invitation.'
37+ flash . now [ :alert ] = t ( 'flash.generic.error_create' , resource : t ( 'resources.invitation' ) )
3838 format . html { redirect_to @platform , alert : @platform_invitation . errors . full_messages . to_sentence }
3939 format . turbo_stream do
4040 render turbo_stream : [
@@ -52,7 +52,7 @@ def destroy # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
5252 authorize @platform_invitation
5353
5454 if @platform_invitation . destroy
55- flash . now [ :notice ] = 'Invitation was successfully removed.'
55+ flash . now [ :notice ] = t ( 'flash.generic.removed' , resource : t ( 'resources.invitation' ) )
5656 respond_to do |format |
5757 format . html { redirect_to @platform }
5858 format . turbo_stream do
@@ -64,7 +64,7 @@ def destroy # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
6464 end
6565 end
6666 else
67- flash . now [ :error ] = 'Failed to remove platform_invitation.'
67+ flash . now [ :error ] = t ( 'flash.generic.error_remove' , resource : t ( 'resources.invitation' ) )
6868 respond_to do |format |
6969 format . html { redirect_to @platform , alert : flash . now [ :error ] }
7070 format . turbo_stream do
@@ -82,7 +82,7 @@ def resend # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
8282 authorize @platform_invitation
8383
8484 BetterTogether ::PlatformInvitationMailerJob . perform_later ( @platform_invitation . id )
85- flash [ :notice ] = 'Invitation email has been queued for sending.'
85+ flash [ :notice ] = t ( 'flash.generic. queued' , resource : t ( 'resources.invitation_email' ) )
8686
8787 respond_to do |format |
8888 format . html { redirect_to @platform , notice : flash [ :notice ] }
0 commit comments