bootstrap_flash_messages icon indicating copy to clipboard operation
bootstrap_flash_messages copied to clipboard

translation missing: en.flash_messages.defaults.notice

Open em0ral opened this issue 10 years ago • 2 comments

I get this message when trying to show :flash => :notice from private message. Everything else seems to work perfectly...

def set_standard @standard = Standard.for(current_user).find(params[:id]) rescue ActiveRecord::RecordNotFound redirect_to(standards_path, :flash => :notice) end

standards: create: success: "Reliability Standard has been created." error: "Reliability Standard has not been created." update: success: "Reliability Standard has been updated." error: "Reliability Standard has not been updated." destroy: success: "Reliability Standard has been deleted." set_standard: notice: "The Reliability Standard you were looking for could not be found."

em0ral avatar Apr 13 '14 12:04 em0ral

I get the same. This gem seems to only work on RESTful actions. Did you come up with a solution?

rhnorment avatar Oct 25 '14 17:10 rhnorment

Are you using the newest version? It should work on all non-RESTful actions. I use it like that all the time. Make sure the 'standards' locale is nested inside flash_messages, like this:

flash_messages:
  standards:
    create:
      success: "Reliability Standard has been created."
      error: "Reliability Standard has not been created."
    update:
      success: "Reliability Standard has been updated."
      error: "Reliability Standard has not been updated."
    destroy:
      success: "Reliability Standard has been deleted."
    set_standard:
      notice: "The Reliability Standard you were looking for could not be found."

I just tested it several times and it always shows the notice correctly. It only shows the error message if the locales aren't set up correctly, so I think that's the case.

RobinBrouwer avatar Aug 02 '15 12:08 RobinBrouwer