From daefeb154273ff9365a8461228c67aad45f3d6d7 Mon Sep 17 00:00:00 2001 From: Phil Lee Date: Fri, 5 Jul 2024 17:19:40 +0100 Subject: [PATCH] use i18n for form options --- .../further_education_payments/fixed_term_contract_form.rb | 4 ++-- .../taught_at_least_one_term_form.rb | 4 ++-- config/locales/en.yml | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/forms/journeys/further_education_payments/fixed_term_contract_form.rb b/app/forms/journeys/further_education_payments/fixed_term_contract_form.rb index 8c97fece7e..b0bdcac443 100644 --- a/app/forms/journeys/further_education_payments/fixed_term_contract_form.rb +++ b/app/forms/journeys/further_education_payments/fixed_term_contract_form.rb @@ -10,11 +10,11 @@ def radio_options [ OpenStruct.new( id: true, - name: "Yes, it covers the full #{current_academic_year.to_s(:long)} academic year" + name: t("options.true", current_academic_year: current_academic_year.to_s(:long)) ), OpenStruct.new( id: false, - name: "No, it does not cover the full #{current_academic_year.to_s(:long)} academic year" + name: t("options.false", current_academic_year: current_academic_year.to_s(:long)) ) ] end diff --git a/app/forms/journeys/further_education_payments/taught_at_least_one_term_form.rb b/app/forms/journeys/further_education_payments/taught_at_least_one_term_form.rb index 0d6ad9afc1..1cb18e21cb 100644 --- a/app/forms/journeys/further_education_payments/taught_at_least_one_term_form.rb +++ b/app/forms/journeys/further_education_payments/taught_at_least_one_term_form.rb @@ -13,11 +13,11 @@ def radio_options [ OpenStruct.new( id: true, - name: "Yes, I have taught at #{school.name} for at least one academic term" + name: t("options.true", school_name: school.name) ), OpenStruct.new( id: false, - name: "No, I have not taught at #{school.name} for at least one academic term" + name: t("options.false", school_name: school.name) ) ] end diff --git a/config/locales/en.yml b/config/locales/en.yml index 81f5f0d908..db4d0493e8 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -830,10 +830,16 @@ en: inclusion: Select the contract type you have fixed_term_contract: question: Does your fixed-term contract cover the full %{academic_year} academic year? + options: + true: Yes, it covers the full %{current_academic_year} academic year + false: No, it does not cover the full %{current_academic_year} academic year errors: inclusion: Select yes if your fixed-term contract covers the full academic year taught_at_least_one_term: question: Have you taught at %{school_name} for at least one academic term? + options: + true: Yes, I have taught at %{school_name} for at least one academic term + false: No, I have not taught at %{school_name} for at least one academic term errors: inclusion: Select yes if you have taught at %{school_name} for at least one academic term teaching_hours_per_week: