Commit d8d6b2830499147cc8e56c9a95df6baccff0ad8f

Authored by Carlos Purificação
1 parent 83e46970

Added Translations

plugins/comment_paragraph/controllers/profile/comment_paragraph_plugin_profile_controller.rb
... ... @@ -57,16 +57,16 @@ class CommentParagraphPluginProfileController < ProfileController
57 57 end
58 58 if (@export.first)
59 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 62 csv << column_names
63 63 @export.each do |x|
64 64 csv << x.values
65 65 end
66 66 end
67   - result = header + s
  67 + result = header + csv_body
68 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 70 end
71 71 fname = "comments_for_article#{article_id}_#{DateTime.now.to_i}.csv"
72 72 send_data result,
... ...