@@ -117,20 +117,21 @@ def prepare_coversheet
117117 def prepare_coversheet_for_csv ( csv , headings , hash )
118118 csv << [ hash [ :attribution ] . many? ?
119119 _ ( "Creators: " ) :
120- _ ( "Creator:" ) , _ ( hash [ :attribution ] . join ( ", " ) ) ]
121- csv << [ "Affiliation: " , _ ( hash [ :affiliation ] ) ]
120+ _ ( "Creator:" ) , _ ( "%{authors}" ) % { authors : hash [ :attribution ] . join ( ", " ) } ]
121+ csv << [ "Affiliation: " , _ ( "%{affiliation}" ) % { affiliation : hash [ :affiliation ] } ]
122122 if hash [ :funder ] . present?
123- csv << [ _ ( "Template: " ) , _ ( hash [ :funder ] ) ]
123+ csv << [ _ ( "Template: " ) , _ ( "%{funder}" ) % { funder : hash [ :funder ] } ]
124124 else
125- csv << [ _ ( "Template: " ) , _ ( hash [ :template ] + hash [ :customizer ] ) ]
125+ csv << [ _ ( "Template: " ) , _ ( "%{template}" ) % { template : hash [ :template ] + hash [ :customizer ] } ]
126126 end
127127 if self . grant_number . present?
128- csv << [ _ ( "Grant number: " ) , _ ( self . grant_number ) ]
128+ csv << [ _ ( "Grant number: " ) , _ ( "%{grant_number}" ) % { grant_number : self . grant_number } ]
129129 end
130130 if self . description . present?
131- csv << [ _ ( "Project abstract: " ) , _ ( Nokogiri ::HTML ( self . description ) . text ) ]
131+ csv << [ _ ( "Project abstract: " ) , _ ( "%{description}" ) %
132+ { description : Nokogiri ::HTML ( self . description ) . text } ]
132133 end
133- csv << [ _ ( "Last modified: " ) , _ ( self . updated_at . to_date . strftime ( "%d-%m-%Y" ) ) ]
134+ csv << [ _ ( "Last modified: " ) , _ ( "%{date}" ) % { date : self . updated_at . to_date . strftime ( "%d-%m-%Y" ) } ]
134135 csv << [ _ ( "Copyright information:" ) ,
135136 _ ( "The above plan creator(s) have agreed that others may use as
136137 much of the text of this plan as they would like in their own plans,
0 commit comments