diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-07-06 10:35:56 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-07-06 10:35:56 +0100 |
commit | fb183ab07052293acabde9fa249f5d1952d56465 (patch) | |
tree | 41667f77795a108b77be73e9de9824d9b4fab8da /app/models/info_request_event.rb | |
parent | 4d36238dbc2a239b48193b9089c3321a3103346f (diff) | |
parent | e7cd3adc2775b1450251f89d70680b3be8f291a3 (diff) |
initial merge of Kosovan branch; still need to get tests passing, factor out Kosovan-specific code
Diffstat (limited to 'app/models/info_request_event.rb')
-rw-r--r-- | app/models/info_request_event.rb | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb index 1b22fa547..02b9a34ac 100644 --- a/app/models/info_request_event.rb +++ b/app/models/info_request_event.rb @@ -62,6 +62,8 @@ class InfoRequestEvent < ActiveRecord::Base 'waiting_response', 'waiting_clarification', 'gone_postal', + 'deadline_extended', + 'wrong_response', 'not_held', 'rejected', 'successful', @@ -283,27 +285,31 @@ class InfoRequestEvent < ActiveRecord::Base status = self.calculated_state if !status.nil? if status == 'waiting_response' - return "Acknowledgement" + return _("Acknowledgement") elsif status == 'waiting_clarification' - return "Clarification required" + return _("Clarification required") elsif status == 'gone_postal' - return "Handled by post" + return _("Handled by post") + elsif status == 'deadline_extended' + return _("Deadline Extended") + elsif status == 'wrong_response' + return _("Wrong Response") elsif status == 'not_held' - return "Information not held" + return _("Information not held") elsif status == 'rejected' - return "Refused" + return _("Refused") elsif status == 'partially_successful' - return "Some information sent" + return _("Some information sent") elsif status == 'successful' - return "All information sent" + return _("All information sent") elsif status == 'internal_review' - return "Internal review acknowledgement" + return _("Internal review acknowledgement") elsif status == 'user_withdrawn' - return "Withdrawn by requester" + return _("Withdrawn by requester") elsif status == 'error_message' - return "Delivery error" + return _("Delivery error") elsif status == 'requires_admin' - return "Unusual response" + return _("Unusual response") end raise "unknown status " + status end @@ -314,17 +320,17 @@ class InfoRequestEvent < ActiveRecord::Base status = self.calculated_state if !status.nil? if status == 'internal_review' - return "Internal review request" + return _("Internal review request") end if status == 'waiting_response' - return "Clarification" + return _("Clarification") end - raise "unknown status " + status + raise _("unknown status ") + status end - return "Follow up" + return _("Follow up") end - raise "display_status only works for incoming and outgoing messages right now" + raise _("display_status only works for incoming and outgoing messages right now") end def is_sent_sort? |