Sidekiq / sending Email digests fails: MissingTranslationData

OK, I can confirm this bug still exists in master. The digest preview works, but the actual Sidekiq job fails with:

Jobs::HandledExceptionWrapper: Wrapped I18n::MissingTranslationData: translation missing: de.time.formats.short

Somehow the locale fallback doesn’t work in this case.
This is quite a severe bug since it’s not possible to send digest mails when those translations are missing.

@sam I wanted to find out what’s causing this, but I couldn’t figure out how to debug Sidekiq jobs. Any hints in case I need to do this again? I tried following the steps mentioned on stackoverflow, but my Sidekiq instance completly ignored all enqueued jobs. :frowning:

Update: I guess we need to call I18n.fallbacks.ensure_loaded! somewhere. It’s currently only called in application_controller.rb.

Update 2: I sent a PR which should fix this:
https://github.com/discourse/discourse/pull/3786

3 Likes