diff --git a/lib/smart_answer_flows/locales/en/register-a-death.yml b/lib/smart_answer_flows/locales/en/register-a-death.yml deleted file mode 100644 index ea6b96e1458..00000000000 --- a/lib/smart_answer_flows/locales/en/register-a-death.yml +++ /dev/null @@ -1,30 +0,0 @@ -en-GB: - flow: - register-a-death: - where_did_the_death_happen?: - title: Where did the death happen? - options: - england_wales: "England or Wales" - scotland: "Scotland" - northern_ireland: "Northern Ireland" - overseas: "Abroad" - did_the_person_die_at_home_hospital?: - title: Did the person die at home, in hospital or elsewhere? - options: - at_home_hospital: "At home or in hospital" - elsewhere: "Elsewhere" - was_death_expected?: - title: Was the death expected? - options: - "yes": "Yes" - "no": "No" - which_country?: - title: Which country did the death happen in? - where_are_you_now?: - title: Where are you now? - options: - same_country: "In the country where the death happened" - another_country: "In another country" - in_the_uk: "In the UK" - which_country_are_you_in_now?: - title: Which country are you in now? diff --git a/lib/smart_answer_flows/register-a-death.rb b/lib/smart_answer_flows/register-a-death.rb index f58fa14ef49..e6c6466f3a0 100644 --- a/lib/smart_answer_flows/register-a-death.rb +++ b/lib/smart_answer_flows/register-a-death.rb @@ -6,6 +6,8 @@ def define status :published satisfies_need "101006" + use_erb_templates_for_questions + country_name_query = SmartAnswer::Calculators::CountryNameFormatter.new reg_data_query = SmartAnswer::Calculators::RegistrationsDataQuery.new translator_query = SmartAnswer::Calculators::TranslatorLinks.new diff --git a/lib/smart_answer_flows/register-a-death/questions/did_the_person_die_at_home_hospital.govspeak.erb b/lib/smart_answer_flows/register-a-death/questions/did_the_person_die_at_home_hospital.govspeak.erb new file mode 100644 index 00000000000..2efac3c310f --- /dev/null +++ b/lib/smart_answer_flows/register-a-death/questions/did_the_person_die_at_home_hospital.govspeak.erb @@ -0,0 +1,8 @@ +<% content_for :title do %> + Did the person die at home, in hospital or elsewhere? +<% end %> + +<% options( + "at_home_hospital": "At home or in hospital", + "elsewhere": "Elsewhere" +) %> diff --git a/lib/smart_answer_flows/register-a-death/questions/was_death_expected.govspeak.erb b/lib/smart_answer_flows/register-a-death/questions/was_death_expected.govspeak.erb new file mode 100644 index 00000000000..58618300552 --- /dev/null +++ b/lib/smart_answer_flows/register-a-death/questions/was_death_expected.govspeak.erb @@ -0,0 +1,8 @@ +<% content_for :title do %> + Was the death expected? +<% end %> + +<% options( + "yes": "Yes", + "no": "No" +) %> diff --git a/lib/smart_answer_flows/register-a-death/questions/where_are_you_now.govspeak.erb b/lib/smart_answer_flows/register-a-death/questions/where_are_you_now.govspeak.erb new file mode 100644 index 00000000000..c23739a3867 --- /dev/null +++ b/lib/smart_answer_flows/register-a-death/questions/where_are_you_now.govspeak.erb @@ -0,0 +1,9 @@ +<% content_for :title do %> + Where are you now? +<% end %> + +<% options( + "same_country": "In the country where the death happened", + "another_country": "In another country", + "in_the_uk": "In the UK" +) %> diff --git a/lib/smart_answer_flows/register-a-death/questions/where_did_the_death_happen.govspeak.erb b/lib/smart_answer_flows/register-a-death/questions/where_did_the_death_happen.govspeak.erb new file mode 100644 index 00000000000..56501271955 --- /dev/null +++ b/lib/smart_answer_flows/register-a-death/questions/where_did_the_death_happen.govspeak.erb @@ -0,0 +1,10 @@ +<% content_for :title do %> + Where did the death happen? +<% end %> + +<% options( + "england_wales": "England or Wales", + "scotland": "Scotland", + "northern_ireland": "Northern Ireland", + "overseas": "Abroad" +) %> diff --git a/lib/smart_answer_flows/register-a-death/questions/which_country.govspeak.erb b/lib/smart_answer_flows/register-a-death/questions/which_country.govspeak.erb new file mode 100644 index 00000000000..449cf335864 --- /dev/null +++ b/lib/smart_answer_flows/register-a-death/questions/which_country.govspeak.erb @@ -0,0 +1,3 @@ +<% content_for :title do %> + Which country did the death happen in? +<% end %> diff --git a/lib/smart_answer_flows/register-a-death/questions/which_country_are_you_in_now.govspeak.erb b/lib/smart_answer_flows/register-a-death/questions/which_country_are_you_in_now.govspeak.erb new file mode 100644 index 00000000000..2d15df333ba --- /dev/null +++ b/lib/smart_answer_flows/register-a-death/questions/which_country_are_you_in_now.govspeak.erb @@ -0,0 +1,3 @@ +<% content_for :title do %> + Which country are you in now? +<% end %> diff --git a/test/artefacts/register-a-death/england_wales.html b/test/artefacts/register-a-death/england_wales.html index cba4e5ee45c..986287e4a0f 100644 --- a/test/artefacts/register-a-death/england_wales.html +++ b/test/artefacts/register-a-death/england_wales.html @@ -38,6 +38,7 @@

