fix flash messages
This commit is contained in:
parent
a79303f823
commit
3fa29e39d7
|
@ -79,8 +79,7 @@ class StoriesController < ApplicationController
|
|||
sattrs = @story.fetched_attributes
|
||||
|
||||
if sattrs[:url].present? && @story.url != sattrs[:url]
|
||||
flash.now[:notice] = "Note: URL has been changed to fetched " <<
|
||||
"canonicalized version"
|
||||
flash.now[:notice] = I18n.t 'controllers.stories_controller.flashcanonicalversion'
|
||||
@story.url = sattrs[:url]
|
||||
end
|
||||
|
||||
|
@ -88,7 +87,7 @@ class StoriesController < ApplicationController
|
|||
if s.is_recent?
|
||||
# user won't be able to submit this story as new, so just redirect
|
||||
# them to the previous story
|
||||
flash[:success] = "This URL has already been submitted recently."
|
||||
flash[:success] = I18n.t 'controllers.stories_controller.flashalreadyposted'
|
||||
return redirect_to s.comments_path
|
||||
else
|
||||
# user will see a warning like with preview screen
|
||||
|
|
|
@ -439,6 +439,8 @@ en:
|
|||
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."
|
||||
flashalreadyposted: "This URL has already been submitted recently."
|
||||
flashcanonicalversion: "Note: URL has been changed to fetched canonicalized version"
|
||||
tags_controller:
|
||||
tagstitle: "Tags"
|
||||
users_controller:
|
||||
|
|
|
@ -449,6 +449,8 @@ fr:
|
|||
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."
|
||||
flashalreadyposted: "Cette URL a déjà été soumise récemment."
|
||||
flashcanonicalversion: "Note: l'URL a été changée pour avoir la version canonique"
|
||||
tags_controller:
|
||||
tagstitle: "Marques"
|
||||
users_controller:
|
||||
|
|
Loading…
Reference in a new issue