From 1738db9e1f23df0bd725682dda24c93ef8b5a820 Mon Sep 17 00:00:00 2001 From: Nicolas Blanc Date: Mon, 22 Feb 2016 13:00:27 +0000 Subject: [PATCH] new validation 02/22/2016 --- .../admin/bulk_product_update.js.coffee | 2 +- .../line_items_controller.js.coffee | 2 +- .../single_enterprise_dashboard.html.haml | 26 +++++++++---------- config/locales/en.yml | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/assets/javascripts/admin/bulk_product_update.js.coffee b/app/assets/javascripts/admin/bulk_product_update.js.coffee index 92282ae6ba..cb337c4c47 100644 --- a/app/assets/javascripts/admin/bulk_product_update.js.coffee +++ b/app/assets/javascripts/admin/bulk_product_update.js.coffee @@ -212,7 +212,7 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout ).error (data, status) -> if status == 400 && data.errors? && data.errors.length > 0 errors = error + "\n" for error in data.errors - alert t("products_update_error") + errors + alert t("products_update_error") + "\n" + errors $scope.displayFailure t("products_update_error") else $scope.displayFailure t("products_update_error_data") + status diff --git a/app/assets/javascripts/admin/line_items/controllers/line_items_controller.js.coffee b/app/assets/javascripts/admin/line_items/controllers/line_items_controller.js.coffee index ce4ef7aa7b..9ab0a71ecc 100644 --- a/app/assets/javascripts/admin/line_items/controllers/line_items_controller.js.coffee +++ b/app/assets/javascripts/admin/line_items/controllers/line_items_controller.js.coffee @@ -70,7 +70,7 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout, if $scope.bulk_order_form.$valid StatusMessage.display 'progress', "Saving..." $q.all(LineItems.saveAll()).then(-> - StatusMessage.display 'success', "All changes saved"v + StatusMessage.display 'success', "All changes saved" $scope.bulk_order_form.$setPristine() ).catch -> StatusMessage.display 'failure', {t("unsaved_changes_warning")} diff --git a/app/views/spree/admin/overview/single_enterprise_dashboard.html.haml b/app/views/spree/admin/overview/single_enterprise_dashboard.html.haml index 437d28b63c..0d31d482f6 100644 --- a/app/views/spree/admin/overview/single_enterprise_dashboard.html.haml +++ b/app/views/spree/admin/overview/single_enterprise_dashboard.html.haml @@ -31,7 +31,7 @@ .alert-box = t "spree_admin_single_enterprise_alert_mail_confirmation" %strong= "#{@enterprise.name}." - = t(:spree_admin_single_enterprise_alert_mail_sent) + = t "spree_admin_single_enterprise_alert_mail_sent" %strong= "#{@enterprise.email}." = link_to(t('resend'), main_app.enterprise_confirmation_path(enterprise: { id: @enterprise.id, email: @enterprise.email } ), method: :post) %a.close{ href: "#" } × @@ -39,7 +39,7 @@ .alert-box %strong = t "spree_admin_single_enterprise_hint" - %strong= "#{t:manage} #{@enterprise.name}." + %strong= "#{t 'manage'} #{@enterprise.name}." %a.close{ href: "#" } × .row @@ -47,15 +47,15 @@ .header %h3 %span.icon-map-marker - = t:your_profil_live + = t "your_profil_live" %p - = t:on_ofn_map + = t "on_ofn_map" .list /-# Can we pass an anchor here to zoom to our enterprise? %a.button.bottom{href: main_app.map_path, target: '_blank'} - = t:see + = t "see" = @enterprise.name - = t:live + = t "live" %span.icon-arrow-right .two.columns   @@ -64,12 +64,12 @@ .header %h3 %span.icon-edit - = t:edit_profile_details + = t "edit_profile_details" %p - = t:edit_profile_details_etc + = t "edit_profile_details_etc" .list %a.button.bottom{href: main_app.edit_admin_enterprise_path(@enterprise)} - = t:manage + = t "manage" = @enterprise.name %span.icon-arrow-right @@ -79,10 +79,10 @@ .header %h3 %span.icon-th-large - = t:add_and_manage_products + = t "add_and_manage_products" .list %a.button.bottom{href: bulk_edit_admin_products_path} - = t:manage_products + = t "manage_products" %span.icon-arrow-right .two.columns @@ -93,8 +93,8 @@ .header %h3 %span.icon-shopping-cart - = t:add_and_manage_order_cycles + = t "add_and_manage_order_cycles" .list %a.button.bottom{href: main_app.admin_order_cycles_path} - = t:manage_order_cycles + = t "manage_order_cycles" %span.icon-arrow-right diff --git a/config/locales/en.yml b/config/locales/en.yml index 5b53145eda..67cfaa2bf3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -31,7 +31,7 @@ en: welcome_to: 'Welcome to ' description: "We begin from the ground up. With farmers and growers ready to tell their stories proudly and truly. With distributors ready to connect people with products fairly and honestly. With buyers who believe that better weekly shopping decisions can…" search_by_name: Search by name or suburb... - producers: Aussie Producers #FIXME + producers: 'Australian Producers' producers_join: Australian producers are now welcome to join the Open Food Network. #FIXME charges_sales_tax: Charges GST? print_invoice: "Print Invoice"