From 5fb9ebc594c5c4e1072d7eb6ec1384d9d6bddb7c Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Wed, 2 Oct 2019 11:53:39 +0100 Subject: [PATCH] Add missing translations for variants edit page --- app/views/spree/admin/variants/_form.html.haml | 8 ++++---- config/locales/en.yml | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/views/spree/admin/variants/_form.html.haml b/app/views/spree/admin/variants/_form.html.haml index e53d2f7488..176b2f4326 100644 --- a/app/views/spree/admin/variants/_form.html.haml +++ b/app/views/spree/admin/variants/_form.html.haml @@ -29,13 +29,13 @@ - if opt = @variant.option_values.detect {|o| o.option_type == option_type }.try(:presentation) = text_field(:new_variant, option_type.presentation, value: opt, disabled: 'disabled', class: 'fullwidth') .field - = f.label :sku, t(:sku) + = f.label :sku, t('.sku') = f.text_field :sku, class: 'fullwidth' .field - = f.label :price, t(:price) + = f.label :price, t('.price') = f.text_field :price, value: number_to_currency(@variant.price, unit: ''), class: 'fullwidth' .field - = f.label :cost_price, t(:cost_price) + = f.label :cost_price, t('.cost_price') = f.text_field :cost_price, value: number_to_currency(@variant.cost_price, unit: ''), class: 'fullwidth' %div{ 'set-on-demand' => '' } @@ -53,7 +53,7 @@ .right.six.columns.omega.label-block - if @product.variant_unit != 'weight' .field - = f.label 'weight', t('weight')+' (kg)' + = f.label 'weight', t(:weight)+' (kg)' - value = number_with_precision(@variant.weight, precision: 2) = f.text_field 'weight', value: value, class: 'fullwidth' diff --git a/config/locales/en.yml b/config/locales/en.yml index afc788d875..6cd1c72d49 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -3175,6 +3175,10 @@ See the %{link} to find out more about %{sitename}'s features and to start using email_confirmation: confirmation_pending: "Email confirmation is pending. We've sent a confirmation email to %{address}." variants: + form: + cost_price: "Cost Price" + sku: "SKU" + price: "Price" autocomplete: producer_name: "Producer" unit: "Unit"