From d8444dcf3ccd5d6c23e9e9d41b1ded6c2d3e0dfb Mon Sep 17 00:00:00 2001 From: jeffrey s hill md Date: Thu, 16 Apr 2020 14:59:41 -0500 Subject: [PATCH 1/2] Added placeholders --- app/views/spree/admin/variants/_form.html.haml | 4 ++-- config/locales/en.yml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/spree/admin/variants/_form.html.haml b/app/views/spree/admin/variants/_form.html.haml index 6da99b7ffc..b0b2ae5683 100644 --- a/app/views/spree/admin/variants/_form.html.haml +++ b/app/views/spree/admin/variants/_form.html.haml @@ -1,10 +1,10 @@ .label-block.left.six.columns.alpha{'ng-app' => 'admin.products'} .field = f.label :display_name, t('.display_name') - = f.text_field :display_name, class: "fullwidth" + = f.text_field :display_name, class: "fullwidth", placeholder: t('admin.products.display_name_placeholder') .field = f.label :display_as, t('.display_as') - = f.text_field :display_as, class: "fullwidth" + = f.text_field :display_as, class: "fullwidth", placeholder: t('admin.products.display_as_placeholder') - if product_has_variant_unit_option_type?(@product) - if @product.variant_unit != 'items' diff --git a/config/locales/en.yml b/config/locales/en.yml index 21d9ab39cf..9cad56cf95 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -476,6 +476,8 @@ en: products: unit_name_placeholder: 'eg. bunches' + display_as_placeholder: 'eg. 2 kg' + display_name_placeholder: 'eg. Tomatoes' index: unit: Unit display_as: Display As From ed91c179cddd0bdccb715b33ebc0126e97cb1fff Mon Sep 17 00:00:00 2001 From: jeffrey s hill md Date: Fri, 17 Apr 2020 12:04:27 -0500 Subject: [PATCH 2/2] Changed translation paths --- app/views/spree/admin/variants/_form.html.haml | 4 ++-- config/locales/en.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/spree/admin/variants/_form.html.haml b/app/views/spree/admin/variants/_form.html.haml index b0b2ae5683..0123c7de18 100644 --- a/app/views/spree/admin/variants/_form.html.haml +++ b/app/views/spree/admin/variants/_form.html.haml @@ -1,10 +1,10 @@ .label-block.left.six.columns.alpha{'ng-app' => 'admin.products'} .field = f.label :display_name, t('.display_name') - = f.text_field :display_name, class: "fullwidth", placeholder: t('admin.products.display_name_placeholder') + = f.text_field :display_name, class: "fullwidth", placeholder: t('.display_name_placeholder') .field = f.label :display_as, t('.display_as') - = f.text_field :display_as, class: "fullwidth", placeholder: t('admin.products.display_as_placeholder') + = f.text_field :display_as, class: "fullwidth", placeholder: t('.display_as_placeholder') - if product_has_variant_unit_option_type?(@product) - if @product.variant_unit != 'items' diff --git a/config/locales/en.yml b/config/locales/en.yml index 9cad56cf95..5a8ac51bc6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -476,8 +476,6 @@ en: products: unit_name_placeholder: 'eg. bunches' - display_as_placeholder: 'eg. 2 kg' - display_name_placeholder: 'eg. Tomatoes' index: unit: Unit display_as: Display As @@ -3382,6 +3380,8 @@ See the %{link} to find out more about %{sitename}'s features and to start using price: "Price" display_as: "Display As" display_name: "Display Name" + display_as_placeholder: 'eg. 2 kg' + display_name_placeholder: 'eg. Tomatoes' autocomplete: producer_name: "Producer" unit: "Unit"