diff --git a/app/assets/javascripts/templates/admin/new_customer_dialog.html.haml b/app/assets/javascripts/templates/admin/new_customer_dialog.html.haml index 750201e208..9cdcb97713 100644 --- a/app/assets/javascripts/templates/admin/new_customer_dialog.html.haml +++ b/app/assets/javascripts/templates/admin/new_customer_dialog.html.haml @@ -1,15 +1,15 @@ #new-customer-dialog .text-normal.margin-bottom-30.text-center - {{ 'admin.customers.index.add_a_new_customer_for' | t:{ shop_name: CurrentShop.shop.name } }} + {{ 'js.admin.customers.index.add_a_new_customer_for' | t:{ shop_name: CurrentShop.shop.name } }} %form{ name: 'new_customer_form', novalidate: true, ng: { submit: "addCustomer()" }} .text-center.margin-bottom-30 - %input.fullwidth{ type: 'email', name: 'email', required: true, placeholder: t('admin.customers.index.customer_placeholder'), ng: { model: "email" } } + %input.fullwidth{ type: 'email', name: 'email', required: true, placeholder: "{{ 'js.admin.customers.index.customer_placeholder' | t }}", ng: { model: "email" } } %div{ ng: { show: "submitted && new_customer_form.$pristine" } } .error{ ng: { show: "(new_customer_form.email.$error.email || new_customer_form.email.$error.required)" } } - {{ 'admin.customers.index.valid_email_error' | t }} + {{ 'js.admin.customers.index.valid_email_error' | t }} .error{ ng: { repeat: "error in errors", bind: "error" } } .text-center - %input.button.red.icon-plus{ type: 'submit', value: t('admin.customers.index.add_customer') } + %input.button.red.icon-plus{ type: 'submit', value: "{{ 'js.admin.customers.index.add_customer' | t }}" } diff --git a/config/locales/en.yml b/config/locales/en.yml index af36502df6..fe39f55e2f 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -396,11 +396,7 @@ en: customers: index: - add_customer: "Add Customer" new_customer: "New Customer" - customer_placeholder: "customer@example.org" - valid_email_error: Please enter a valid email address - add_a_new_customer_for: Add a new customer for %{shop_name} code: Code duplicate_code: "This code is used already." bill_address: "Billing Address" @@ -2554,6 +2550,12 @@ See the %{link} to find out more about %{sitename}'s features and to start using no_order_cycles_error: "Please select at least one order cycle (drag and drop)" available: "Available" selected: "Selected" + customers: + index: + add_customer: "Add Customer" + add_a_new_customer_for: "Add a new customer for %{shop_name}" + customer_placeholder: "customer@example.org" + valid_email_error: "Please enter a valid email address" insufficient_stock: "Insufficient stock available, only %{on_hand} remaining" out_of_stock: reduced_stock_available: Reduced stock available