From eeca40521fe27d1e621dc1dda1fad5663ba24e9e Mon Sep 17 00:00:00 2001 From: Rachael Booth Date: Wed, 2 Oct 2024 09:41:05 +0100 Subject: [PATCH] WIP --- .../form/sales/questions/created_by_id.rb | 5 +++-- .../sales/questions/managing_organisation.rb | 5 +++-- .../sales/questions/owning_organisation_id.rb | 5 +++-- config/locales/forms/2024/sales/setup.en.yml | 21 +++++++++++++++++++ 4 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 config/locales/forms/2024/sales/setup.en.yml diff --git a/app/models/form/sales/questions/created_by_id.rb b/app/models/form/sales/questions/created_by_id.rb index 15a10e893..810c4966d 100644 --- a/app/models/form/sales/questions/created_by_id.rb +++ b/app/models/form/sales/questions/created_by_id.rb @@ -4,8 +4,9 @@ class Form::Sales::Questions::CreatedById < ::Form::Question def initialize(id, hsh, page) super @id = "assigned_to_id" - @check_answer_label = "Log owner" - @header = "Which user are you creating this log for?" + @check_answer_label = I18n.t("forms.#{form.start_date.year}.sales.setup.assigned_to_id.check_answer_label") + @header = I18n.t("forms.#{form.start_date.year}.sales.setup.assigned_to_id.question_text") + @hint = I18n.t("forms.#{form.start_date.year}.sales.setup.assigned_to_id.hint_text") @derived = true @type = "select" end diff --git a/app/models/form/sales/questions/managing_organisation.rb b/app/models/form/sales/questions/managing_organisation.rb index 03609233e..2c2f219cc 100644 --- a/app/models/form/sales/questions/managing_organisation.rb +++ b/app/models/form/sales/questions/managing_organisation.rb @@ -2,8 +2,9 @@ class Form::Sales::Questions::ManagingOrganisation < ::Form::Question def initialize(id, hsh, page) super @id = "managing_organisation_id" - @check_answer_label = "Reported by" - @header = "Which organisation is reporting this sale?" + @check_answer_label = I18n.t("forms.#{form.start_date.year}.sales.setup.managing_organisation_id.check_answer_label") + @header = I18n.t("forms.#{form.start_date.year}.sales.setup.managing_organisation_id.question_text") + @hint = I18n.t("forms.#{form.start_date.year}.sales.setup.managing_organisation_id.hint_text") @derived = true @type = "select" @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] diff --git a/app/models/form/sales/questions/owning_organisation_id.rb b/app/models/form/sales/questions/owning_organisation_id.rb index 669c43a0e..593ec3951 100644 --- a/app/models/form/sales/questions/owning_organisation_id.rb +++ b/app/models/form/sales/questions/owning_organisation_id.rb @@ -2,8 +2,9 @@ class Form::Sales::Questions::OwningOrganisationId < ::Form::Question def initialize(id, hsh, page) super @id = "owning_organisation_id" - @check_answer_label = "Owning organisation" - @header = "Which organisation owns this log?" + @check_answer_label = I18n.t("forms.#{form.start_date.year}.sales.setup.owning_organisation_id.check_answer_label") + @header = I18n.t("forms.#{form.start_date.year}.sales.setup.owning_organisation_id.question_text") + @hint_text = I18n.t("forms.#{form.start_date.year}.sales.setup.owning_organisation_id.hint_text") @derived = true @type = "select" @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] diff --git a/config/locales/forms/2024/sales/setup.en.yml b/config/locales/forms/2024/sales/setup.en.yml new file mode 100644 index 000000000..b5fcfc7d6 --- /dev/null +++ b/config/locales/forms/2024/sales/setup.en.yml @@ -0,0 +1,21 @@ +en: + forms: + 2024: + sales: + setup: + owning_organisation_id: + check_answer_label: "Owning organisation" + hint_text: "" + question_text: "Which organisation owns this log?" + + managing_organisation_id: + check_answer_label: "Reported by" + hint_text: "" + question_text: "Which organisation is reporting this sale?" + + assigned_to_id: + check_answer_label: "Log owner" + hint_text: "" + question_text: "Which user are you creating this log for?" + +