Commit d8d6b2830499147cc8e56c9a95df6baccff0ad8f
1 parent
83e46970
Exists in
export-comment-paragraph
Added Translations
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
plugins/comment_paragraph/controllers/profile/comment_paragraph_plugin_profile_controller.rb
@@ -57,16 +57,16 @@ class CommentParagraphPluginProfileController < ProfileController | @@ -57,16 +57,16 @@ class CommentParagraphPluginProfileController < ProfileController | ||
57 | end | 57 | end |
58 | if (@export.first) | 58 | if (@export.first) |
59 | column_names = @export.first.keys | 59 | column_names = @export.first.keys |
60 | - header = "Comments for article[#{article_id}]: #{article.path}\n\n" | ||
61 | - s=CSV.generate do |csv| | 60 | + header = _("Comments for article[%{id}]: %{path}\n\n") % {:id => article_id, :path => article.path} |
61 | + csv_body = CSV.generate do |csv| | ||
62 | csv << column_names | 62 | csv << column_names |
63 | @export.each do |x| | 63 | @export.each do |x| |
64 | csv << x.values | 64 | csv << x.values |
65 | end | 65 | end |
66 | end | 66 | end |
67 | - result = header + s | 67 | + result = header + csv_body |
68 | else | 68 | else |
69 | - result = "No comments for article[#{article_id}]: #{article.path}\n\n" | 69 | + result = _("No comments for article[%{id}]: %{path}\n\n") % {:id => article_id, :path => article.path} |
70 | end | 70 | end |
71 | fname = "comments_for_article#{article_id}_#{DateTime.now.to_i}.csv" | 71 | fname = "comments_for_article#{article_id}_#{DateTime.now.to_i}.csv" |
72 | send_data result, | 72 | send_data result, |