diff --git a/app/views/spree/admin/shared/_calculator_fields.html.haml b/app/views/spree/admin/shared/_calculator_fields.html.haml index 20fed93cb3..062503c8d6 100644 --- a/app/views/spree/admin/shared/_calculator_fields.html.haml +++ b/app/views/spree/admin/shared/_calculator_fields.html.haml @@ -1,8 +1,8 @@ %fieldset#calculator_fields.no-border-bottom - %legend{align: "center"}= Spree.t(:calculator) + %legend{align: "center"}= t(:calculator) #preference-settings .field - = f.label(:calculator_type, Spree.t(:calculator), for: 'calc_type') + = f.label(:calculator_type, t(:calculator), for: 'calc_type') = f.select(:calculator_type, @calculators.map { |c| [c.description, c.name] }, {}, {id: 'calc_type', class: 'select2 fullwidth'}) - if !@object.new_record? .field @@ -10,4 +10,4 @@ = f.fields_for :calculator do |calculator_form| = preference_fields(@object.calculator, calculator_form) - if @object.calculator.respond_to?(:preferences) - %span.calculator-settings-warning.info.warning= Spree.t(:calculator_settings_warning) + %span.calculator-settings-warning.info.warning= t(:calculator_settings_warning) diff --git a/config/locales/en.yml b/config/locales/en.yml index f1945520a0..8fe83583a3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2081,6 +2081,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using tax_category: "Tax Category" calculator: "Calculator" calculator_values: "Calculator values" + calculator_settings_warning: "If you are changing the calculator type, you must save first before you can edit the calculator settings" flat_percent_per_item: "Flat Percent (per item)" flat_rate_per_item: "Flat Rate (per item)" flat_rate_per_order: "Flat Rate (per order)"