fix flash messages
This commit is contained in:
parent
a79303f823
commit
3fa29e39d7
|
@ -79,8 +79,7 @@ class StoriesController < ApplicationController
|
||||||
sattrs = @story.fetched_attributes
|
sattrs = @story.fetched_attributes
|
||||||
|
|
||||||
if sattrs[:url].present? && @story.url != sattrs[:url]
|
if sattrs[:url].present? && @story.url != sattrs[:url]
|
||||||
flash.now[:notice] = "Note: URL has been changed to fetched " <<
|
flash.now[:notice] = I18n.t 'controllers.stories_controller.flashcanonicalversion'
|
||||||
"canonicalized version"
|
|
||||||
@story.url = sattrs[:url]
|
@story.url = sattrs[:url]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -88,7 +87,7 @@ class StoriesController < ApplicationController
|
||||||
if s.is_recent?
|
if s.is_recent?
|
||||||
# user won't be able to submit this story as new, so just redirect
|
# user won't be able to submit this story as new, so just redirect
|
||||||
# them to the previous story
|
# 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
|
return redirect_to s.comments_path
|
||||||
else
|
else
|
||||||
# user will see a warning like with preview screen
|
# 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."
|
flashnotallowedsuggestion: "You are not allowed to offer suggestions on that story."
|
||||||
flashallowedsuggestion: "Your suggested changes have been noted."
|
flashallowedsuggestion: "Your suggested changes have been noted."
|
||||||
flashmergedinto: "%{mergedstory} has been merged into this story."
|
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:
|
tags_controller:
|
||||||
tagstitle: "Tags"
|
tagstitle: "Tags"
|
||||||
users_controller:
|
users_controller:
|
||||||
|
|
|
@ -449,6 +449,8 @@ fr:
|
||||||
flashnotallowedsuggestion: "Vous n'êtes pas autorisé à offrir des suggestions pour cette 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."
|
flashallowedsuggestion: "Les changements que vous avez suggérés ont été notés."
|
||||||
flashmergedinto: "%{mergedstory} a été fusionnée dans cette info."
|
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:
|
tags_controller:
|
||||||
tagstitle: "Marques"
|
tagstitle: "Marques"
|
||||||
users_controller:
|
users_controller:
|
||||||
|
|
Loading…
Reference in a new issue