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 have config.action_view.raise_on_missing_translations = true
Whenever I load rails server/console after this gem is installed, I get this error translation missing: ru.spree.atleast_one_permission_set_is_required (I18n::MissingTranslationData)
Stacktrace:
/home/leemour/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/i18n-0.9.1/lib/i18n.rb:319:in `handle_exception': translation missing: ru.spree.atleast_one_permission_set_is_required (I18n::MissingTranslationData)
from /home/leemour/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/i18n-0.9.1/lib/i18n.rb:169:in `translate'
from /home/leemour/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers/translation_helper.rb:90:in `translate'
from /home/leemour/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/spree_core-3.4.1/lib/spree/i18n.rb:18:in `translate'
from /home/leemour/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/bundler/gems/spree_admin_roles_and_access-600d8d90fee1/app/models/spree/role_decorator.rb:11:in `block in <main>'
from /home/leemour/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/bundler/gems/spree_admin_roles_and_access-600d8d90fee1/app/models/spree/role_decorator.rb:1:in `class_eval'
from /home/leemour/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/bundler/gems/spree_admin_roles_and_access-600d8d90fee1/app/models/spree/role_decorator.rb:1:in `<main>'
from /home/leemour/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bootsnap-1.1.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `load'
from /home/leemour/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bootsnap-1.1.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `load'
from /home/leemour/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `block in load'
from /home/leemour/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
from /home/leemour/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `load'
I have this translated in my .yml file so shouldn't cause any errors. If I set config.action_view.raise_on_missing_translations = false (the default) I don't get an error.
I got it fixed by replacing Spree.t(:atleast_one_permission_set_is_required)
with I18n.t('spree.atleast_one_permission_set_is_required')
So I guess the problem is with Spree not loading translations in models. Anyway, this change makes this gem work.
The text was updated successfully, but these errors were encountered:
I have
config.action_view.raise_on_missing_translations = true
Whenever I load rails server/console after this gem is installed, I get this error
translation missing: ru.spree.atleast_one_permission_set_is_required (I18n::MissingTranslationData)
Stacktrace:
The problem is here:
spree_admin_roles_and_access/app/models/spree/role_decorator.rb
Line 11 in 1464808
I have this translated in my .yml file so shouldn't cause any errors. If I set
config.action_view.raise_on_missing_translations = false
(the default) I don't get an error.I got it fixed by replacing
Spree.t(:atleast_one_permission_set_is_required)
with
I18n.t('spree.atleast_one_permission_set_is_required')
So I guess the problem is with Spree not loading translations in models. Anyway, this change makes this gem work.
The text was updated successfully, but these errors were encountered: