Browse Source

Handle when some text is undefined in questions not yet using translation files

pull/2672/head
Rachael Booth 9 months ago
parent
commit
713fb83c7a
  1. 2
      app/models/form/page.rb
  2. 6
      app/models/form/question.rb

2
app/models/form/page.rb

@ -29,7 +29,7 @@ class Form::Page
end
def header
@header ||= I18n.t("forms.#{form.start_date.year}.#{copy_key}.page_header")
@header ||= I18n.t("forms.#{form.start_date.year}.#{copy_key}.page_header", default: "")
end
def routed_to?(log, _current_user)

6
app/models/form/question.rb

@ -53,15 +53,15 @@ class Form::Question
end
def check_answer_label
@check_answer_label ||= I18n.t("forms.#{form.start_date.year}.#{copy_key}.check_answer_label")
@check_answer_label ||= I18n.t("forms.#{form.start_date.year}.#{copy_key}.check_answer_label", default: "")
end
def header
@header ||= I18n.t("forms.#{form.start_date.year}.#{copy_key}.question_text")
@header ||= I18n.t("forms.#{form.start_date.year}.#{copy_key}.question_text", default: "")
end
def hint_text
@hint_text ||= I18n.t("forms.#{form.start_date.year}.#{copy_key}.hint_text")
@hint_text ||= I18n.t("forms.#{form.start_date.year}.#{copy_key}.hint_text", default: "")
end
def answer_label(log, user = nil)

Loading…
Cancel
Save