+
diff --git a/test/artefacts/register-a-death/england_wales/at_home_hospital.html b/test/artefacts/register-a-death/england_wales/at_home_hospital.html index 1c2900e0fdc..36d39026b71 100644 --- a/test/artefacts/register-a-death/england_wales/at_home_hospital.html +++ b/test/artefacts/register-a-death/england_wales/at_home_hospital.html @@ -38,6 +38,7 @@

+
diff --git a/test/artefacts/register-a-death/overseas.html b/test/artefacts/register-a-death/overseas.html index c557f1519c0..9a41469c8ca 100644 --- a/test/artefacts/register-a-death/overseas.html +++ b/test/artefacts/register-a-death/overseas.html @@ -38,6 +38,7 @@

+
@@ -269,6 +270,7 @@

+

diff --git a/test/artefacts/register-a-death/y.html b/test/artefacts/register-a-death/y.html index 7c0f5b59f1a..c9348c21ad1 100644 --- a/test/artefacts/register-a-death/y.html +++ b/test/artefacts/register-a-death/y.html @@ -38,6 +38,7 @@

+
diff --git a/test/data/register-a-death-files.yml b/test/data/register-a-death-files.yml index d083a1f934c..a6b97a09a05 100644 --- a/test/data/register-a-death-files.yml +++ b/test/data/register-a-death-files.yml @@ -1,6 +1,5 @@ --- -lib/smart_answer_flows/register-a-death.rb: 378f810da11670f93cadef74954fe302 -lib/smart_answer_flows/locales/en/register-a-death.yml: 04de0b215b1ab22ce4a52a82a185f6f1 +lib/smart_answer_flows/register-a-death.rb: 5dc3d844027c0d7624d007aca5fb2932 test/data/register-a-death-questions-and-responses.yml: bae21b0a8be1bbaa2dd6febd505382d6 test/data/register-a-death-responses-and-expected-results.yml: a69c595900ab2d85208c0ac92f186ae8 lib/smart_answer_flows/register-a-death/outcomes/_footnote_oru_variants.govspeak.erb: 30e012cdde5aa7f4de5856a5db47a54c @@ -9,6 +8,12 @@ lib/smart_answer_flows/register-a-death/outcomes/no_embassy_result.govspeak.erb: lib/smart_answer_flows/register-a-death/outcomes/north_korea_result.govspeak.erb: d21f96d5816ca222f381a2bca6ced918 lib/smart_answer_flows/register-a-death/outcomes/oru_result.govspeak.erb: 897de72bc4ec3f2570a58d44fa76051f lib/smart_answer_flows/register-a-death/outcomes/uk_result.govspeak.erb: 662da9367c5992191471f8722b3c2636 +lib/smart_answer_flows/register-a-death/questions/did_the_person_die_at_home_hospital.govspeak.erb: 3405db8cb8b24782fc49981c2fce12e7 +lib/smart_answer_flows/register-a-death/questions/was_death_expected.govspeak.erb: 132d4a52801b619af05519a69f2767dd +lib/smart_answer_flows/register-a-death/questions/where_are_you_now.govspeak.erb: b11b29b04cec875529be3714b5fba89e +lib/smart_answer_flows/register-a-death/questions/where_did_the_death_happen.govspeak.erb: 65a1c9d38940b468014b59160047f2c0 +lib/smart_answer_flows/register-a-death/questions/which_country.govspeak.erb: e816742682e96117df80d67faff13fc8 +lib/smart_answer_flows/register-a-death/questions/which_country_are_you_in_now.govspeak.erb: 9c9399d1588c7d5e01ebf1bf5efa31a1 lib/smart_answer_flows/register-a-death/register_a_death.govspeak.erb: 1820ba3a5f3ed47816c7f151217be439 lib/data/rates/births_and_deaths_document_return_fees.yml: 4ac203e9fd076c12f62b57f8d1b64ffc lib/data/translators.yml: d86f628f0b85e24ffb0dc0ec77401387