You can do this to intercept any missing translations when you restart
your app:
module I18n
class << self
def raise_custom_exception(exception, locale, key, options)
if MissingTranslationData === exception
# do something with the missing translation
return translation
else
raise exception
end
end
end
end
I18n.exception_handler = :raise_custom_exception
I've used it to make a call to the google translate API to generate
any missing machine translation(s), and then push them to my backend
so I have them for next time.
Hope that helps!
Shelly
http://wordchuck.com
--
On Oct 12, 2:35 am, Michael Bensoussan <[email protected]> wrote:
> Hi,
> We have a multilingual application using I18n,
> How would you test your application have no translations missings ?
> Would you test it view by view ? or have you a better solution ?
>
> Thanks,
--
You received this message because you are subscribed to the Google Groups
"rails-i18n" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rails-i18n?hl=en.