From 839bf8794f6c67c535219371a21a811170d69ac7 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 7 Jan 2016 07:06:26 +0100 Subject: [PATCH 1/4] Fix a hard cocded string on Order summary screen Created an order_pickup_time entry in locale files. --- app/views/spree/shared/_order_details.html.haml | 2 +- config/locales/en.yml | 1 + config/locales/fr.yml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/spree/shared/_order_details.html.haml b/app/views/spree/shared/_order_details.html.haml index 25582aac8f..8be8d3cf50 100644 --- a/app/views/spree/shared/_order_details.html.haml +++ b/app/views/spree/shared/_order_details.html.haml @@ -62,7 +62,7 @@ %strong= order.shipping_method.name .pad .text-big - Ready for collection + = t :order_pickup_time %strong #{order.order_cycle.pickup_time_for(order.distributor)} %p.text-small.text-skinny.pre-line %em= order.shipping_method.description.andand.html_safe || "" diff --git a/config/locales/en.yml b/config/locales/en.yml index 04d350153b..701d758891 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -227,6 +227,7 @@ en: order_delivery_on: Delivery on order_delivery_address: Delivery address order_special_instructions: "Your notes:" + order_pickup_time: Ready for collection order_pickup_instructions: Collection Instructions order_produce: Produce order_total_price: Total diff --git a/config/locales/fr.yml b/config/locales/fr.yml index b0613efff4..7ddd01655a 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -166,6 +166,7 @@ fr: order_delivery_on: Livraison prévue order_delivery_address: Adresse de livraison order_special_instructions: "Vos commentaires:" + order_pickup_time: Disponible pour retrait order_pickup_instructions: Instructions de retrait order_produce: Produit order_total_price: Total From 01bf64e6b03658424b9cd547dc6dc2cccdda669f Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 7 Jan 2016 07:15:18 +0100 Subject: [PATCH 2/4] Allow delayed_job to use the locale defined for application delayed_job requires a different configuration variable for locale than the application. See https://stackoverflow.com/questions/8478597/rails-3-set-i18n-locale-is-not-working for reference --- config/application.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index 8a492f5121..55bf36ad86 100644 --- a/config/application.rb +++ b/config/application.rb @@ -66,7 +66,8 @@ module Openfoodnetwork # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] config.i18n.default_locale = ENV["LOCALE"] - + I18n.locale = config.i18n.locale = config.i18n.default_locale + # Setting this to true causes a performance regression in Rails 3.2.17 # When we're on a version with the fix below, we can set it to true # https://github.com/svenfuchs/i18n/issues/230 From 0c434c197b5106dae53f4345c5af6ab84153f6c3 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 13 Jan 2016 16:07:04 +1100 Subject: [PATCH 3/4] Making Travis fail if karma fails --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7764342b15..0ba99dc9e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ before_script: fi script: - - '[ "$KARMA" = "true" ] && bundle exec rake karma:run || echo "Skipping karma run"' + - 'if [ "$KARMA" = "true" ]; then bundle exec rake karma:run; else echo "Skipping karma run"; fi' #- "KNAPSACK_GENERATE_REPORT=true bundle exec rspec spec" - "bundle exec rake knapsack:rspec" From c33835e75151fa64c226220b855cc017db51f7e0 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 13 Jan 2016 16:23:14 +1100 Subject: [PATCH 4/4] fixup whitespace --- config/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index 55bf36ad86..ba75a097ec 100644 --- a/config/application.rb +++ b/config/application.rb @@ -67,7 +67,7 @@ module Openfoodnetwork # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] config.i18n.default_locale = ENV["LOCALE"] I18n.locale = config.i18n.locale = config.i18n.default_locale - + # Setting this to true causes a performance regression in Rails 3.2.17 # When we're on a version with the fix below, we can set it to true # https://github.com/svenfuchs/i18n/issues/230