The translation method translate
and its alias t
have bang brothers: translate!
and t!
. They will raise I18n::MissingTranslationData
on a missing translation instead of printing a string like translation missing: de.custom.failure
.
To turn on raising globally, you need to replace the default exception handler. The attached initializer makes I18n just raise any exception (in a development or test environment).
Posted by Dominik Schöler to makandra dev (2013-08-29 08:59)