Skip to content

Commit

Permalink
clean up translations
Browse files Browse the repository at this point in the history
  • Loading branch information
dtgreiner committed Aug 5, 2024
1 parent 2f132cb commit 4e196d7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def initialize_decision! send_notifications: true
private def ensure_required_contacts_present_on_accept
missing_contacts = []
missing_contacts << "a #{Translation.translate('Shelter Agency Thirteen')} Contact" if save_will_accept? && match.shelter_agency_contacts.none?
missing_contacts << "a #{Translation.translate('SSP Thirteen')} Contact" if save_will_accept? && match.ssp_contacts.none?
missing_contacts << "a #{Translation.translate('HSP Thirteen')} Contact" if save_will_accept? && match.hsp_contacts.none?
missing_contacts << "a #{Translation.translate('Stabilization Service Providers Thirteen')} Contact" if save_will_accept? && match.ssp_contacts.none?
missing_contacts << "a #{Translation.translate('Housing Search Provider Thirteen')} Contact" if save_will_accept? && match.hsp_contacts.none?

errors.add :match_contacts, "needs #{missing_contacts.to_sentence}" if missing_contacts.any?
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def label

def label_for_status status
case status.to_sym
when :pending then "#{Translation.translate('DND')} to confirm match success"
when :confirmed then "#{Translation.translate('DND')} confirms match success"
when :rejected then "Match rejected by #{Translation.translate('DND')}"
when :pending then "#{Translation.translate('CoC Thirteen')} to confirm match success"
when :confirmed then "#{Translation.translate('CoC Thirteen')} confirms match success"
when :rejected then "Match rejected by #{Translation.translate('CoC Thirteen')}"
when :canceled then 'Match canceled'
when :back then backup_status_label
end
Expand All @@ -41,7 +41,7 @@ def step_name
end

def actor_type
Translation.translate('DND')
Translation.translate('CoC Thirteen')
end

def contact_actor_type
Expand Down
4 changes: 2 additions & 2 deletions app/models/match_routes/thirteen.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def contact_label_for(contact_type)
when :housing_subsidy_admin_contacts
Translation.translate('HSA Thirteen')
when :ssp_contacts
Translation.translate('SSP Thirteen')
Translation.translate('Stabilization Service Providers Thirteen')
when :hsp_contacts
Translation.translate('HSP Thirteen')
Translation.translate('Housing Search Provider Thirteen')
when :dnd_staff_contacts
Translation.translate('CoC Thirteen')
else
Expand Down
6 changes: 6 additions & 0 deletions app/models/translation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def self.known_translations
'CoC Six',
'CoC Eleven',
'CoC Twelve',
'CoC Thirteen',
'Confirm Match Success',
'Confirm Match Success Six',
'Criminal Background Hearing',
Expand Down Expand Up @@ -142,6 +143,7 @@ def self.known_translations
'Housing Search Provider Eight',
'Housing Search Provider Eleven',
'Housing Search Provider Nine',
'Housing Search Provider Thirteen',
'Housing Search Providers',
'Housing Search Worker',
'housing subsidy administrator',
Expand All @@ -157,6 +159,7 @@ def self.known_translations
'HSA Eight',
'HSA Eleven',
'HSA Twelve',
'HSA Thirteen',
'HSA Complete Match',
'HSA Complete Match Six',
'HSA Nine',
Expand Down Expand Up @@ -188,6 +191,7 @@ def self.known_translations
'Match Route Six',
'Match Route Ten',
'Match Route Twelve',
'Match Route Thirteen',
'match shelter agency agreement modal',
'Match status update',
'Meth Production Conviction',
Expand Down Expand Up @@ -243,6 +247,7 @@ def self.known_translations
'Shelter Agency Nine',
'Shelter Agency Six',
'Shelter Agency Twelve',
'Shelter Agency Thirteen',
'shelter case manager',
'Should this tag be added to anyone with an assessment score?',
'SSP',
Expand All @@ -254,6 +259,7 @@ def self.known_translations
'Stabilization Service Providers',
'Stabilization Services Provider',
'Stabilization Service Providers Eleven',
'Stabilization Service Providers Thirteen',
'Staff Decline',
'Strengths',
'Submit Client Application',
Expand Down

0 comments on commit 4e196d7

Please sign in to comment.