Skip to content

Commit

Permalink
Merge pull request #224 from bitberry-dev/master
Browse files Browse the repository at this point in the history
Fix locale inconsistence and remove redundant template
  • Loading branch information
kennyadsl authored Aug 30, 2022
2 parents a918b8b + 2a6ca76 commit bb291bd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
11 changes: 11 additions & 0 deletions lib/controllers/backend/spree/admin/user_passwords_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,15 @@ def update
super
end
end

private

# NOTE: as soon as this gem stops supporting Solidus 3.1 if-else should be removed and left only include
if defined?(::Spree::Admin::SetsUserLanguageLocaleKey)
include ::Spree::Admin::SetsUserLanguageLocaleKey
else
def set_user_language_locale_key
:admin_locale
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ def authorization_failure

private

# NOTE: as soon as this gem stops supporting Solidus 3.1 if-else should be removed and left only include
if defined?(::Spree::Admin::SetsUserLanguageLocaleKey)
include ::Spree::Admin::SetsUserLanguageLocaleKey
else
def set_user_language_locale_key
:admin_locale
end
end

def accurate_title
I18n.t('spree.login')
end
Expand Down
13 changes: 0 additions & 13 deletions lib/views/backend/spree/layouts/admin/_login_nav.html.erb

This file was deleted.

0 comments on commit bb291bd

Please sign in to comment.