Codex is a simple way to get the text out of your code. Each class gets its own array of strings, loaded from its yaml file. There’s also lots of yummy helpers to let you do things like: flash_state :ugly — and — assert_state :ugly.
For a full tutorial:
http://thebootstrapnation.com/automate-your-rails-flash-messages-with-codex/