diff --git a/app/models/form/sales/pages/buyer2_working_situation.rb b/app/models/form/sales/pages/buyer2_working_situation.rb index 1ff7bbecc..4e73c09cf 100644 --- a/app/models/form/sales/pages/buyer2_working_situation.rb +++ b/app/models/form/sales/pages/buyer2_working_situation.rb @@ -2,6 +2,7 @@ class Form::Sales::Pages::Buyer2WorkingSituation < ::Form::Page def initialize(id, hsh, subsection) super @id = "buyer_2_working_situation" + @copy_key = "sales.household_characteristics.ecstat2.buyer" @depends_on = [ { "joint_purchase?" => true, diff --git a/app/models/form/sales/pages/gender_identity2.rb b/app/models/form/sales/pages/gender_identity2.rb index 94e585795..dc38847e4 100644 --- a/app/models/form/sales/pages/gender_identity2.rb +++ b/app/models/form/sales/pages/gender_identity2.rb @@ -2,6 +2,7 @@ class Form::Sales::Pages::GenderIdentity2 < ::Form::Page def initialize(id, hsh, subsection) super @id = "buyer_2_gender_identity" + @copy_key = "sales.household_characteristics.sex2.buyer" @depends_on = [ { "joint_purchase?" => true, diff --git a/app/models/form/sales/pages/multiple_partners_value_check.rb b/app/models/form/sales/pages/multiple_partners_value_check.rb index 048964bcc..37ab02ca4 100644 --- a/app/models/form/sales/pages/multiple_partners_value_check.rb +++ b/app/models/form/sales/pages/multiple_partners_value_check.rb @@ -12,7 +12,10 @@ class Form::Sales::Pages::MultiplePartnersValueCheck < Form::Sales::Pages::Perso "translation" => "forms.#{form.start_date.year}.#{@copy_key}.title_text", "arguments" => [], } - @informative_text = {} + @informative_text = { + "translation" => "forms.#{form.start_date.year}.#{@copy_key}.informative_text", + "arguments" => [], + } end def questions diff --git a/app/models/form/sales/pages/not_retired_value_check.rb b/app/models/form/sales/pages/not_retired_value_check.rb index 1240dcd0a..cf480cb59 100644 --- a/app/models/form/sales/pages/not_retired_value_check.rb +++ b/app/models/form/sales/pages/not_retired_value_check.rb @@ -13,6 +13,7 @@ class Form::Sales::Pages::NotRetiredValueCheck < Form::Sales::Pages::Person } @informative_text = { "translation" => "forms.#{form.start_date.year}.#{@copy_key}.informative_text", + "arguments" => [], } end diff --git a/app/models/form/sales/pages/partner_under_16_value_check.rb b/app/models/form/sales/pages/partner_under_16_value_check.rb index 6feb8e990..f6b3622f1 100644 --- a/app/models/form/sales/pages/partner_under_16_value_check.rb +++ b/app/models/form/sales/pages/partner_under_16_value_check.rb @@ -18,7 +18,10 @@ class Form::Sales::Pages::PartnerUnder16ValueCheck < Form::Sales::Pages::Person }, ], } - @informative_text = {} + @informative_text = { + "translation" => "forms.#{form.start_date.year}.#{@copy_key}.informative_text", + "arguments" => [], + } end def questions diff --git a/app/models/form/sales/pages/person_student_not_child_value_check.rb b/app/models/form/sales/pages/person_student_not_child_value_check.rb index 5b88d738b..33448298c 100644 --- a/app/models/form/sales/pages/person_student_not_child_value_check.rb +++ b/app/models/form/sales/pages/person_student_not_child_value_check.rb @@ -11,7 +11,7 @@ class Form::Sales::Pages::PersonStudentNotChildValueCheck < Form::Sales::Pages:: @title_text = { "translation" => "forms.#{form.start_date.year}.#{@copy_key}.title_text", } - @informative_text = {} + @informative_text = { "translation" => "forms.#{form.start_date.year}.#{@copy_key}.informative_text", "arguments" => [] } end def questions diff --git a/app/models/form/sales/pages/retirement_value_check.rb b/app/models/form/sales/pages/retirement_value_check.rb index 819e486ca..0f3e45559 100644 --- a/app/models/form/sales/pages/retirement_value_check.rb +++ b/app/models/form/sales/pages/retirement_value_check.rb @@ -18,7 +18,10 @@ class Form::Sales::Pages::RetirementValueCheck < Form::Sales::Pages::Person }, ], } - @informative_text = {} + @informative_text = { + "translation" => "forms.#{form.start_date.year}.#{@copy_key}.informative_text", + "arguments" => [], + } end def questions diff --git a/app/models/form/sales/questions/buyer1_ethnic_background_arab.rb b/app/models/form/sales/questions/buyer1_ethnic_background_arab.rb index 868878a7e..12a4bd842 100644 --- a/app/models/form/sales/questions/buyer1_ethnic_background_arab.rb +++ b/app/models/form/sales/questions/buyer1_ethnic_background_arab.rb @@ -2,7 +2,7 @@ class Form::Sales::Questions::Buyer1EthnicBackgroundArab < ::Form::Question def initialize(id, hsh, page) super @id = "ethnic" - @copy_key = "sales.household_characteristics.ethnic.ethnic_background_asian" + @copy_key = "sales.household_characteristics.ethnic.ethnic_background_arab" @type = "radio" @answer_options = ANSWER_OPTIONS @check_answers_card_number = 1 diff --git a/app/models/form/sales/questions/buyer2_working_situation.rb b/app/models/form/sales/questions/buyer2_working_situation.rb index c044085be..5356cb8e8 100644 --- a/app/models/form/sales/questions/buyer2_working_situation.rb +++ b/app/models/form/sales/questions/buyer2_working_situation.rb @@ -2,6 +2,7 @@ class Form::Sales::Questions::Buyer2WorkingSituation < ::Form::Question def initialize(id, hsh, page) super @id = "ecstat2" + @copy_key = "sales.household_characteristics.ecstat2.buyer" @type = "radio" @answer_options = ANSWER_OPTIONS @check_answers_card_number = 2 diff --git a/app/models/form/sales/questions/gender_identity2.rb b/app/models/form/sales/questions/gender_identity2.rb index 984b9e4bd..50545a796 100644 --- a/app/models/form/sales/questions/gender_identity2.rb +++ b/app/models/form/sales/questions/gender_identity2.rb @@ -3,6 +3,7 @@ class Form::Sales::Questions::GenderIdentity2 < ::Form::Question super @id = "sex2" @type = "radio" + @copy_key = "sales.household_characteristics.sex2.buyer" @answer_options = ANSWER_OPTIONS @check_answers_card_number = 2 @inferred_check_answers_value = [{ diff --git a/config/locales/forms/2023/sales/soft_validations.en.yml b/config/locales/forms/2023/sales/soft_validations.en.yml index 2e6a1f864..8552fdbb9 100644 --- a/config/locales/forms/2023/sales/soft_validations.en.yml +++ b/config/locales/forms/2023/sales/soft_validations.en.yml @@ -111,6 +111,7 @@ en: hint_text: "" question_text: "Are you sure this person is not a child?" title_text: "You told us this person is a student aged between 16 and 19." + informative_text: "Are you sure this person is not a child?" partner_under_16_value_check: page_header: "" check_answer_label: "Partner under 16 confirmation" diff --git a/config/locales/forms/2024/sales/soft_validations.en.yml b/config/locales/forms/2024/sales/soft_validations.en.yml index c42803c15..39af6cb38 100644 --- a/config/locales/forms/2024/sales/soft_validations.en.yml +++ b/config/locales/forms/2024/sales/soft_validations.en.yml @@ -111,15 +111,18 @@ en: hint_text: "" question_text: "Are you sure this person is not a child?" title_text: "You told us this person is a student aged between 16 and 19." + informative_text: "Are you sure this person is not a child?" partner_under_16_value_check: page_header: "" check_answer_label: "Partner under 16 confirmation" hint_text: "" question_text: "Are you sure this is correct?" title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to buyer 1." + informative_text: "Are you sure this is correct?" multiple_partners_value_check: page_header: "" check_answer_label: "Multiple partners confirmation" hint_text: "" question_text: "Are you sure this is correct?" title_text: "You told us there are more than 1 persons with 'Partner' relationship to buyer 1." + informative_text: "Are you sure this is correct?" diff --git a/spec/models/form/sales/pages/multiple_partners_value_check_spec.rb b/spec/models/form/sales/pages/multiple_partners_value_check_spec.rb index b0d6622f1..e3ee322a5 100644 --- a/spec/models/form/sales/pages/multiple_partners_value_check_spec.rb +++ b/spec/models/form/sales/pages/multiple_partners_value_check_spec.rb @@ -46,7 +46,7 @@ RSpec.describe Form::Sales::Pages::MultiplePartnersValueCheck, type: :model do end it "has correct informative_text" do - expect(page.informative_text).to eq({}) + expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.multiple_partners_value_check.informative_text" }) end it "has correct interruption_screen_question_ids" do @@ -78,7 +78,7 @@ RSpec.describe Form::Sales::Pages::MultiplePartnersValueCheck, type: :model do end it "has correct informative_text" do - expect(page.informative_text).to eq({}) + expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.multiple_partners_value_check.informative_text" }) end it "has correct interruption_screen_question_ids" do diff --git a/spec/models/form/sales/pages/partner_under16_value_check_spec.rb b/spec/models/form/sales/pages/partner_under16_value_check_spec.rb index 8c5d73755..5785ab900 100644 --- a/spec/models/form/sales/pages/partner_under16_value_check_spec.rb +++ b/spec/models/form/sales/pages/partner_under16_value_check_spec.rb @@ -52,7 +52,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do end it "has correct informative_text" do - expect(page.informative_text).to eq({}) + expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.informative_text" }) end it "has correct interruption_screen_question_ids" do @@ -90,7 +90,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do end it "has correct informative_text" do - expect(page.informative_text).to eq({}) + expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.informative_text" }) end it "has correct interruption_screen_question_ids" do @@ -128,7 +128,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do end it "has correct informative_text" do - expect(page.informative_text).to eq({}) + expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.informative_text" }) end it "has correct interruption_screen_question_ids" do @@ -166,7 +166,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do end it "has correct informative_text" do - expect(page.informative_text).to eq({}) + expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.informative_text" }) end it "has correct interruption_screen_question_ids" do @@ -204,7 +204,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do end it "has correct informative_text" do - expect(page.informative_text).to eq({}) + expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.informative_text" }) end it "has correct interruption_screen_question_ids" do @@ -242,7 +242,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do end it "has correct informative_text" do - expect(page.informative_text).to eq({}) + expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.informative_text" }) end it "has correct interruption_screen_question_ids" do diff --git a/spec/models/form/sales/pages/person_student_not_child_value_check_spec.rb b/spec/models/form/sales/pages/person_student_not_child_value_check_spec.rb index 0914a2278..43ba0af49 100644 --- a/spec/models/form/sales/pages/person_student_not_child_value_check_spec.rb +++ b/spec/models/form/sales/pages/person_student_not_child_value_check_spec.rb @@ -29,7 +29,7 @@ RSpec.describe Form::Sales::Pages::PersonStudentNotChildValueCheck, type: :model end it "has correct informative_text" do - expect(page.informative_text).to eq({}) + expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.student_not_child_value_check.informative_text" }) end it "has correct questions" do diff --git a/spec/models/form/sales/pages/retirement_value_check_spec.rb b/spec/models/form/sales/pages/retirement_value_check_spec.rb index ba9405885..e316250b5 100644 --- a/spec/models/form/sales/pages/retirement_value_check_spec.rb +++ b/spec/models/form/sales/pages/retirement_value_check_spec.rb @@ -52,7 +52,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do end it "has correct informative_text" do - expect(page.informative_text).to eq({}) + expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.informative_text" }) end it "has correct interruption_screen_question_ids" do @@ -90,7 +90,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do end it "has correct informative_text" do - expect(page.informative_text).to eq({}) + expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.informative_text" }) end it "has correct interruption_screen_question_ids" do @@ -128,7 +128,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do end it "has correct informative_text" do - expect(page.informative_text).to eq({}) + expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.informative_text" }) end it "has correct interruption_screen_question_ids" do @@ -166,7 +166,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do end it "has correct informative_text" do - expect(page.informative_text).to eq({}) + expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.informative_text" }) end it "has correct interruption_screen_question_ids" do @@ -204,7 +204,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do end it "has correct informative_text" do - expect(page.informative_text).to eq({}) + expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.informative_text" }) end it "has correct interruption_screen_question_ids" do @@ -242,7 +242,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do end it "has correct informative_text" do - expect(page.informative_text).to eq({}) + expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.informative_text" }) end it "has correct interruption_screen_question_ids" do