diff --git a/app/models/spree/admin/actions/action_builder.rb b/app/models/spree/admin/actions/action_builder.rb index cd8e0f1eda..8a5f70f1bd 100644 --- a/app/models/spree/admin/actions/action_builder.rb +++ b/app/models/spree/admin/actions/action_builder.rb @@ -28,16 +28,14 @@ def build_config url: @url, classes: @classes, availability_check: @availability_check, - text: text, + text: text(@name), method: @method, id: @id } end - def text - return ::Spree.t(@name) unless @translation_options.present? - - ::Spree.t(@name, scope: @translation_options[:scope], default: ::Spree.t(@name)) + def text(text, options = {}) + ::Spree.t(text, options) end # def available?(current_ability, resource) diff --git a/app/models/spree/admin/actions/order_default_actions_builder.rb b/app/models/spree/admin/actions/order_default_actions_builder.rb index 6096bfee47..bf8dd728d7 100644 --- a/app/models/spree/admin/actions/order_default_actions_builder.rb +++ b/app/models/spree/admin/actions/order_default_actions_builder.rb @@ -30,7 +30,8 @@ def resend_config classes: 'btn-secondary', method: :post, translation_options: { - scope: 'admin.order.events' + scope: 'admin.order.events', + default: ::Spree.t(:resend) } } end