hyperstack
hyperstack copied to clipboard
Adds smarter lookup and fallback to I18n#t helper method
Fixes #410
This adds fallback lookup to the I18n#t
helper method available for components. It first checks the full namespace as it did before, but also will then look without the components namespace (if applicable), then lookup just the key provided, and finally return the key titleized if the translation is missing (this mimics the server-side behavior in views).
One thing to add - I had to manually perform the titleize call, because hyper-operation patches String#titleize
to return itself with no modification.