translate moderation messages related to stories
This commit is contained in:
parent
75e4ab4ecf
commit
050ce74871
|
@ -123,7 +123,7 @@ class StoriesController < ApplicationController
|
|||
@story = Story.where(:short_id => params[:id]).first!
|
||||
|
||||
if @story.merged_into_story
|
||||
flash[:success] = "\"#{@story.title}\" has been merged into this story."
|
||||
flash[:success] = I18n.t('controllers.stories_controller.flashmergedinto', :mergedstory => "#{@story.title}")
|
||||
return redirect_to @story.merged_into_story.comments_path
|
||||
end
|
||||
|
||||
|
|
|
@ -416,20 +416,19 @@ class Story < ActiveRecord::Base
|
|||
m.story_id = self.id
|
||||
|
||||
if all_changes["is_expired"] && self.is_expired?
|
||||
m.action = "deleted story"
|
||||
m.action = I18n.t('models.story.deletedstory')
|
||||
elsif all_changes["is_expired"] && !self.is_expired?
|
||||
m.action = "undeleted story"
|
||||
m.action = I18n.t('models.story.undeletedstory')
|
||||
else
|
||||
m.action = all_changes.map{|k,v|
|
||||
if k == "merged_story_id"
|
||||
if v[1]
|
||||
"merged into #{self.merged_into_story.short_id} " <<
|
||||
"(#{self.merged_into_story.title})"
|
||||
I18n.t('models.story.mergedinto', :shortid => "#{self.merged_into_story.short_id}", :title => "#{self.merged_into_story.title}")
|
||||
else
|
||||
"unmerged from another story"
|
||||
I18n.t('models.story.unmerged')
|
||||
end
|
||||
else
|
||||
"changed #{k} from #{v[0].inspect} to #{v[1].inspect}"
|
||||
I18n.t('models.story.changedfromto', :story => "#{k}", :stfrom => "#{v[0].inspect}", :stto => "#{v[1].inspect}")
|
||||
end
|
||||
}.join(", ")
|
||||
end
|
||||
|
|
|
@ -18,6 +18,12 @@ en:
|
|||
commentmoderated: "Your comment has been moderated"
|
||||
commentmoderatedwhy: "Your comment on [%{title}](%{url}) has been moderated:\n"
|
||||
automatedmessage: "*This is an automated message.*"
|
||||
story:
|
||||
deletedstory: "deleted story"
|
||||
undeletedstory: "undeleted story"
|
||||
mergedinto: "merged into %{shortid} (%{title})"
|
||||
unmerged: "unmerged from another story"
|
||||
changedfromto: "changed %{story} from %{stfrom} to %{stto}"
|
||||
vote:
|
||||
offtopicvote: "Off-topic"
|
||||
incorrectvote: "Incorrect"
|
||||
|
@ -408,6 +414,7 @@ en:
|
|||
editstorytitle: "Edit Story"
|
||||
flashnotallowedsuggestion: "You are not allowed to offer suggestions on that story."
|
||||
flashallowedsuggestion: "Your suggested changes have been noted."
|
||||
flashmergedinto: "%{mergedstory} has been merged into this story."
|
||||
tags_controller:
|
||||
tagstitle: "Tags"
|
||||
users_controller:
|
||||
|
|
|
@ -30,6 +30,12 @@ fr:
|
|||
commentmoderated: "Votre commentaire a été modéré"
|
||||
commentmoderatedwhy: "Votre commentaire sur [%{title}](%{url}) a été modéré :\n"
|
||||
automatedmessage: "*Ceci est un message automatique.*"
|
||||
story:
|
||||
deletedstory: "info effacée"
|
||||
undeletedstory: "info rétablie"
|
||||
mergedinto: "mergée avec %{shortid} (%{title})"
|
||||
unmerged: "dé-fusionnée depuis une autre info"
|
||||
changedfromto: "%{story} changée de %{stfrom} à %{stto}"
|
||||
vote:
|
||||
offtopicvote: "Hors-sujet"
|
||||
incorrectvote: "Incorrecte"
|
||||
|
@ -421,6 +427,7 @@ fr:
|
|||
editstorytitle: "Éditer une info"
|
||||
flashnotallowedsuggestion: "Vous n'êtes pas autorisé à offrir des suggestions pour cette info."
|
||||
flashallowedsuggestion: "Les changements que vous avez suggérés ont été notés."
|
||||
flashmergedinto: "%{mergedstory} a été fusionnée dans cette info."
|
||||
tags_controller:
|
||||
tagstitle: "Marques"
|
||||
users_controller:
|
||||
|
|
Loading…
Reference in a new issue