From 164832c7c7a58ca5a2ba621da3eb78d623f8538c Mon Sep 17 00:00:00 2001 From: Wen Ting Wang Date: Thu, 10 Oct 2019 09:35:32 +0100 Subject: [PATCH] Add translation strings for second nationality and english main language --- .../candidate_interface/personal_details/edit.html.erb | 6 +++--- config/locales/application_form.yml | 4 ++++ .../candidate_entering_personal_details_spec.rb | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/views/candidate_interface/personal_details/edit.html.erb b/app/views/candidate_interface/personal_details/edit.html.erb index e3971264e8b..2ea64a6c463 100644 --- a/app/views/candidate_interface/personal_details/edit.html.erb +++ b/app/views/candidate_interface/personal_details/edit.html.erb @@ -28,7 +28,7 @@
- <%= f.govuk_text_field 'nationalities', label: { text: 'Second nationality' }, multiple: true %> + <%= f.govuk_text_field 'nationalities', label: { text: t('application_form.personal_details.second_nationality.label'), }, multiple: true %>
@@ -37,14 +37,14 @@ <%= f.govuk_radio_button :english_main_language, 'yes', label: { text: 'Yes' } do %> <%= f.govuk_text_area :english_language_details, - label: { text: 'If you are bilingual or very familiar with languages other than English, you can tell us about them here.' }, + label: { text: t('application_form.personal_details.english_main_language.yes_label') }, max_words: 200 %> <% end %> <%= f.govuk_radio_button :english_main_language, 'no', label: { text: 'No' } do %> <%= f.govuk_text_area :other_language_details, - label: { text: 'Please tell us about your English language qualifications (including grades or scores), and give details of other languages you are fluent in.' }, + label: { text: t('application_form.personal_details.english_main_language.no_label') }, max_words: 200 %> <% end %> <% end %> diff --git a/config/locales/application_form.yml b/config/locales/application_form.yml index 91ae8c535bb..52d57eef4f8 100644 --- a/config/locales/application_form.yml +++ b/config/locales/application_form.yml @@ -14,6 +14,10 @@ en: hint_text: For example, 31 3 1980 nationality: label: Nationality + second_nationality: + label: Second nationality english_main_language: label: Is English your main language? + yes_label: If you are bilingual or very familiar with languages other than English, you can tell us about them here. + no_label: Please tell us about your English language qualifications (including grades or scores), and give details of other languages you are fluent in. complete_form_button: Continue diff --git a/spec/system/candidate_interface/candidate_entering_personal_details_spec.rb b/spec/system/candidate_interface/candidate_entering_personal_details_spec.rb index 1ca80f0d8e4..51ae569cd5c 100644 --- a/spec/system/candidate_interface/candidate_entering_personal_details_spec.rb +++ b/spec/system/candidate_interface/candidate_entering_personal_details_spec.rb @@ -49,7 +49,7 @@ def when_i_fill_in_the_form fill_in t('application_form.personal_details.nationality.label'), with: 'British' find('details').click within('details') do - fill_in 'Second nationality', with: 'American' # TODO replace with translation + fill_in t('application_form.personal_details.second_nationality.label'), with: 'American' # TODO replace with translation end choose 'Yes'