Skip to content

Commit

Permalink
Merge pull request #566 from codealchemy/simple_backend/consolidate-a…
Browse files Browse the repository at this point in the history
…vailable-locale-check

Improve available locale check in Simple backend
  • Loading branch information
radar committed May 13, 2021
2 parents f19ee0d + 346f1cd commit 95612de
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/i18n/backend/simple.rb
Expand Up @@ -35,8 +35,7 @@ def initialized?
def store_translations(locale, data, options = EMPTY_HASH)
if I18n.enforce_available_locales &&
I18n.available_locales_initialized? &&
!I18n.available_locales.include?(locale.to_sym) &&
!I18n.available_locales.include?(locale.to_s)
!I18n.locale_available?(locale)
return data
end
locale = locale.to_sym
Expand Down

0 comments on commit 95612de

Please sign in to comment.