Skip to content

Commit

Permalink
[WEBDEV-1116] Fix procedure translation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
naseberry committed Dec 17, 2018
1 parent 48dd31c commit 2a43b07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ def content
def section_primary_components
[].tap do |components|
components << ComponentSerializer::Heading1ComponentSerializer.new(heading_content).to_h
components << ComponentSerializer::ParagraphComponentSerializer.new(content: [ContentDataHelper.content_data(content: 'procedures.about', procedure: @procedure.try(:procedureName).downcase)]).to_h
components << ComponentSerializer::ParagraphComponentSerializer.new(content: [ContentDataHelper.content_data(content: 'procedures.show.about', procedure: @procedure.try(:procedureName).downcase)]).to_h
end
end

def heading_content
{}.tap do |hash|
hash[:subheading] = ContentDataHelper.content_data(content: 'procedures.subheading', link: procedures_path)
hash[:subheading] = ContentDataHelper.content_data(content: 'procedures.show.subheading', link: procedures_path)
hash[:heading] = title || t('no_name')
end
end

def list_components
[].tap do |components|
components << CardFactory.new(heading_text: 'procedures.subsidiary-resources.work-packages', heading_translation_url: procedure_work_packages_path(@procedure.try(:graph_id))).build_card
components << CardFactory.new(heading_text: 'procedures.show.subsidiary-resources.work-packages', heading_translation_url: procedure_work_packages_path(@procedure.try(:graph_id))).build_card
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ main-components:
- name: heading1
data:
subheading:
content: procedures.subheading
content: procedures.show.subheading
data:
link: "/procedures"
heading:
content: procedureName - 1
- name: paragraph
data:
- content: procedures.about
- content: procedures.show.about
data:
procedure: procedurename - 1
- name: section__section
Expand All @@ -120,7 +120,7 @@ main-components:
heading:
name: heading
data:
content: procedures.subsidiary-resources.work-packages
content: procedures.show.subsidiary-resources.work-packages
data:
link: "/procedures/H5YJQsK2/work-packages"
size: 2
Expand Down

0 comments on commit 2a43b07

Please sign in to comment.