Skip to content

Commit

Permalink
use i18n for form options
Browse files Browse the repository at this point in the history
  • Loading branch information
asmega committed Jul 5, 2024
1 parent 57b42b0 commit daefeb1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit daefeb1

Please sign in to comment.