Comment: prevent me-too replies - merged with i18n
This commit is contained in:
parent
43f1c72e7c
commit
69fc4dbab8
|
@ -47,6 +47,9 @@ class Comment < ActiveRecord::Base
|
||||||
|
|
||||||
self.comment.to_s.strip.match(/\Atl;?dr.?$\z/i) &&
|
self.comment.to_s.strip.match(/\Atl;?dr.?$\z/i) &&
|
||||||
errors.add(:base, "Wow! A blue car!")
|
errors.add(:base, "Wow! A blue car!")
|
||||||
|
|
||||||
|
self.comment.to_s.strip.match(/\Ame too.?\z/i) &&
|
||||||
|
errors.add(:base, I18n.t( 'models.comment.metooerror'))
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.arrange_for_user(user)
|
def self.arrange_for_user(user)
|
||||||
|
|
|
@ -22,6 +22,7 @@ en:
|
||||||
threadremovedby: "Thread removed by moderator %{modoname} : %{modreason}"
|
threadremovedby: "Thread removed by moderator %{modoname} : %{modreason}"
|
||||||
turnedintodragon: "turned into a dragon"
|
turnedintodragon: "turned into a dragon"
|
||||||
slayeddragon: "slayed dragon"
|
slayeddragon: "slayed dragon"
|
||||||
|
metooerror: "Please just upvote the parent post instead."
|
||||||
moderation:
|
moderation:
|
||||||
storyeditedby: "Your story has been edited by "
|
storyeditedby: "Your story has been edited by "
|
||||||
usersuggestions: "user suggestions"
|
usersuggestions: "user suggestions"
|
||||||
|
|
|
@ -34,6 +34,7 @@ fr:
|
||||||
threadremovedby: "Fil supprimé par le modérateur %{modoname} : %{modreason}"
|
threadremovedby: "Fil supprimé par le modérateur %{modoname} : %{modreason}"
|
||||||
turnedintodragon: "transformé en dragon"
|
turnedintodragon: "transformé en dragon"
|
||||||
slayeddragon: "le dragon a été terrassé"
|
slayeddragon: "le dragon a été terrassé"
|
||||||
|
metooerror: "Merci de voter pour le commentaire à la place."
|
||||||
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