GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
At the moment, all strings are hard coded in English. All strings should be abstracted out using Rails' i18n.
Hey Malc, I've been playing with Rails 3 responders and it seemed to fit in here.
Have a look here bradleypriest/fulcrum@malclocke:master...i18n
All for the use of respond_with. The FlashResponder is pretty neat, but I think it might be a bit overkill, dunno ... I assume if you set a flash in the controller the FlashResponder won't overwrite it? If so then I guess it's pretty useful. What happens if no translation exists for the controller action? I'm generally wary of introducing 'magic', but this does look quite sensible.
I'll probably merge this in the next few days, I'm up to my neck in branch implementing comments at the moment.
No hurry, it still needs a bit of work anyway, was just wondering where this project was going to sit on the magic...ease of entry scale. About the FlashResponder I've set it up so that there's a fallback so as long as default create/update translations are added it should handle it just fine. And at the moment you need to set :flash => false to override the generated flash, but that's a simple change.