Skip to content

Commit

Permalink
Raise exception for missing translations in development
Browse files Browse the repository at this point in the history
  • Loading branch information
akadusei committed Jul 11, 2024
1 parent 58df3b5 commit d5e63a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config/i18n.cr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ private struct I18nAdapter
include Rex::Adapter

def translate(text : String | Symbol, **named_args) : String
I18n.t(text, **named_args)
LuckyEnv.production? ?
I18n.t(text, **named_args) :
I18n.t!(text, **named_args)
end

def localize(value, *args) : String
Expand Down

0 comments on commit d5e63a2

Please sign in to comment.