translate error for mandatory tag(s)

This commit is contained in:
Carl Chenet 2018-10-16 18:57:47 +02:00
parent 114640e357
commit a02f2f67e2
3 changed files with 3 additions and 3 deletions

View file

@ -276,9 +276,7 @@ class Story < ActiveRecord::Base
if !self.taggings.reject{|t| t.marked_for_destruction? || t.tag.is_media?
}.any?
errors.add(:base, "Must have at least one non-media (PDF, video) " <<
"tag. If no tags apply to your content, it probably doesn't " <<
"belong here.")
errors.add(:base, I18n.t( 'models.story.nonmedia'))
end
end

View file

@ -40,6 +40,7 @@ en:
mergedinto: "merged into %{shortid} (%{title})"
unmerged: "unmerged from another story"
changedfromto: "changed %{story} from %{stfrom} to %{stto}"
nonmedia: "Must have at least one non-media (PDF, video) tag. If no tags apply to your content, it probably doesn't belong here."
vote:
offtopicvote: "Off-topic"
incorrectvote: "Incorrect"

View file

@ -52,6 +52,7 @@ fr:
mergedinto: "mergée avec %{shortid} (%{title})"
unmerged: "dé-fusionnée depuis une autre info"
changedfromto: "%{story} changée de %{stfrom} à %{stto}"
nonmedia: "Une étiquette autre que PDF ou video doit être présente"
vote:
offtopicvote: "Hors-sujet"
incorrectvote: "Incorrecte"