From d8d6b2830499147cc8e56c9a95df6baccff0ad8f Mon Sep 17 00:00:00 2001 From: Carlos Purificacao Date: Wed, 23 Dec 2015 09:41:32 -0300 Subject: [PATCH] Added Translations --- plugins/comment_paragraph/controllers/profile/comment_paragraph_plugin_profile_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/comment_paragraph/controllers/profile/comment_paragraph_plugin_profile_controller.rb b/plugins/comment_paragraph/controllers/profile/comment_paragraph_plugin_profile_controller.rb index 823a295..c098a9f 100644 --- a/plugins/comment_paragraph/controllers/profile/comment_paragraph_plugin_profile_controller.rb +++ b/plugins/comment_paragraph/controllers/profile/comment_paragraph_plugin_profile_controller.rb @@ -57,16 +57,16 @@ class CommentParagraphPluginProfileController < ProfileController end if (@export.first) column_names = @export.first.keys - header = "Comments for article[#{article_id}]: #{article.path}\n\n" - s=CSV.generate do |csv| + header = _("Comments for article[%{id}]: %{path}\n\n") % {:id => article_id, :path => article.path} + csv_body = CSV.generate do |csv| csv << column_names @export.each do |x| csv << x.values end end - result = header + s + result = header + csv_body else - result = "No comments for article[#{article_id}]: #{article.path}\n\n" + result = _("No comments for article[%{id}]: %{path}\n\n") % {:id => article_id, :path => article.path} end fname = "comments_for_article#{article_id}_#{DateTime.now.to_i}.csv" send_data result, -- libgit2 0.21.2