Skip to content

Commit

Permalink
Merge pull request #21 from benweedon/proper_plural
Browse files Browse the repository at this point in the history
Properly pluralize the word "person"/"people"
  • Loading branch information
joshmcfarlane authored Oct 22, 2017
2 parents 7600ddb + af49a51 commit 53d09a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/controllers/FollowupController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ class FollowupController @Inject()(cc: ControllerComponents, repo: SubscriberRep
repo.listActive().map { subscribers =>
val messages = subscribers.map { subscriber =>
implicit val lang: Lang = Lang.get("en").get
val personWord = if (followup.numberPeople == 1) "person" else "people"
Message
.creator(new PhoneNumber(subscriber.phone), // to
new PhoneNumber(sys.env("TWILIO_PHONE")), // from
messagesApi("follow_up", followup.numberPeople, followup.city, followup.targetName, followup.targetPhoneNumber))
messagesApi("follow_up", followup.numberPeople, personWord, followup.city, followup.targetName, followup.targetPhoneNumber))
.create()
}
Redirect(routes.HomeController.index())
Expand Down
2 changes: 1 addition & 1 deletion conf/messages
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
action_alert=ICE activity has been confirmed at {0}. Please take caution or show up if you are able to support.
confirmation_msg=You are now signed up for alerts about immigration (ICE) activity in Washington. You will be notified of confirmed actions. Text "change language" to change your preferred language. Text "leave" to stop receiving messages.
error_msg=We were unable to understand your message. To report immigration activity or to ask for help, please call 1-844-RAIDREP (1-844-724-3737).
follow_up=ICE detained {0} people in {1} today. Please call {2} at {3} to demand their release and call for ICE to stay out of WA!
follow_up=ICE detained {0} {1} in {2} today. Please call {3} at {4} to demand their release and call for ICE to stay out of WA!
language_selection_msg=Select your preferred language: \n \
Text "1" for English \n \
Responda escribiendo "2" para recibir mensajes en español \n\
Expand Down

0 comments on commit 53d09a3

Please sign in to comment.