From df586ee0e5f046cdf566674e12bbda32bde8905a Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 26 Jun 2024 14:51:45 -0700 Subject: [PATCH 1/2] Fix translation error on pet show page for an adopter with an application submitted Update usage of this helper. Pass the status symbol to the method not the status value --- app/views/organizations/adoptable_pets/show.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/organizations/adoptable_pets/show.html.erb b/app/views/organizations/adoptable_pets/show.html.erb index 1ee478e6b..8ae1710d4 100644 --- a/app/views/organizations/adoptable_pets/show.html.erb +++ b/app/views/organizations/adoptable_pets/show.html.erb @@ -102,8 +102,8 @@ <% else %> <% if AdopterApplication.adoption_exists?(current_user.adopter_foster_account&.id, @pet.id) %>
-

- <%= "#{@adoption_application.human_enum_name(@adoption_application.status) || t('.status.default')}" %> +

+ <%= "Application Status: #{@adoption_application.human_enum_name(:status) || t('.status.default')}" %>

<% if %w[under_review adoption_pending].include?(@adoption_application.status) %> <%= image_tag('pause.png', height: '21') %> From 83567fef269a6dfd57b8be738e84bf3be207310d Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 26 Jun 2024 17:48:13 -0700 Subject: [PATCH 2/2] add translation --- app/views/organizations/adoptable_pets/show.html.erb | 2 +- config/locales/en.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/organizations/adoptable_pets/show.html.erb b/app/views/organizations/adoptable_pets/show.html.erb index 8ae1710d4..23491f89e 100644 --- a/app/views/organizations/adoptable_pets/show.html.erb +++ b/app/views/organizations/adoptable_pets/show.html.erb @@ -103,7 +103,7 @@ <% if AdopterApplication.adoption_exists?(current_user.adopter_foster_account&.id, @pet.id) %>

- <%= "Application Status: #{@adoption_application.human_enum_name(:status) || t('.status.default')}" %> + <%= "#{t('organizations.adoptable_pets.show.application_status')} #{@adoption_application.human_enum_name(:status) || t('.status.default')}" %>

<% if %w[under_review adoption_pending].include?(@adoption_application.status) %> <%= image_tag('pause.png', height: '21') %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 2c3650950..1bb225c41 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -370,6 +370,7 @@ en: index: header: "Up for adoption" show: + application_status: "Application status:" adoption_process: "Adoption Process" please_read_faq_html: "Please read the %{faq_link} before applying to adopt." create_an_account: "Create an account to apply for this pet"