i18n of moderation of the comments. closes #12
This commit is contained in:
parent
050ce74871
commit
b8144e19c0
|
@ -241,7 +241,7 @@ var _Lobsters = Class.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
moderateStory: function(link) {
|
moderateStory: function(link) {
|
||||||
var reason = prompt("Moderation reason:");
|
var reason = prompt("Raison de la modération :");
|
||||||
if (reason == null || reason == "")
|
if (reason == null || reason == "")
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -410,7 +410,7 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on("click", "a.comment_moderator", function() {
|
$(document).on("click", "a.comment_moderator", function() {
|
||||||
var reason = prompt("Moderation reason:");
|
var reason = prompt("Raison de la modération :");
|
||||||
if (reason == null || reason == "")
|
if (reason == null || reason == "")
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -198,7 +198,7 @@ class Comment < ActiveRecord::Base
|
||||||
m = Moderation.new
|
m = Moderation.new
|
||||||
m.comment_id = self.id
|
m.comment_id = self.id
|
||||||
m.moderator_user_id = user.id
|
m.moderator_user_id = user.id
|
||||||
m.action = "deleted comment"
|
m.action = I18n.t('models.comment.deletedcomment')
|
||||||
|
|
||||||
if reason.present?
|
if reason.present?
|
||||||
m.reason = reason
|
m.reason = reason
|
||||||
|
@ -284,9 +284,7 @@ class Comment < ActiveRecord::Base
|
||||||
|
|
||||||
def gone_text
|
def gone_text
|
||||||
if self.is_moderated?
|
if self.is_moderated?
|
||||||
"Thread removed by moderator " <<
|
I18n.t('models.comment.threadremovedby', :modoname => "#{self.moderation.try(:moderator).try(:username).to_s}", :modreason => "#{(self.moderation.try(:reason) || "No reason given")}")
|
||||||
self.moderation.try(:moderator).try(:username).to_s << ": " <<
|
|
||||||
(self.moderation.try(:reason) || "No reason given")
|
|
||||||
elsif self.user.is_banned?
|
elsif self.user.is_banned?
|
||||||
"Comment from banned user removed"
|
"Comment from banned user removed"
|
||||||
else
|
else
|
||||||
|
|
|
@ -9,6 +9,9 @@ en:
|
||||||
invitation_mailer:
|
invitation_mailer:
|
||||||
subject: "[%{appname}] You have been invited to %{appname}"
|
subject: "[%{appname}] You have been invited to %{appname}"
|
||||||
models:
|
models:
|
||||||
|
comment:
|
||||||
|
deletedcomment: "deleted comment"
|
||||||
|
threadremovedby: "Thread removed by moderator %{modoname} : %{modreason}"
|
||||||
moderation:
|
moderation:
|
||||||
storyeditedby: "Your story has been edited by "
|
storyeditedby: "Your story has been edited by "
|
||||||
usersuggestions: "user suggestions"
|
usersuggestions: "user suggestions"
|
||||||
|
|
|
@ -21,6 +21,9 @@ fr:
|
||||||
invitation_mailer:
|
invitation_mailer:
|
||||||
subject: "[%{appname}] Vous avez été invité au %{appname}"
|
subject: "[%{appname}] Vous avez été invité au %{appname}"
|
||||||
models:
|
models:
|
||||||
|
comment:
|
||||||
|
deletedcomment: "commentaire supprimé"
|
||||||
|
threadremovedby: "Fil supprimé par le modérateur %{modoname} : %{modreason}"
|
||||||
moderation:
|
moderation:
|
||||||
storyeditedby: "Votre info a été éditée par "
|
storyeditedby: "Votre info a été éditée par "
|
||||||
usersuggestions: "suggestions d'utilisateur"
|
usersuggestions: "suggestions d'utilisateur"
|
||||||
|
|
Loading…
Reference in a new issue