You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building a French-only application with solid_errors and I get this error I18n::InvalidLocale.
My application will be available in different languages, but for now, the only locale available is :fr.
In solid_errors the locale is forced in the ErrorsController by around_action :force_english_locale!
I patched it with this initializer, added the locale keys to my locale file and everything works fine:
Hmm... You are right, I don't love this. That change originated with PR #36 which was added to avoid missing translations:
because the engine is using the custom "datetime.distance_in_words.short" translation set, which doesn't exist on rails-i18n.
So, what we need, I think, is a localization flexible approach to the views. But I would love to make the localization story in Solid Errors much better, and I am happy to see your take on it.
It's not a bug, but possibly a new feature! 😄
My issue:
I'm building a French-only application with
solid_errors
and I get this errorI18n::InvalidLocale
.My application will be available in different languages, but for now, the only locale available is
:fr
.In
solid_errors
the locale is forced in theErrorsController
byaround_action :force_english_locale!
I patched it with this initializer, added the locale keys to my locale file and everything works fine:
My suggestions:
I think about two solutions :
:en
locale and rely on the application's default locale.SolidErrors
configuration to manually set the locale with:en
as fallback.Let me know if this feature catches your attention, I'm ready to help.
The text was updated successfully, but these errors were encountered: