Skip to content

Commit 77aee09

Browse files
committed
refactor: Updates check-in/out flash verbiage
1 parent 6a07afb commit 77aee09

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

app/controllers/manage/questionnaires_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ def check_in
9191
return
9292
end
9393
check_in_attendee
94-
flash[:notice] = "Checked in #{@questionnaire.user.full_name}."
94+
flash[:notice] = t(:checked_in, scope: 'messages', user: @questionnaire.user.full_name)
9595
elsif params[:check_in] == "false"
9696
check_out_attendee
97-
flash[:notice] = "#{@questionnaire.user.full_name} no longer checked in."
97+
flash[:notice] = t(:checked_out, scope: 'messages', user: @questionnaire.user.full_name)
9898
else
99-
flash[:alert] = "No check-in action provided!"
99+
flash[:alert] = t(:missing_check_in, scope: 'messages')
100100
redirect_to show_redirect_path
101101
return
102102
end

config/locales/en.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ en:
124124
homepage_url: Homepage URL
125125
thanks_for_rsvp_message: Thanks For RSVP Message
126126
questionnaires_closed_message: Questionnaires Closed Message
127+
messages:
128+
checked_in: "%{user} has been checked in."
129+
checked_out: "%{user} is no longer checked in."
130+
missing_check_in: No check-in action provided!
127131
pages:
128132
manage:
129133
dashboard:

0 commit comments

Comments
 (0)