From 85c99102dd65f1a4785bbaa3f971d7c3e771553e Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 27 Aug 2015 16:54:20 +1000 Subject: [PATCH 01/30] i18n: Replacing all language strings in app/view/ Languages strings were moved to config/locale/en.yml. All views contain according calls to t() now. --- .../checkout/_accordion_heading.html.haml | 6 +- app/views/checkout/_authentication.html.haml | 9 +- app/views/checkout/_billing.html.haml | 17 +- app/views/checkout/_details.html.haml | 13 +- app/views/checkout/_form.html.haml | 2 +- app/views/checkout/_payment.html.haml | 2 +- app/views/checkout/_shipping.html.haml | 14 +- app/views/checkout/_summary.html.haml | 15 +- app/views/checkout/edit.html.haml | 7 +- .../confirmation_instructions.html.haml | 14 +- app/views/enterprise_mailer/welcome.html.haml | 18 +- app/views/enterprises/shop.html.haml | 7 +- app/views/groups/_contact.html.haml | 13 +- app/views/groups/index.html.haml | 9 +- app/views/groups/show.html.haml | 19 +- app/views/groups/signup.html.haml | 54 ++- app/views/home/_brandstory.html.haml | 24 +- app/views/home/_cta.html.haml | 5 +- app/views/home/_fat.html.haml | 17 +- app/views/home/_filters.html.haml | 10 +- app/views/home/_hubs.html.haml | 11 +- app/views/home/_login.html.haml | 5 +- app/views/home/_signup.html.haml | 3 +- app/views/home/_stats.html.haml | 11 +- app/views/home/_system.html.haml | 21 +- app/views/home/index.html.haml | 2 +- .../layouts/_become_distributor.html.haml | 17 - app/views/layouts/_become_farmer.html.haml | 17 - app/views/layouts/darkswarm.html.haml | 2 +- app/views/layouts/mailer.html.haml | 10 +- app/views/layouts/registration.html.haml | 2 +- app/views/map/index.html.haml | 2 +- app/views/modals/_food_hub.html.haml | 11 +- app/views/modals/_groups.html.haml | 10 +- app/views/modals/_learn_more.html.haml | 21 +- app/views/modals/_producers.html.haml | 7 +- .../open_food_network/cart/_show.html.haml | 23 +- app/views/order_cycles/_choice.html.haml | 9 +- .../order_cycles/_orders_closed.html.haml | 16 +- .../order_cycles/_orders_current.html.haml | 10 +- app/views/order_cycles/_orders_open.html.haml | 10 +- app/views/order_cycles/_selection.html.haml | 2 +- app/views/producers/_fat.html.haml | 18 +- app/views/producers/_filters.html.haml | 5 +- app/views/producers/index.html.haml | 5 +- app/views/producers/signup.html.haml | 24 +- app/views/products/_list.html.haml | 18 +- app/views/registration/index.html.haml | 2 +- app/views/shared/_case_study.html.haml | 3 +- app/views/shared/_footer.html.haml | 95 ++-- app/views/shared/_ie_warning.html.haml | 18 +- app/views/shared/_login.html.haml | 10 +- app/views/shared/_signed_in.html.haml | 10 +- .../shared/_signed_in_offcanvas.html.haml | 9 +- app/views/shared/_signed_out.html.haml | 4 +- .../_enterprise_no_results.html.haml | 4 +- .../shared/components/_filter_box.html.haml | 2 +- .../_filter_box_shopfront.html.haml | 2 +- .../components/_filter_controls.html.haml | 2 +- .../_filter_controls_shopfront.html.haml | 2 +- .../components/_show_profiles.html.haml | 4 +- app/views/shared/mailers/_signoff.html.haml | 6 +- .../mailers/_social_and_contact.html.haml | 4 +- app/views/shared/menu/_alert.html.haml | 5 +- app/views/shared/menu/_cart.html.haml | 14 +- app/views/shared/menu/_large_menu.html.haml | 19 +- app/views/shared/menu/_mobile_menu.html.haml | 12 +- app/views/shared/unauthorized.html.haml | 2 +- app/views/shop/products/_form.html.haml | 16 +- app/views/shop/products/_summary.html.haml | 3 +- app/views/shopping_shared/_contact.html.haml | 9 +- app/views/shopping_shared/_groups.html.haml | 2 +- .../_last_order_cycle.html.haml | 4 +- .../_next_order_cycle.html.haml | 3 +- .../shopping_shared/_order_cycles.html.haml | 5 +- .../shopping_shared/_producers.html.haml | 3 +- app/views/shopping_shared/_tabs.html.haml | 8 +- app/views/shops/index.html.haml | 8 +- app/views/shops/signup.html.haml | 27 +- .../spree/api/products/bulk_show.v1.rabl | 2 +- .../spree/api/variants/bulk_show.v1.rabl | 4 +- .../spree/checkout/payment/_gateway.html.haml | 11 +- .../order_mailer/_order_summary.html.haml | 14 +- .../spree/order_mailer/_payment.html.haml | 9 +- .../spree/order_mailer/_shipping.html.haml | 14 +- .../_special_instructions.html.haml | 3 +- .../confirm_email_for_customer.html.haml | 13 +- .../confirm_email_for_shop.html.haml | 11 +- app/views/spree/orders/_adjustments.html.haml | 3 +- app/views/spree/orders/_form.html.haml | 11 +- app/views/spree/orders/edit.html.haml | 11 +- .../orders/order_cycle_expired.html.haml | 20 +- app/views/spree/orders/show.html.haml | 6 +- .../_add_to_cart_distributor_choice.html.haml | 3 +- .../_add_to_cart_distributor_fixed.html.haml | 9 +- ..._to_cart_distributor_unavailable.html.haml | 4 +- .../_add_to_cart_order_cycle_choice.html.haml | 5 +- .../_add_to_cart_order_cycle_fixed.html.haml | 9 +- ..._to_cart_order_cycle_unavailable.html.haml | 4 +- .../_add_to_cart_quantity_fields.html.haml | 6 +- .../products/_distributor_details.html.haml | 5 +- .../spree/shared/_order_details.html.haml | 28 +- .../shared/_order_details_steps_data.html.erb | 8 +- .../_products_by_distribution.html.haml | 9 +- .../user_mailer/signup_confirmation.html.haml | 23 +- config/locales/en.yml | 420 +++++++++++++++++- 106 files changed, 1046 insertions(+), 503 deletions(-) delete mode 100644 app/views/layouts/_become_distributor.html.haml delete mode 100644 app/views/layouts/_become_farmer.html.haml diff --git a/app/views/checkout/_accordion_heading.html.haml b/app/views/checkout/_accordion_heading.html.haml index c7872ce109..240cd13c47 100644 --- a/app/views/checkout/_accordion_heading.html.haml +++ b/app/views/checkout/_accordion_heading.html.haml @@ -7,9 +7,11 @@ .small-4.medium-3.columns.text-right %span.accordion-up %em - %small Hide + %small + = t :hide %i.ofn-i_053-point-up %span.accordion-down %em - %small Expand + %small + = t :expand %i.ofn-i_052-point-down diff --git a/app/views/checkout/_authentication.html.haml b/app/views/checkout/_authentication.html.haml index 3326ddb0fe..d3863cf2ac 100644 --- a/app/views/checkout/_authentication.html.haml +++ b/app/views/checkout/_authentication.html.haml @@ -1,11 +1,14 @@ %section{"ng-show" => "!enabled"} .row .small-12.columns.text-center{"ng-controller" => "AuthenticationCtrl"} - %h3.pad-top Ok, ready to checkout? + %h3.pad-top + = t :checkout_headline .row.pad-top .small-5.columns.text-center{"ng-controller" => "AuthenticationCtrl"} - %button.primary.expand{"ng-click" => "open()"} Log in + %button.primary.expand{"ng-click" => "open()"} + = t :label_login .small-2.columns.text-center %p.pad-top -OR- .small-5.columns.text-center - %button.neutral-btn.dark.expand{"ng-click" => "enabled = true"} Checkout as guest + %button.neutral-btn.dark.expand{"ng-click" => "enabled = true"} + = t :checkout_as_guest diff --git a/app/views/checkout/_billing.html.haml b/app/views/checkout/_billing.html.haml index 854f359b0c..7ea4d57da1 100644 --- a/app/views/checkout/_billing.html.haml +++ b/app/views/checkout/_billing.html.haml @@ -7,7 +7,7 @@ %i.ofn-i_009-close %label.label.round.success.right %i.ofn-i_051-check-big - Billing info + = t :checkout_billing %accordion-group{"is-open" => "accordion.billing", "ng-class" => "{valid: billing.$valid, open: accordion.billing}"} @@ -16,23 +16,24 @@ = f.fields_for :bill_address, @order.bill_address do |ba| .row .small-12.columns - = validated_input "Address", "order.bill_address.address1", "ofn-focus" => "accordion['billing']" + = validated_input t(:address), "order.bill_address.address1", "ofn-focus" => "accordion['billing']" .row .small-12.columns - = validated_input "Address (contd.)", "order.bill_address.address2", required: false + = validated_input t(:address2), "order.bill_address.address2", required: false .row .small-6.columns - = validated_input "City", "order.bill_address.city" + = validated_input t(:city), "order.bill_address.city" .small-6.columns - = validated_select "State", "order.bill_address.state_id", checkout_state_options(:billing) + = validated_select t(:state), "order.bill_address.state_id", checkout_state_options(:billing) .row .small-6.columns - = validated_input "Postcode", "order.bill_address.zipcode" + = validated_input t(:postcode), "order.bill_address.zipcode" .small-6.columns.right - = validated_select "Country", "order.bill_address.country_id", checkout_country_options + = validated_select t(:country), "order.bill_address.country_id", checkout_country_options .row .small-12.columns.text-right - %button.primary{"ng-disabled" => "billing.$invalid", "ng-click" => "next($event)"} Next + %button.primary{"ng-disabled" => "billing.$invalid", "ng-click" => "next($event)"} + = t :next diff --git a/app/views/checkout/_details.html.haml b/app/views/checkout/_details.html.haml index 646a3312e0..788996be37 100644 --- a/app/views/checkout/_details.html.haml +++ b/app/views/checkout/_details.html.haml @@ -7,7 +7,7 @@ %i.ofn-i_009-close %label.label.round.success.right %i.ofn-i_051-check-big - Your details + = t :checkout_details %accordion-group{"is-open" => "accordion.details", "ng-class" => "{valid: details.$valid, open: accordion.details}"} @@ -15,17 +15,18 @@ .row .small-6.columns - = validated_input "First Name", "order.bill_address.firstname" + = validated_input t(:first_name), "order.bill_address.firstname" .small-6.columns - = validated_input "Last Name", "order.bill_address.lastname" + = validated_input t(:last_name), "order.bill_address.lastname" .row .small-6.columns - = validated_input 'Email', 'order.email', type: :email, "ofn-focus" => "accordion['details']" + = validated_input t(:email), 'order.email', type: :email, "ofn-focus" => "accordion['details']" .small-6.columns - = validated_input 'Phone', 'order.bill_address.phone' + = validated_input t(:phone), 'order.bill_address.phone' .row .small-12.columns.text-right - %button.primary{"ng-disabled" => "details.$invalid", "ng-click" => "next($event)"} Next + %button.primary{"ng-disabled" => "details.$invalid", "ng-click" => "next($event)"} + = t :next diff --git a/app/views/checkout/_form.html.haml b/app/views/checkout/_form.html.haml index 1944dfffe1..65ed90b069 100644 --- a/app/views/checkout/_form.html.haml +++ b/app/views/checkout/_form.html.haml @@ -13,5 +13,5 @@ = render "checkout/payment", f: f %p %button.button.primary{type: :submit} - Place order now + = t :checkout_send / {{ checkout.$valid }} diff --git a/app/views/checkout/_payment.html.haml b/app/views/checkout/_payment.html.haml index cd3091efcd..29dbdd0b53 100644 --- a/app/views/checkout/_payment.html.haml +++ b/app/views/checkout/_payment.html.haml @@ -7,7 +7,7 @@ %i.ofn-i_009-close %label.label.round.success.right %i.ofn-i_051-check-big - Payment + = t :checkout_shipping %accordion-group{"is-open" => "accordion.payment", "ng-class" => "{valid: payment.$valid, open: accordion.payment}"} diff --git a/app/views/checkout/_shipping.html.haml b/app/views/checkout/_shipping.html.haml index e769376107..8bdc855b7a 100644 --- a/app/views/checkout/_shipping.html.haml +++ b/app/views/checkout/_shipping.html.haml @@ -7,7 +7,7 @@ %i.ofn-i_009-close %label.label.round.success.right %i.ofn-i_051-check-big - Shipping info + = t :checkout_shipping %accordion-group{"is-open" => "accordion.shipping", "ng-class" => "{valid: shipping.$valid, open: accordion.shipping}"} @@ -22,7 +22,7 @@ "ng-model" => "order.shipping_method_id"} {{ method.name }} %em.light{"ng-show" => "!method.price || method.price == 0"} - (Free) + = "(#{t(:checkout_method_free)})" %em.light{"ng-hide" => "!method.price || method.price == 0"} ({{ method.price | localizeCurrency }}) @@ -31,14 +31,15 @@ %label{"ng-if" => "Checkout.requireShipAddress()"} %input{type: :checkbox, "ng-model" => "Checkout.ship_address_same_as_billing"} - Shipping address same as billing address? + = t :checkout_address_same .small-12.columns.medium-6.columns.large-6.columns #distributor_address.panel{"ng-show" => "Checkout.shippingMethod().description"} %span{ style: "white-space: pre-wrap;" }{{ Checkout.shippingMethod().description }} %br/ %br/ - = 'Ready for:' if @order.order_cycle.pickup_time_for(@order.distributor) + - if @order.order_cycle.pickup_time_for(@order.distributor) + = t :checkout_ready_for = @order.order_cycle.pickup_time_for(@order.distributor) = f.fields_for :ship_address, @order.ship_address do |sa| @@ -46,8 +47,9 @@ .row .small-12.columns - = f.text_area :special_instructions, label: "Any comments or special instructions?", size: "60x4", "ng-model" => "order.special_instructions" + = f.text_area :special_instructions, label: t(:checkout_instructions), size: "60x4", "ng-model" => "order.special_instructions" .row .small-12.columns.text-right - %button.primary{"ng-disabled" => "shipping.$invalid", "ng-click" => "next($event)"} Next + %button.primary{"ng-disabled" => "shipping.$invalid", "ng-click" => "next($event)"} + = t :next diff --git a/app/views/checkout/_summary.html.haml b/app/views/checkout/_summary.html.haml index 1d24d1dcf2..3a4f6a4ea1 100644 --- a/app/views/checkout/_summary.html.haml +++ b/app/views/checkout/_summary.html.haml @@ -1,10 +1,12 @@ %orderdetails = form_for current_order, url: "#", html: {"ng-submit" => "purchase($event, checkout)"} do |f| %fieldset - %legend Your order + %legend + = t :checkout_your_order %table %tr - %th Cart total + %th + = t :checkout_cart_total %td.cart-total.text-right= display_checkout_subtotal(@order) - checkout_adjustments_for(current_order, exclude: [:shipping, :line_item]).reject{ |a| a.amount == 0 }.each do |adjustment| @@ -13,15 +15,16 @@ %td.text-right= adjustment.display_amount.to_html %tr - %th Shipping + %th + = t :checkout_shipping_price %td.shipping.text-right {{ Checkout.shippingPrice() | localizeCurrency }} %tr - %th Total + %th + = t :checkout_total_price %td.total.text-right {{ Checkout.cartTotal() | localizeCurrency }} //= f.submit "Purchase", class: "button", "ofn-focus" => "accordion['payment']" %a.button.secondary{href: cart_url} %i.ofn-i_008-caret-left - Back to Cart - + = t :checkout_back_to_cart diff --git a/app/views/checkout/edit.html.haml b/app/views/checkout/edit.html.haml index c2cc0aaa9d..f0bef536db 100644 --- a/app/views/checkout/edit.html.haml +++ b/app/views/checkout/edit.html.haml @@ -1,14 +1,15 @@ - content_for(:title) do - Checkout + = t :checkout_title = inject_enterprises .darkswarm.footer-pad - content_for :order_cycle_form do - %closing Checkout now + %closing + = t :checkout_now %p - Order ready for + = t :checkout_order_ready %strong = pickup_time current_order_cycle diff --git a/app/views/enterprise_mailer/confirmation_instructions.html.haml b/app/views/enterprise_mailer/confirmation_instructions.html.haml index 3ee6e8fd12..0014ddd365 100644 --- a/app/views/enterprise_mailer/confirmation_instructions.html.haml +++ b/app/views/enterprise_mailer/confirmation_instructions.html.haml @@ -1,22 +1,18 @@ %h3 - = "Hi, #{@resource.contact}!" + = t :email_confirmation_greeting, contact: @resource.contact %p.lead - = "A profile for #{@resource.name} has been successfully created!" - To activate your Profile we need to confirm this email address. + = t :email_confirmation_profile_created, name: @resource.name %p   %p.callout - Please click the link below to confirm your email and to continue setting up your profile. + = t :email_confirmation_click_link %br %strong - = link_to 'Confirm this email address »', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) + = link_to t(:email_confirmation_link_label), confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %p   %p - After confirming your email you can access your administration account for this enterprise. - See the - = link_to 'User Guide', 'http://www.openfoodnetwork.org/platform/user-guide/' - = "to find out more about #{ Spree::Config[:site_name] }'s features and to start using your profile or online store." + = t :email_confirmation_help, link: link_to(t(:email_confirmation_userguide), 'http://www.openfoodnetwork.org/platform/user-guide/'), sitename: Spree::Config[:site_name] = render 'shared/mailers/signoff' diff --git a/app/views/enterprise_mailer/welcome.html.haml b/app/views/enterprise_mailer/welcome.html.haml index ea939dbc6f..97b350de45 100644 --- a/app/views/enterprise_mailer/welcome.html.haml +++ b/app/views/enterprise_mailer/welcome.html.haml @@ -1,26 +1,22 @@ %h3 - = "Welcome, #{@enterprise.contact}!" + = "#{t(:email_welcome)}, #{@enterprise.contact}!" %p.lead - Thank you for confirming your email address. + = t :email_confirmed %strong = @enterprise.name - = "is now part of #{ Spree::Config.site_name }!" + = "#{t(:email_registered)} #{ Spree::Config.site_name }!" %p - The User Guide with detailed support for setting up your Producer or Hub is here: - = link_to 'Open Food Network User Guide', 'http://www.openfoodnetwork.org/platform/user-guide/' + = t :email_userguide_html, link: link_to('Open Food Network User Guide', 'http://www.openfoodnetwork.org/platform/user-guide/') %p - You can manage your account by logging into the - = link_to 'Admin Panel', spree.admin_url - or by clicking on the cog in the top right hand side of the homepage, and selecting Administration. + = t :email_admin_html, link: link_to('Admin Panel', spree.admin_url) %p - We also have an online forum for community discussion related to OFN software and the unique challenges of running a food enterprise. You are encouraged to join in. We are constantly evolving and your input into this forum will shape what happens next. - = link_to 'Join the community.', 'http://community.openfoodnetwork.org/' + = t :email_community_html, link: link_to('Join the community.', 'http://community.openfoodnetwork.org/') %p - If you have any difficulties, check out our FAQs, browse the forum or post a 'Support' topic and someone will help you out! + = t :email_help = render 'shared/mailers/signoff' diff --git a/app/views/enterprises/shop.html.haml b/app/views/enterprises/shop.html.haml index 7ad617a4a1..35937629fc 100644 --- a/app/views/enterprises/shop.html.haml +++ b/app/views/enterprises/shop.html.haml @@ -8,17 +8,18 @@ %div{"ng-controller" => "OrderCycleChangeCtrl", "ng-cloak" => true} %closing{"ng-if" => "OrderCycle.selected()"} - Next order closing + = t :enterprises_next_closing %strong {{ OrderCycle.orders_close_at() | date_in_words }} - %span Ready for + %span + = t :enterprises_ready_for / Will this label should be a variable to reflect 'Ready for pickup / delivery' as appropriate %select.avenir#order_cycle_id{"ng-model" => "order_cycle.order_cycle_id", "ofn-change-order-cycle" => true, "ng-options" => "oc.id as oc.time for oc in #{@order_cycles.map {|oc| {time: pickup_time(oc), id: oc.id}}.to_json}", - "popover-placement" => "left", "popover" => "Choose when you want your order:", "popover-trigger" => "openTrigger"} + "popover-placement" => "left", "popover" => t(:enterprises_choose), "popover-trigger" => "openTrigger"} diff --git a/app/views/groups/_contact.html.haml b/app/views/groups/_contact.html.haml index 915c608d15..320da464bd 100644 --- a/app/views/groups/_contact.html.haml +++ b/app/views/groups/_contact.html.haml @@ -1,7 +1,8 @@ %div.contact-container{bindonce: true} - if @group.email.present? || @group.website.present? || @group.phone.present? %div.modal-centered - %p.modal-header Contact + %p.modal-header + = t :groups_contact_web - if @group.phone.present? %p %a{tel: @group.phone} @@ -9,16 +10,17 @@ - if @group.email.present? %p =link_to_service "", @group.email.reverse, mailto: true do - Email us + = t :groups_contact_email - if @group.website.present? %p =link_to_service "http://", @group.website do - Visit our website + = t :groups_contact_website %div{bindonce: true} - if @group.facebook.present? || @group.twitter.present? || @group.linkedin.present? || @group.instagram.present? %div.modal-centered.pad-top - %p.modal-header Follow + %p.modal-header + = t :groups_contact_web .follow-icons{bindonce: true} =link_to_service "http://twitter.com/", @group.twitter do %i.ofn-i_041-twitter @@ -32,7 +34,8 @@ %div{bindonce: true} - if @group.address1.present? || @group.city.present? %div.modal-centered.pad-top - %p.modal-header Address + %p.modal-header + = t :groups_contact_web %p = @group.address1 - if @group.address2.present? diff --git a/app/views/groups/index.html.haml b/app/views/groups/index.html.haml index 537a81cc26..19159bc63f 100644 --- a/app/views/groups/index.html.haml +++ b/app/views/groups/index.html.haml @@ -1,5 +1,5 @@ - content_for(:title) do - Groups + = t :groups_title = inject_enterprises @@ -9,11 +9,12 @@ #groups.pad-top.footer-pad{"ng-controller" => "GroupsCtrl"} #active-table-search.row.pad-top .small-12.columns - %h1 Groups / regions + %h1 + = t :groups_headline %p %input{type: :text, "ng-model" => "query", - placeholder: "Search name or keyword", + placeholder: t(:groups_search), "ng-debounce" => "150", "ofn-disable-enter" => true} @@ -39,6 +40,6 @@ .group{"ng-show" => "groups.length == 0"} .row.pad-top - No groups found + = t :groups_no_groups = render partial: "shared/footer" diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 907926f8b7..0cfee2138a 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -42,16 +42,18 @@ %tab{heading: 'About us', active: "active(\'about\')", select: "select(\'about\')"} - %h1 About Us + %h1 + = t :groups_about %p!= @group.long_description - %tab{heading: 'Our producers', + %tab{heading: t(:groups_producers), active: "active(\'producers\')", select: "select(\'producers\')"} .producers{"ng-controller" => "GroupEnterprisesCtrl"} .row .small-12.columns - %h1 Our Producers + %h1 + = t :groups_producers = render partial: "shared/components/enterprise_search" -# TODO: find out why this is not working -#= render partial: "producers/filters" @@ -71,13 +73,14 @@ = render partial: 'shared/components/enterprise_no_results' - %tab{heading: 'Our hubs', + %tab{heading: t(:groups_hubs), active: "active(\'hubs\')", select: "select(\'hubs\')"} .hubs{"ng-controller" => "GroupEnterprisesCtrl"} .row .small-12.columns - %h1 Our Hubs + %h1 + = t :groups_hubs = render partial: "shared/components/enterprise_search" -# TODO: find out why this is not working @@ -109,11 +112,11 @@ %p.text-small = "Copyright #{Date.today.year} #{@group.name}" %h2 - =link_to_service "https://www.facebook.com/", @group.facebook, title: 'Follow us on Facebook' do + =link_to_service "https://www.facebook.com/", @group.facebook, title: t(:groups_contact_facebook) do %i.ofn-i_044-facebook - =link_to_service "", @group.email.reverse, title:'Email us', mailto: true do + =link_to_service "", @group.email.reverse, title: t(:groups_contact_email), mailto: true do %i.ofn-i_050-mail-circle - =link_to_service "http://", @group.website, title: 'Visit our website' do + =link_to_service "http://", @group.website, title: t(:groups_contact_website) do %i.ofn-i_049-web %p   diff --git a/app/views/groups/signup.html.haml b/app/views/groups/signup.html.haml index c1c885d0f0..22aae2b330 100644 --- a/app/views/groups/signup.html.haml +++ b/app/views/groups/signup.html.haml @@ -1,36 +1,48 @@ - content_for(:title) do - Sign up as a group + = t :groups_signup_title #panes #shops-signup.pane .row.header .small-12.medium-12.columns.text-center - %h2 Groups sign up + %h2 + = t :groups_signup_headline .row.content .small-12.medium-6.medium-offset-3.columns.text-center - %p.text-big We're an amazing platform for collaborative marketing, the easiest way for your members and stakeholders to reach new markets. We're non-profit, affordable, and simple. + %p.text-big + = t :groups_signup_intro %br %a.button.transparent{href: "hello@openfoodnetwork.org?subject=I'd%20like%20to%20talk%20to%20you%20about%20groups%20on%20the%20Open%20Food%20Network".reverse, target: '_blank', mailto: true} - Email us + = t :groups_signup_email .groups-details.pane .row .small-12.medium-8.medium-offset-2.columns - %h3.text-center We transform food systems fairly. - %p.text-big It's why we get out of bed every day. We're a global non-profit, based on open source code. We play fair. You can always trust us. - %p.text-big We know you have big ideas, and we want to help. We'll share our knowledge, networks and resources. We know that isolation doesn't create change, so we'll partner with you. + %h3.text-center + = t :groups_signup_motivation1 + %p.text-big + = t :groups_signup_motivation2 + %p.text-big + = t :groups_signup_motivation3 %br - %h3.text-center We meet you where you are. - %p.text-big You might be an alliance of food hubs, producers, or distributors, and an industry body, or a local government. - %p.text-big Whatever your role in your local food movement, we're ready to help. However you come to wonder what Open Food Network would look like or is doing in your part of the world, let's start the conversation. + %h3.text-center + = t :groups_signup_motivation4 + %p.text-big + = t :groups_signup_motivation5 + %p.text-big + = t :groups_signup_motivation6 %br - %h3.text-center We make food movements make more sense. - %p.text-big You need to activate and enable your networks, we offer a platform for conversation and action. You need real engagement. We’ll help reach all the players, all the stakeholders, all the sectors. - %p.text-big You need resourcing. We’ll bring all our experience to bear. You need cooperation. We’ll better connect you to a global network of peers. + %h3.text-center + = t :groups_signup_motivation7 + %p.text-big + = t :groups_signup_motivation8 + %p.text-big + = t :groups_signup_motivation9 .pane .row .small-12.medium-10.medium-offset-1.columns.text-center - %h2 Group Account + %h2 + = t :groups_signup_pricing -# %p.text-big -# / If there is a time-sensitive offer you can write it here, e.g. -# Time-sensitive offer goes here! @@ -40,22 +52,26 @@ #shops-case-studies .row .small-12.medium-10.medium-offset-1.columns - %h2.text-center Case studies + %h2.text-center + = t :groups_signup_studies %br = ContentConfig.group_signup_case_studies_html.html_safe .pane#cta .row .small-12.medium-6.medium-offset-3.columns.text-center - %h2 Ready to discuss? - %p.text-big Get in touch to discover what OFN can do for you: + %h2 + = t :groups_signup_contact + %p.text-big + = t :groups_signup_contact_text %a.button.transparent{href: "hello@openfoodnetwork.org?subject=I'd%20like%20to%20talk%20to%20you%20about%20groups%20on%20the%20Open%20Food%20Network".reverse, target: '_blank', mailto: true} - Email us + = t :groups_signup_email #hub-details.pane.footer-pad .row .small-12.medium-10.medium-offset-1.columns - %h2.text-center Here's the detail. + %h2.text-center + = t :groups_signup_detail = ContentConfig.group_signup_detail_html.html_safe = render partial: "shared/footer" diff --git a/app/views/home/_brandstory.html.haml b/app/views/home/_brandstory.html.haml index 40e5b77bf4..25b8687742 100644 --- a/app/views/home/_brandstory.html.haml +++ b/app/views/home/_brandstory.html.haml @@ -1,17 +1,25 @@ #brand-story.pane .row .small-12.medium-8.medium-offset-2.columns.text-center - %h2 Food, unincorporated. - %p Sometimes the best way to fix the system is to start a new one… + %h2 + = t :brandstory_headline + %p + = t :brandstory_intro #brand-story-text.hide-show.slideable - %p 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 seriously change the world. - %p Then we need a way to make it real. A way to empower everyone who grows, sells and buys food. A way to tell all the stories, to handle all the logistics. A way to turn transaction into transformation every day. - %p So we build an online marketplace that levels the playing field. It’s transparent, so it creates real relationships. It’s open source, so it’s owned by everyone. It scales to regions and nations, so people start versions across the world. - %p It works everywhere. It changes everything. %p - %strong We call it Open Food Network. - %p We all love food. Now we can love our food system too. + = t :brandstory_part1 + %p + = t :brandstory_part2 + %p + = t :brandstory_part3 + %p + = t :brandstory_part4 + %p + %strong + = t :brandstory_part5_strong + %p + = t :brandstory_part6 %a.text-vbig{"slide-toggle" => "#brand-story-text", "ng-click" => "toggleBrandStory()"} %i.ofn-i_005-caret-down{"ng-hide" => "brandStoryExpanded"} diff --git a/app/views/home/_cta.html.haml b/app/views/home/_cta.html.haml index ab95bae95d..692ac06361 100644 --- a/app/views/home/_cta.html.haml +++ b/app/views/home/_cta.html.haml @@ -1,7 +1,8 @@ #cta.pane .row .small-12.columns.text-center - %h2 Shopping that makes the world a better place. + %h2 + = t :cta_headline %br %a.button.transparent{href: "/shops"} - I'm Ready + = t :cta_label diff --git a/app/views/home/_fat.html.haml b/app/views/home/_fat.html.haml index 8d857d03f7..b96b13885e 100644 --- a/app/views/home/_fat.html.haml +++ b/app/views/home/_fat.html.haml @@ -1,7 +1,8 @@ .row.active_table_row{"ng-show" => "open()", "ng-click" => "toggle($event)", "ng-class" => "{'open' : !ofn-i_032-closed-sign()}", bindonce: true} .columns.small-12.medium-6.large-5.fat %div{"bo-if" => "hub.taxons"} - %label Shop for + %label + = t :hubs_buy .trans-sentence %span.fat-taxons{"ng-repeat" => "taxon in hub.taxons"} %render-svg{path: "{{taxon.icon}}"} @@ -10,17 +11,19 @@   .columns.small-12.medium-3.large-2.fat %div{"bo-if" => "hub.pickup || hub.delivery"} - %label Delivery options + %label + = t :hubs_delivery_options %ul.small-block-grid-2.medium-block-grid-1.large-block-grid-1 %li.pickup{"bo-if" => "hub.pickup"} %i.ofn-i_038-takeaway - Pickup + = t :hubs_pickup %li.delivery{"bo-if" => "hub.delivery"} %i.ofn-i_039-delivery - Delivery + = t :hubs_delivery .columns.small-12.medium-3.large-5.fat %div{"bo-if" => "hub.producers"} - %label Our producers + %label + = t :hubs_producers %ul.small-block-grid-2.medium-block-grid-1.large-block-grid-2{"ng-class" => "{'show-more-producers' : toggleMoreProducers}", "class" => "producers-list"} %li{"ng-repeat" => "enterprise in hub.producers | limitTo:7"} %enterprise-modal @@ -31,9 +34,9 @@ .more + %span{"bo-text" => "hub.producers.length-7"} - More + = t :label_more .less - Show less + = t :label_less %li{"ng-repeat" => "enterprise in hub.producers.slice(7,hub.producers.length)", "class" => "additional-producer"} %enterprise-modal %i.ofn-i_036-producers diff --git a/app/views/home/_filters.html.haml b/app/views/home/_filters.html.haml index 21719b04b7..bf4b1f8266 100644 --- a/app/views/home/_filters.html.haml +++ b/app/views/home/_filters.html.haml @@ -8,13 +8,15 @@ .row.filter-box .small-12.large-9.columns %h5.tdhead - .light Filter by - Type + .light + = t :hubs_filter_by + = t :hubs_filter_type %filter-selector.small-block-grid-2.medium-block-grid-4.large-block-grid-5{ objects: "visibleMatches | visible | taxonsOf", "active-selectors" => "activeTaxons" } .small-12.large-3.columns %h5.tdhead - .light Filter by - Delivery + .light + = t :hubs_filter_by + = t :hubs_filter_delivery %ul.small-block-grid-2.medium-block-grid-4.large-block-grid-2 %shipping-type-selector{results: "shippingTypes"} diff --git a/app/views/home/_hubs.html.haml b/app/views/home/_hubs.html.haml index 40074ce0bb..fea1fc0a7d 100644 --- a/app/views/home/_hubs.html.haml +++ b/app/views/home/_hubs.html.haml @@ -3,7 +3,8 @@ #hubs.hubs{"ng-controller" => "EnterprisesCtrl", "ng-cloak" => true} .row .small-12.columns - %h1{"scroll-after-load" => (spree_current_user ? true : nil)} Shop in your local area + %h1{"scroll-after-load" => (spree_current_user ? true : nil)} + = t :hubs_intro = render "shared/components/enterprise_search" = render "home/filters" @@ -11,16 +12,18 @@ .row .small-12.columns .name-matches{"ng-show" => "nameMatchesFiltered.length > 0"} - %h2 Did you mean? + %h2 + = t :hubs_matches = render "home/hubs_table", enterprises: "nameMatches" .distance-matches{"ng-if" => "nameMatchesFiltered.length == 0 || distanceMatchesShown"} %h2{"ng-show" => "nameMatchesFiltered.length > 0 || query.length > 0"} - Closest to + = t :hubs_matches %span{"ng-show" => "nameMatchesFiltered.length > 0"} {{ nameMatchesFiltered[0].name }}... %span{"ng-hide" => "nameMatchesFiltered.length > 0"} {{ query }}... = render "home/hubs_table", enterprises: "distanceMatches" .show-distance-matches{"ng-show" => "nameMatchesFiltered.length > 0 && !distanceMatchesShown"} - %a{href: "", "ng-click" => "showDistanceMatches()"} Show me shops near {{ nameMatchesFiltered[0].name }} + %a{href: "", "ng-click" => "showDistanceMatches()"} + = t :hubs_distance_filter, location: "{{ nameMatchesFiltered[0].name }}" diff --git a/app/views/home/_login.html.haml b/app/views/home/_login.html.haml index 31fafd05d9..12b261b8f5 100644 --- a/app/views/home/_login.html.haml +++ b/app/views/home/_login.html.haml @@ -1,10 +1,11 @@ .row .large-12.large-centered.columns - %h2 Login + %h2 + = t :label_login = form_for Spree::User.new, :remote => true, :html => {'data-type' => :json}, :as => :spree_user, :url => spree.spree_user_session_path do |f| #password-credentials #login-error-alert.alert-box.alert.hide - Invalid email or password + = t :login_invalid %p = f.label :email, t(:email) = f.email_field :email, :class => 'title', :tabindex => 1, :id => "login_spree_user_email" diff --git a/app/views/home/_signup.html.haml b/app/views/home/_signup.html.haml index 33eaff94d0..4eddb76c96 100644 --- a/app/views/home/_signup.html.haml +++ b/app/views/home/_signup.html.haml @@ -1,6 +1,7 @@ .row .large-12.large-centered.columns - %h2 Sign Up + %h2 + = t :label_signup = form_for Spree::User.new, :as => :spree_user, :url => spree.spree_user_registration_path(@spree_user) do |f| %p = f.label :email, t(:email) diff --git a/app/views/home/_stats.html.haml b/app/views/home/_stats.html.haml index 6c686a22b7..baef4f0fbd 100644 --- a/app/views/home/_stats.html.haml +++ b/app/views/home/_stats.html.haml @@ -1,23 +1,24 @@ #stats.pane .row.header .small-12.medium-8.medium-offset-2.columns.text-center - %h2 We're creating a new food system. + %h2 + = t :stats_headline .row.content - if ContentConfig.home_show_stats .small-12.medium-3.columns.text-center %h4 %strong= number_with_delimiter @num_producers - food producers + = t :stats_producers .small-12.medium-3.columns.text-center %h4 %strong= number_with_delimiter @num_distributors - food shops + = t :stats_shops .small-12.medium-3.columns.text-center %h4 %strong= number_with_delimiter @num_users - food shoppers + = t :stats_shoppers .small-12.medium-3.columns.text-center %h4 %strong= number_with_delimiter @num_orders - food orders + = t :stats_orders diff --git a/app/views/home/_system.html.haml b/app/views/home/_system.html.haml index ed32e305f4..fdfd9660dc 100644 --- a/app/views/home/_system.html.haml +++ b/app/views/home/_system.html.haml @@ -1,23 +1,30 @@ #system.pane .row .small-12.medium-12.large-8.large-offset-2.columns.text-center - %h2 Here's how it works. + %h2 + = t :system_headline .row .small-12.medium-4.columns.text-left .home-icon-box %a.search{href: "/shops"} .home-icon-box-bottom - %h4 1. Search - %p.text-normal Search our diverse, independent shops for seasonal local food. Search by neighbourhood and food category, or whether you prefer delivery or pickup. + %h4 + = t :system_step1 + %p.text-normal + = t :system_step1_text .small-12.medium-4.columns.text-left .home-icon-box %a.shop{href: "/shops"} .home-icon-box-bottom - %h4 2. Shop - %p.text-normal Transform your transactions with affordable local food from diverse producers and hubs. Know the stories behind your food and the people who make it! + %h4 + = t :system_step2 + %p.text-normal + = t :system_step2_text .small-12.medium-4.columns.text-left .home-icon-box %a.pick-up-delivery{href: "/shops"} .home-icon-box-bottom - %h4 3. Pick-up / Delivery - %p.text-normal Hang on for your delivery, or visit your producer or hub for a more personal connection with your food. Food shopping as diverse as nature intended it. + %h4 + = t :system_step3 + %p.text-normal + = t :system_step3_text diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index ee4fca7b27..cfb3015179 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -13,7 +13,7 @@ %img{src: "/assets/logo-white-notext.png", width: "250", title: Spree::Config.site_name} %br/ %a.button.transparent{href: "/shops"} - Shop Now + = t :home_shop #panes diff --git a/app/views/layouts/_become_distributor.html.haml b/app/views/layouts/_become_distributor.html.haml deleted file mode 100644 index 6d67ee9306..0000000000 --- a/app/views/layouts/_become_distributor.html.haml +++ /dev/null @@ -1,17 +0,0 @@ -#become-distributor.reveal-modal - .row - .small-12.columns - %h2 Become our distributor - %p - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna - aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. - Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint - occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum - - .row - .small-12.columns - = form_tag do - = text_area_tag :email_body, "", :input_html => { :rows => 10 } - = submit_tag "Submit", class: "button" - - = link_to "×".html_safe, "#", class: "close-reveal-modal" \ No newline at end of file diff --git a/app/views/layouts/_become_farmer.html.haml b/app/views/layouts/_become_farmer.html.haml deleted file mode 100644 index aacabea7ff..0000000000 --- a/app/views/layouts/_become_farmer.html.haml +++ /dev/null @@ -1,17 +0,0 @@ -#become-farmer.reveal-modal - .row - .small-12.columns - %h2 Become our farmer - %p - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna - aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. - Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint - occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum - - .row - .small-12.columns - = form_tag do - = text_area_tag :email_body, "", :input_html => { :rows => 10 } - = submit_tag "Submit", class: "button" - - = link_to "×".html_safe, "#", class: "close-reveal-modal" diff --git a/app/views/layouts/darkswarm.html.haml b/app/views/layouts/darkswarm.html.haml index 33a3d6148a..88075a3171 100644 --- a/app/views/layouts/darkswarm.html.haml +++ b/app/views/layouts/darkswarm.html.haml @@ -3,7 +3,7 @@ %meta{charset: 'utf-8'}/ %meta{name: 'viewport', content: "width=device-width,initial-scale=1.0"}/ - %title= content_for?(:title) ? "#{yield(:title)} - Open Food Network".html_safe : 'Welcome to Open Food Network' + %title= content_for?(:title) ? "#{yield(:title)} - #{t(:title)}".html_safe : "#{t(:welcome_to)} #{t(:title)}" - if Rails.env.production? = favicon_link_tag - else diff --git a/app/views/layouts/mailer.html.haml b/app/views/layouts/mailer.html.haml index 39f677b890..147c31dd36 100644 --- a/app/views/layouts/mailer.html.haml +++ b/app/views/layouts/mailer.html.haml @@ -4,7 +4,7 @@ %meta{:content => "width=device-width", :name => "viewport" }/ %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ %title - Open Food Network + = Spree::Config[:site_name] = stylesheet_link_tag 'mail/all' %body{:bgcolor => "#FFFFFF" } %table.head-wrap{:bgcolor => "#f2f2f2"} @@ -18,7 +18,7 @@ %img{:src => "#{ asset_path 'logo-color.png' }", :width => "144", :height => "50"}/ %td{:align => "right"} %h6.collapse - Open Food Network + = Spree::Config[:site_name] %td %table.body-wrap @@ -43,9 +43,9 @@ %td{:align => "center"} %p %a{:href => "#{ URI.join(spree.root_url, "Terms-of-service.pdf").to_s }", :target => "_blank"} - Terms of service + = t :terms_of_service | %a{:href => "#{ spree.root_url }"} - Open Food Network + = Spree::Config[:site_name] / | Unsubscribe - %td \ No newline at end of file + %td diff --git a/app/views/layouts/registration.html.haml b/app/views/layouts/registration.html.haml index c0e0c4b7ec..4709393fd0 100644 --- a/app/views/layouts/registration.html.haml +++ b/app/views/layouts/registration.html.haml @@ -3,7 +3,7 @@ %meta{charset: 'utf-8'}/ %meta{name: 'viewport', content: "width=device-width,initial-scale=1.0"}/ - %title= content_for?(:title) ? "#{yield(:title)} - Open Food Network" : 'Welcome to Open Food Network' + %title= content_for?(:title) ? "#{yield(:title)} - #{Spree::Config[:site_name]}" : "#{t(:welcome_to)} #{Spree::Config[:site_name]}" - if Rails.env.production? = favicon_link_tag - else diff --git a/app/views/map/index.html.haml b/app/views/map/index.html.haml index 30df47e28c..a4d012282b 100644 --- a/app/views/map/index.html.haml +++ b/app/views/map/index.html.haml @@ -1,5 +1,5 @@ - content_for(:title) do - Map + = t :label_map = inject_enterprises diff --git a/app/views/modals/_food_hub.html.haml b/app/views/modals/_food_hub.html.haml index ba0864b284..233512b5f0 100644 --- a/app/views/modals/_food_hub.html.haml +++ b/app/views/modals/_food_hub.html.haml @@ -1,8 +1,11 @@ %h2 %i.ofn-i_040-hub> - Food Hubs -%h5 Our food hubs are the point of contact between you and the people who make your food! -%p You can search for a convenient hub by location or name. Some hubs have multiple points where you can pick-up your purchases, and some will also provide delivery options. Each food hub is a sales point with independent business operations and logistics - so variations between hubs are to be expected. -%p You can only shop at one food hub at a time. + = t :modal_hubs +%h5 + = t :modal_hubs_abstract +%p + = t :modal_hubs_content1 +%p + = t :modal_hubs_content2 %a.close-reveal-modal{"ng-click" => "$close()"} %i.ofn-i_009-close diff --git a/app/views/modals/_groups.html.haml b/app/views/modals/_groups.html.haml index 43be03bcc9..4a6f092a03 100644 --- a/app/views/modals/_groups.html.haml +++ b/app/views/modals/_groups.html.haml @@ -1,7 +1,9 @@ %h2 %i.ofn-i_035-groups - Groups / Regions -%p These are the organisations and relationships between hubs which make up the Open Food Network. -%p Some groups are clustered by location or council, others by non-geographic similarities. + = t :modal_groups +%p + = t :modal_groups +%p + = t :modal_groups %a.close-reveal-modal{"ng-click" => "$close()"} - %i.ofn-i_009-close \ No newline at end of file + %i.ofn-i_009-close diff --git a/app/views/modals/_learn_more.html.haml b/app/views/modals/_learn_more.html.haml index 58a1bf260d..3a7330aee3 100644 --- a/app/views/modals/_learn_more.html.haml +++ b/app/views/modals/_learn_more.html.haml @@ -1,10 +1,17 @@ -%h2 How it works -%h5 Shop the Open Food Network -%p Search for a food hub near you to start shopping! You can expand each food hub to see what kinds of goodies are available, and click through to start shopping. (You can only shop one food hub at a time.) -%h5 Pick-ups, delivery & shipping costs -%p Some food hubs deliver to your door, while others require you to pick-up your purchases. You can see which options are available on the homepage, and select which you'd like at the shopping and check-out pages. Delivery will cost more, and pricing differs from hub-to-hub. Each food hub is a sales point with independent business operations and logisitics - so variations between hubs are to be expected. -%h5 Learn more -%p If you want to learn more about the Open Food Network, how it works, and get involved, check out: +%h2 + = t :modal_how +%h5 + = t :modal_how_shop +%p + = t :modal_how_shop_explained +%h5 + = t :modal_how_pickup +%p + = t :modal_how_pickup_explained +%h5 + = t :modal_how +%p + = t :modal_how %a.button.neutral-btn.dark{:href => "http://www.openfoodnetwork.org" , :target => "_blank" } Open Food Network %a.close-reveal-modal{"ng-click" => "$close()"} %i.ofn-i_009-close diff --git a/app/views/modals/_producers.html.haml b/app/views/modals/_producers.html.haml index 069ec9e3b6..6e87e0d5c4 100644 --- a/app/views/modals/_producers.html.haml +++ b/app/views/modals/_producers.html.haml @@ -1,6 +1,7 @@ %h2 %i.ofn-i_036-producers - Producers -%p Our producers make all the delicious food you can shop for on the Open Food Network. + = t :modal_producers +%p + = t :modal_producers_explained %a.close-reveal-modal{"ng-click" => "$close()"} - %i.ofn-i_009-close \ No newline at end of file + %i.ofn-i_009-close diff --git a/app/views/open_food_network/cart/_show.html.haml b/app/views/open_food_network/cart/_show.html.haml index 5a633cf05b..5cebd3f40c 100644 --- a/app/views/open_food_network/cart/_show.html.haml +++ b/app/views/open_food_network/cart/_show.html.haml @@ -1,6 +1,6 @@ / %script = Spree.api_key = raw(try_spree_current_user.try(:spree_api_key).to_s.inspect) -Current cart for: += t :ofn_cart_headline = spree_current_user.andand.email %div{ 'ng-app' => 'store', 'ng-controller' => 'CartCtrl', 'ng-init' => "loadCart(#{spree_current_user.andand.cart.andand.id});" } {{cart}} {{state}} @@ -8,20 +8,27 @@ Current cart for: %br %ul %li(ng-repeat="order in cart.orders") - %strong Distributor: + %strong + = t :ofn_cart_distributor {{order.distributor}} - %strong Order cycle: + %strong + = t :ofn_cart_oc {{order.order_cycle.andand.name}} - %strong From: + %strong + = t :ofn_cart_from {{order.order_cycle.andand.orders_open_at}} - %strong To: + %strong + = t :ofn_cart_to {{order.order_cycle.andand.orders_close_at}} %ul %li(ng-repeat="line_item in order.line_items") - %strong Product: + %strong + = t :ofn_cart_product {{line_item.name}} - %strong Quantity: + %strong + = t :ofn_cart_quatity {{line_item.quantity}} - %button Buy me + %button + = t :ofn_cart_send %br diff --git a/app/views/order_cycles/_choice.html.haml b/app/views/order_cycles/_choice.html.haml index 59effe0d0f..7b1cfeb444 100644 --- a/app/views/order_cycles/_choice.html.haml +++ b/app/views/order_cycles/_choice.html.haml @@ -3,13 +3,16 @@ #distribution-choice - if current_distributor.present? %p - %strong Hub: + %strong + = t :ocs_choice_distributor = current_distributor.name - if current_order_cycle.present? %p - %strong Order Cycle: + %strong + = t :ocs_choice_oc = current_order_cycle.name - if current_distributor.nil? && current_order_cycle.nil? - %p You have not yet picked where you will get your order from. + %p + = t :ocs_choice_text diff --git a/app/views/order_cycles/_orders_closed.html.haml b/app/views/order_cycles/_orders_closed.html.haml index ea3d221622..ae0568ae2d 100644 --- a/app/views/order_cycles/_orders_closed.html.haml +++ b/app/views/order_cycles/_orders_closed.html.haml @@ -1,19 +1,17 @@ .columns.two= image_tag 'pickup.png' .columns.nine - %h2 Orders are currently closed for this hub + %h2 + = t :ocs_closed_headline %p - if most_recently_closed = OrderCycle.most_recently_closed_for(@enterprise) - The last cycle closed - = distance_of_time_in_words_to_now most_recently_closed.orders_close_at - ago. - Please contact your hub directly to see if they accept late orders, or wait until the next cycle opens. + = t :ocs_closed_time, time: distance_of_time_in_words_to_now(most_recently_closed.orders_close_at) + = t :ocs_closed_contact - if next_oc = OrderCycle.first_opening_for(@enterprise) %h4 - The next order cycle opens in - = distance_of_time_in_words_to_now next_oc.orders_open_at + = t :ocs_closed_opens, time: distance_of_time_in_words_to_now(next_oc.orders_open_at) %p - = "Email: #{current_distributor.email}" if current_distributor.email + = t(:ocs_closed_email, email: current_distributor.email) if current_distributor.email %br/ - = "Phone: #{current_distributor.phone}" if current_distributor.phone + = t(:ocs_closed_phone, phone: current_distributor.phone) if current_distributor.phone diff --git a/app/views/order_cycles/_orders_current.html.haml b/app/views/order_cycles/_orders_current.html.haml index a424e8ca6c..185011690d 100644 --- a/app/views/order_cycles/_orders_current.html.haml +++ b/app/views/order_cycles/_orders_current.html.haml @@ -1,10 +1,12 @@ .columns.six - %h1= "Your order will be ready on #{pickup_time}" + %h1 + = t :ocs_pickup_time, pickup_time: pickup_time %i - = link_to 'Change Collection Date', spree.clear_orders_path, :id => 'reset_order_cycle' - (This will reset your cart) + = link_to t(:ocs_change_date), spree.clear_orders_path, :id => 'reset_order_cycle' + = t :ocs_change_date_notice .columns.five .row - %strong ORDERS CLOSE + %strong + = t :ocs_close_time .countdown-panel %h1= distance_of_time_in_words_to_now(current_order_cycle.orders_close_at) diff --git a/app/views/order_cycles/_orders_open.html.haml b/app/views/order_cycles/_orders_open.html.haml index 8647a85d33..66ee9509e6 100644 --- a/app/views/order_cycles/_orders_open.html.haml +++ b/app/views/order_cycles/_orders_open.html.haml @@ -1,10 +1,12 @@ .columns.two= image_tag 'pickup.png' .columns.six - %h2 When do you want your order? - %p No products are displayed until you select a date. + %h2 + = t :ocs_when_headline + %p + = t :ocs_when_text .columns.three = form_for current_order(true), :html => {:id => 'order_cycle_select'} do |f| = f.hidden_field :distributor_id, :value => @enterprise.id .order-cycles - = f.select :order_cycle_id, order_cycle_options, {include_blank: 'Closing On'} - = hidden_field_tag :commit, 'Choose Order Cycle' + = f.select :order_cycle_id, order_cycle_options, {include_blank: t(:ocs_when_closing)} + = hidden_field_tag :commit, t(:ocs_when_choose) diff --git a/app/views/order_cycles/_selection.html.haml b/app/views/order_cycles/_selection.html.haml index fd4b2737e8..949766a162 100644 --- a/app/views/order_cycles/_selection.html.haml +++ b/app/views/order_cycles/_selection.html.haml @@ -11,5 +11,5 @@ = render partial: "order_cycles/orders_open" %p - %strong= link_to "List View", shop_path + %strong= link_to t(:ocs_list), shop_path diff --git a/app/views/producers/_fat.html.haml b/app/views/producers/_fat.html.haml index 6083250780..dedd2d09e1 100644 --- a/app/views/producers/_fat.html.haml +++ b/app/views/producers/_fat.html.haml @@ -3,7 +3,8 @@ .columns.small-12.medium-7.large-7.fat / Will add in long description available once clean up HTML formatting producer.long_description %div{"bo-if" => "producer.description"} - %label About us + %label + = t :producers_about %img.right.show-for-medium-up{"bo-src" => "producer.logo" } %p.text-small{ "bo-text" => "producer.description"} %div.show-for-medium-up{"bo-if" => "producer.description.length==0"} @@ -12,7 +13,8 @@ .columns.small-12.medium-5.large-5.fat %div{"bo-if" => "producer.supplied_taxons"} - %label Shop for + %label + = t :producers_buy %p.trans-sentence %span.fat-taxons{"ng-repeat" => "taxon in producer.supplied_taxons"} %render-svg{path: "{{taxon.icon}}"} @@ -22,10 +24,11 @@   %div{"bo-if" => "producer.email || producer.website || producer.phone"} - %label Contact + %label + = t :producers_contact %p.word-wrap{"bo-if" => "producer.phone"} - Call + = t :producers_contact_phone %span{"bo-text" => "producer.phone"} %p.word-wrap{"bo-if" => "producer.email"} @@ -37,7 +40,8 @@ %span{"bo-bind" => "producer.website | stripUrl"} %div{"bo-if" => "producer.twitter || producer.facebook || producer.linkedin || producer.instagram"} - %label Follow + %label + = t :producers_social .follow-icons{bindonce: true} %span{"bo-if" => "producer.twitter"} %a{"bo-href-i" => "http://twitter.com/{{producer.twitter}}", target: "_blank"} @@ -61,9 +65,9 @@ .columns.small-12.fat %div{"bo-if" => "producer.name"} %label - Shop for + = t :producers_buy %span.turquoise{"bo-text" => "producer.name"} - products at: + = t :producers_at %div.show-for-medium-up{"bo-if" => "!producer.name"}   .row.cta-container diff --git a/app/views/producers/_filters.html.haml b/app/views/producers/_filters.html.haml index 103b31d531..91aa3335a5 100644 --- a/app/views/producers/_filters.html.haml +++ b/app/views/producers/_filters.html.haml @@ -8,7 +8,8 @@ .row.filter-box .small-12.columns %h5.tdhead - .light Filter by - Type + .light + = t :producers_filter + = t :producers_filter %filter-selector.small-block-grid-2.medium-block-grid-4.large-block-grid-6{objects: "Enterprises.producers | searchEnterprises:query | taxonsOf", "active-selectors" => "activeTaxons"} = render partial: 'shared/components/filter_box' diff --git a/app/views/producers/index.html.haml b/app/views/producers/index.html.haml index cb9c3d3826..e842568cb3 100644 --- a/app/views/producers/index.html.haml +++ b/app/views/producers/index.html.haml @@ -1,12 +1,13 @@ - content_for(:title) do - Producers + = t :producers_title = inject_enterprises .producers{"ng-controller" => "EnterprisesCtrl", "ng-cloak" => true} .row .small-12.columns.pad-top - %h1 Find local producers + %h1 + = t :producers_headline = render partial: "shared/components/enterprise_search" = render partial: "producers/filters" diff --git a/app/views/producers/signup.html.haml b/app/views/producers/signup.html.haml index 169d4b179f..0afead9415 100644 --- a/app/views/producers/signup.html.haml +++ b/app/views/producers/signup.html.haml @@ -1,21 +1,24 @@ - content_for(:title) do - Sign up as a producer + = t :producers_signup_title #panes #producer-signup.pane .row.header .small-12.medium-12.columns.text-center - %h2 Food producers, empowered. + %h2 + = t :producers_signup_headline .row.content .small-12.medium-6.medium-offset-3.columns.text-center - %p.text-big Sell your food and tell your stories to diverse new markets. Save time and money on every overhead. We support innovation without the risk. We've levelled the playing field. + %p.text-big + = t :producers_signup_motivation %br %a.button.transparent{href: "/register"} - Join now + = t :producers_signup_send .pane .row .small-12.medium-10.medium-offset-1.columns.text-center - %h2 Enterprise Accounts + %h2 + = t :producers_signup_enterprise -# %p.text-big -# If there is a time-sensitive offer you can write it here, e.g. -# Sign up before 30th June for an extra month free! @@ -25,22 +28,25 @@ #producer-case-studies .row .small-12.medium-10.medium-offset-1.columns - %h2.text-center Stories from our producers. + %h2.text-center + = t :producers_signup_studies %br = ContentConfig.producer_signup_case_studies_html.html_safe .pane#cta .row .small-12.medium-6.medium-offset-3.columns.text-center - %h2 Join now! + %h2 + = t :producers_signup_cta_headline %p.text-big Start with a free profile, and expand when you're ready! %a.button.transparent{href: "/register"} - Join now + = t :producers_signup_cta_action #producer-details.pane.footer-pad .row .small-12.medium-10.medium-offset-1.columns - %h2.text-center Here's the detail. + %h2.text-center + = t :producers_signup_detail = ContentConfig.producer_signup_detail_html.html_safe = render partial: "shared/footer" diff --git a/app/views/products/_list.html.haml b/app/views/products/_list.html.haml index 3770387175..d9fa7cbfbd 100644 --- a/app/views/products/_list.html.haml +++ b/app/views/products/_list.html.haml @@ -1,11 +1,17 @@ %table#product-list %thead - %th Item - %th Description - %th Variant - %th Quantity - %th Available? - %th Price + %th + = t :products_item + %th + = t :products_description + %th + = t :products_variant + %th + = t :products_quantity + %th + = t :products_available + %th + = t :products_price - list.each do |product| %tr diff --git a/app/views/registration/index.html.haml b/app/views/registration/index.html.haml index a05c383395..fdeef18534 100644 --- a/app/views/registration/index.html.haml +++ b/app/views/registration/index.html.haml @@ -1,5 +1,5 @@ - content_for(:title) do - Register + = t :register_title = inject_spree_api_key = inject_available_countries diff --git a/app/views/shared/_case_study.html.haml b/app/views/shared/_case_study.html.haml index 12e59c6b6c..67c389301e 100644 --- a/app/views/shared/_case_study.html.haml +++ b/app/views/shared/_case_study.html.haml @@ -3,4 +3,5 @@ %h4= title %p.text-small= description %a{href: link, target: "_blank"} - %strong More + %strong + = t :label_more diff --git a/app/views/shared/_footer.html.haml b/app/views/shared/_footer.html.haml index 7450966e5f..c45f60ba28 100644 --- a/app/views/shared/_footer.html.haml +++ b/app/views/shared/_footer.html.haml @@ -9,30 +9,41 @@ .alert-box %a.big-alert{href: "http://www.openfoodnetwork.org", target: "_blank"} %h6 - Interested in selling food on the Open Food Network?   - %strong Start here + = t :alert_selling_on_ofn +   + %strong + = t :alert_start_here %i.ofn-i_054-point-right .row .small-12.medium-4.medium-offset-2.columns.text-center - %h6 OFN Global + %h6 + = t :footer_global_headline %p - %a{href: "http://www.openfoodnetwork.org", target: "_blank"} Home + %a{href: "http://www.openfoodnetwork.org", target: "_blank"} + = t :footer_global_home %span | - %a{href: "http://www.openfoodnetwork.org/news/", target: "_blank"} News + %a{href: "http://www.openfoodnetwork.org/news/", target: "_blank"} + = t :footer_global_news %span | - %a{href: "http://www.openfoodnetwork.org/about/history-team/", target: "_blank"} About + %a{href: "http://www.openfoodnetwork.org/about/history-team/", target: "_blank"} + = t :footer_global_about %span | - %a{href: "http://www.openfoodnetwork.org/contact/", target: "_blank"} Contact + %a{href: "http://www.openfoodnetwork.org/contact/", target: "_blank"} + = t :footer_global_contact .small-12.medium-4.columns.text-center - %h6 OFN Sites + %h6 + = t :footer_sites_headline %p - %a{href: "http://dev.openfoodnetwork.org", target: "_blank"} Developer + %a{href: "http://dev.openfoodnetwork.org", target: "_blank"} + = t :footer_sites_developer %span | - %a{href: "http://community.openfoodnetwork.org", target: "_blank"} Community + %a{href: "http://community.openfoodnetwork.org", target: "_blank"} + = t :footer_sites_community %span | - %a{href: "http://www.openfoodnetwork.org/platform/user-guide/", target: "_blank"} User Guide + %a{href: "http://www.openfoodnetwork.org/platform/user-guide/", target: "_blank"} + = t :footer_sites_userguide .medium-2.columns.text-center / Placeholder @@ -43,8 +54,10 @@ %p.secure-icon %i.ofn-i_017-locked .small-12.medium-6.columns.text-center - %p.text-big.secure-text Secure and trusted. - %p.secure-text Open Food Network uses SSL encryption (2048 bit RSA) everywhere to keep your shopping and payment information private. Our servers do not store your credit card details and payments are processed by PCI-compliant services. + %p.text-big.secure-text + = t :footer_secure + %p.secure-text + = t :footer_secure_text .small-12.medium-2.columns .row @@ -55,7 +68,8 @@ .row .small-6.medium-3.medium-offset-2.columns.text-left // This is the instance-managed set of links: - %h4 Keep in touch + %h4 + = t :footer_contact_headline %p.social-icons - if ContentConfig.footer_facebook_url.present? %a{href: ContentConfig.footer_facebook_url} @@ -77,33 +91,45 @@ %i.ofn-i_045-pintrest - if ContentConfig.footer_email.present? %p - %a{href: ContentConfig.footer_email.reverse, mailto: true, target: '_blank'} Email us + %a{href: ContentConfig.footer_email.reverse, mailto: true, target: '_blank'} + = t :footer_contact_email = render_markdown(ContentConfig.footer_links_md).html_safe .small-6.medium-3.columns.text-left - %h4 Navigate + %h4 + = t :footer_nav_headline %p - %a{href: "/shops"} Shops + %a{href: "/shops"} + = t :label_shops %p - %a{href: "/map"} Map + %a{href: "/map"} + = t :label_map %p - %a{href: "/producers"} Producers + %a{href: "/producers"} + = t :label_producers %p - %a{href: "/groups"} Groups + %a{href: "/groups"} + = t :label_groups %p - %a{href: ContentConfig.footer_about_url} About + %a{href: ContentConfig.footer_about_url} + = t :label_about .small-12.medium-2.columns.text-left - %h4 Join us + %h4 + = t :footer_join_headline %p - %a{href: "/producers/signup"} Producers sign-up + %a{href: "/producers/signup"} + = t :footer_join_producers %p - %a{href: "/shops/signup"} Hubs sign-up + %a{href: "/shops/signup"} + = t :footer_join_hubs %p - %a{href: "/groups/signup"} Groups sign-up + %a{href: "/groups/signup"} + = t :footer_join_groups %p - %a{href: "http://www.openfoodnetwork.org/platform/food-system-partners/", target: "_blank"} Food systems partners + %a{href: "http://www.openfoodnetwork.org/platform/food-system-partners/", target: "_blank"} + = t :footer_join_partners .medium-2.columns.text-center / Placeholder @@ -119,18 +145,21 @@ %img{src: ContentConfig.footer_logo.url, width: "220"} .small-12.medium-5.columns.text-left %p.text-small - Read our - %a{href: ContentConfig.footer_tos_url} Terms & conditions + = t :footer_legal_call + %a{href: ContentConfig.footer_tos_url} + = t :footer_legal_tos | - Find us on + = t :footer_legal_visit %a{href:"https://github.com/openfoodfoundation/openfoodnetwork", target: "_blank"} Github %p.text-small - Open Food Network is a free and open source software platform. Our content is licensed with + = t :footer_legal_text = succeed ',' do - %a{href:"https://creativecommons.org/licenses/by-sa/3.0/", target: "_blank" } CC BY-SA 3.0 - and our code with + %a{href:"https://creativecommons.org/licenses/by-sa/3.0/", target: "_blank" } + = t :footer_legal_license_content + = t :footer_legal_text = succeed '.' do - %a{href:"https://tldrlegal.com/license/gnu-affero-general-public-license-v3-(agpl-3.0)", target: "_blank" } AGPL 3 + %a{href:"https://tldrlegal.com/license/gnu-affero-general-public-license-v3-(agpl-3.0)", target: "_blank" } + = t :footer_legal_license_code .medium-2.columns.text-center / Placeholder diff --git a/app/views/shared/_ie_warning.html.haml b/app/views/shared/_ie_warning.html.haml index b5cd980ad6..2239fa7450 100644 --- a/app/views/shared/_ie_warning.html.haml +++ b/app/views/shared/_ie_warning.html.haml @@ -3,23 +3,29 @@ .small-4.large-2.columns %i.ofn-i_012-warning .small-8.large-10.columns - %h3 Your browser is out of date :-( - %p For the best Open Food Network experience, we strongly recommend upgrading your browser: + %h3 + = t :ie_warning_headline + %p + = t :ie_warning_text .row .small-4.columns.browserbtn %a.browserlogo{href: "https://www.google.com/intl/en_au/chrome/browser/", target: "_blank"} %img{src: "assets/browser-logos/chrome.png"} - %a{href: "https://www.google.com/intl/en_au/chrome/browser/", target: "_blank"} Download Chrome + %a{href: "https://www.google.com/intl/en_au/chrome/browser/", target: "_blank"} + = t :ie_warning_chrome .small-4.columns.browserbtn %a.browserlogo{href: "http://www.mozilla.org/en-US/firefox/new/", target: "_blank"} %img{src: "assets/browser-logos/firefox.png"} - %a{href: "http://www.mozilla.org/en-US/firefox/new/", target: "_blank"} Download Firefox + %a{href: "http://www.mozilla.org/en-US/firefox/new/", target: "_blank"} + = t :ie_warning_firefox .small-4.columns.browserbtn %a.browserlogo{href: "http://windows.microsoft.com/en-AU/internet-explorer/download-ie", target: "_blank"} %img{src: "assets/browser-logos/internet-explorer.png"} - %a{href: "http://windows.microsoft.com/en-AU/internet-explorer/download-ie", target: "_blank"} Upgrade Internet Explorer + %a{href: "http://windows.microsoft.com/en-AU/internet-explorer/download-ie", target: "_blank"} + = t :ie_warning_ie .row.ie-msg .small-12.large-12.columns .text-center - %em Can't upgrade your browser? Try Open Food Network on your smartphone :-) + %em + = t :ie_warning_other %a#closeie.close{href: "#"} × diff --git a/app/views/shared/_login.html.haml b/app/views/shared/_login.html.haml index c46d0f424f..5c4d579944 100644 --- a/app/views/shared/_login.html.haml +++ b/app/views/shared/_login.html.haml @@ -1,12 +1,12 @@ - if spree_current_user.nil? - %li#login-link= link_to "Login", "#login", id: "sidebarLoginButton", class: "sidebar-button" + %li#login-link= link_to t(:label_login), "#login", id: "sidebarLoginButton", class: "sidebar-button" %li#login-name.hide %li.divider - %li#sign-up-link= link_to "Sign Up", "#signup", id: "sidebarSignUpButton", class: "sidebar-button" + %li#sign-up-link= link_to t(:label_signup), "#signup", id: "sidebarSignUpButton", class: "sidebar-button" %li#sign-out-link.hide= link_to "Sign Out", "/logout" - else - %li#login-link.hide= link_to "Login", "#sidebar", id: "sidebarLoginButton", class: "sidebar-button" + %li#login-link.hide= link_to t(:label_login), "#sidebar", id: "sidebarLoginButton", class: "sidebar-button" %li#login-name= link_to "#{spree_current_user.email}", "#" %li.divider - %li#sign-up-link.hide= link_to "Sign Up", "#" - %li#sign-out-link= link_to "Sign Out", "/logout" + %li#sign-up-link.hide= link_to t(:label_signup), "#" + %li#sign-out-link= link_to t(:label_logout), "/logout" diff --git a/app/views/shared/_signed_in.html.haml b/app/views/shared/_signed_in.html.haml index 69f0e61dbd..c3a1bd8cc8 100644 --- a/app/views/shared/_signed_in.html.haml +++ b/app/views/shared/_signed_in.html.haml @@ -9,17 +9,15 @@ %li %a{href: spree.admin_path, target:'_blank'} %i.ofn-i_021-tools - Administration + = t 'label_administration' %li %a{href: spree.account_path} %i.ofn-i_015-user - Account + = t 'label_account' = "(" + spree_current_user.email + ")" %li - %a{title: 'Log Out', href:'/logout' } + %a{title: t('label_logout'), href:'/logout' } %i.ofn-i_018-unlocked - Log out - - \ No newline at end of file + = t 'label_logout' diff --git a/app/views/shared/_signed_in_offcanvas.html.haml b/app/views/shared/_signed_in_offcanvas.html.haml index 97b3e1ebca..839d1c08fe 100644 --- a/app/views/shared/_signed_in_offcanvas.html.haml +++ b/app/views/shared/_signed_in_offcanvas.html.haml @@ -2,15 +2,14 @@ %li %a{href: spree.admin_path, target:'_blank'} %i.ofn-i_021-tools - Admin + = t 'label_admin' %li %a{href: spree.account_path} %i.ofn-i_015-user - Account - / = spree_current_user.email + = t 'label_account' %li - %a{title: 'Log Out', href:'/logout' } + %a{title: t('label_logout'), href:'/logout' } %i.ofn-i_018-unlocked - Log out \ No newline at end of file + = t 'label_logout' diff --git a/app/views/shared/_signed_out.html.haml b/app/views/shared/_signed_out.html.haml index 237baa6bd8..1a7cbcc920 100644 --- a/app/views/shared/_signed_out.html.haml +++ b/app/views/shared/_signed_out.html.haml @@ -1,5 +1,5 @@ %li#login-link{"ng-controller" => "AuthenticationCtrl"} %a{"ng-click" => "open()"} %i.ofn-i_017-locked - %span Log in - + %span + = t 'label_login' diff --git a/app/views/shared/components/_enterprise_no_results.html.haml b/app/views/shared/components/_enterprise_no_results.html.haml index 1c8af802a2..686366fc0d 100644 --- a/app/views/shared/components/_enterprise_no_results.html.haml +++ b/app/views/shared/components/_enterprise_no_results.html.haml @@ -1,6 +1,4 @@ - enterprises ||= 'filteredEnterprises' %producer.row{"ng-show" => "#{enterprises}.length == 0"} %p.no-results - Sorry, no results found for - %strong {{query}}. - Try another search? + = t :search_no_results_html, query: "{{query}}" diff --git a/app/views/shared/components/_filter_box.html.haml b/app/views/shared/components/_filter_box.html.haml index efa8b582f2..e36d754fbd 100644 --- a/app/views/shared/components/_filter_box.html.haml +++ b/app/views/shared/components/_filter_box.html.haml @@ -2,4 +2,4 @@ .small-12.columns %a.button.secondary.small.expand{"ng-click" => "clearAll()"} %i.ofn-i_009-close - Clear all filters + = t :components_filters_clearfilters diff --git a/app/views/shared/components/_filter_box_shopfront.html.haml b/app/views/shared/components/_filter_box_shopfront.html.haml index 7a2aa23296..faf5930019 100644 --- a/app/views/shared/components/_filter_box_shopfront.html.haml +++ b/app/views/shared/components/_filter_box_shopfront.html.haml @@ -1,4 +1,4 @@ %span.animate-show{"ng-show" => "filtersActive && totalActive() > 0"} %a.button.secondary.tiny{"ng-click" => "clearAll()"} %i.ofn-i_009-close - Clear all filters + = t :components_filters_clearfilters diff --git a/app/views/shared/components/_filter_controls.html.haml b/app/views/shared/components/_filter_controls.html.haml index e15d2de48d..813c4920b6 100644 --- a/app/views/shared/components/_filter_controls.html.haml +++ b/app/views/shared/components/_filter_controls.html.haml @@ -6,4 +6,4 @@ %i.ofn-i_006-caret-up{"ng-show" => "filtersActive"} %a.button.secondary.tiny.filterbtn.disabled{"ng-show" => "FilterSelectorsService.selectors.length == 0"} - No filters + = t :components_filters_nofilters diff --git a/app/views/shared/components/_filter_controls_shopfront.html.haml b/app/views/shared/components/_filter_controls_shopfront.html.haml index b89d55c452..4bf7766a5c 100644 --- a/app/views/shared/components/_filter_controls_shopfront.html.haml +++ b/app/views/shared/components/_filter_controls_shopfront.html.haml @@ -5,4 +5,4 @@ %i.ofn-i_006-caret-up{"ng-show" => "filtersActive"} %a.button.secondary.tiny.filterbtn.disabled{"ng-show" => "FilterSelectorsService.selectors.length == 0"} - No filters + = t :components_filters_nofilters diff --git a/app/views/shared/components/_show_profiles.html.haml b/app/views/shared/components/_show_profiles.html.haml index 638cc47c27..84a55ae405 100644 --- a/app/views/shared/components/_show_profiles.html.haml +++ b/app/views/shared/components/_show_profiles.html.haml @@ -1,7 +1,7 @@ .small-12.medium-6.columns.text-right .profile-checkbox - %button.button.secondary.tiny.help-btn.ng-scope{:popover => "Profiles do not have a shopfront on the Open Food Network, but may have their own physical or online shop elsewhere", "popover-placement" => "left"}>< + %button.button.secondary.tiny.help-btn.ng-scope{:popover => t(:components_profiles_popover, sitename: Spree::Config[:site_name]), "popover-placement" => "left"}>< %i.ofn-i_013-help %label %input{"ng-model" => "show_profiles", type: "checkbox", name: "profile"} - Show profiles + = t :components_profiles_show diff --git a/app/views/shared/mailers/_signoff.html.haml b/app/views/shared/mailers/_signoff.html.haml index 6343ac85ae..7b10fffe97 100644 --- a/app/views/shared/mailers/_signoff.html.haml +++ b/app/views/shared/mailers/_signoff.html.haml @@ -1,8 +1,8 @@ %p   %p - Cheers, + = t :email_signoff %br - = "#{ Spree::Config[:site_name] } Team" + = t :email_signature, sitename: Spree::Config[:site_name] -%p   \ No newline at end of file +%p   diff --git a/app/views/shared/mailers/_social_and_contact.html.haml b/app/views/shared/mailers/_social_and_contact.html.haml index 81244778d6..a0f8e125e5 100644 --- a/app/views/shared/mailers/_social_and_contact.html.haml +++ b/app/views/shared/mailers/_social_and_contact.html.haml @@ -6,7 +6,7 @@ %tr %td %h5 - Connect with Us: + = t :email_social %p %a.soc-btn.fb{:href => "https://www.facebook.com/OpenFoodNet", :target => "_blank"} Facebook @@ -18,7 +18,7 @@ %tr %td %h5 - Email us: + = t :email_contact %p %strong %a{:href => "mailto:hello@openfoodnetwork.org"} diff --git a/app/views/shared/menu/_alert.html.haml b/app/views/shared/menu/_alert.html.haml index 3ce7da91f1..60b1e9f18c 100644 --- a/app/views/shared/menu/_alert.html.haml +++ b/app/views/shared/menu/_alert.html.haml @@ -2,8 +2,9 @@ .alert-box %a.alert-cta{href: "http://www.openfoodnetwork.org", target: "_blank"} %h6 - Interested in selling food on the Open Food Network?   + = t 'alert_selling_on_ofn' +   %strong - Start here + = t 'alert_start_here' %i.ofn-i_054-point-right %a.close{ ng: { click: "close()" } } × diff --git a/app/views/shared/menu/_cart.html.haml b/app/views/shared/menu/_cart.html.haml index f8287c8f61..c28c1e60fa 100644 --- a/app/views/shared/menu/_cart.html.haml +++ b/app/views/shared/menu/_cart.html.haml @@ -4,12 +4,13 @@ %i.ofn-i_027-shopping-cart %span {{ Cart.total_item_count() }} - items + = t 'items' .joyride-tip-guide{"ng-class" => "{ in: open }", "ng-show" => "open"} %span.joyride-nub.top .joyride-content-wrapper - %h5 Your shopping cart + %h5 + = t 'cart_headline' %table %tr.product-cart{"ng-repeat" => "line_item in Cart.line_items_present()", "ng-controller" => "LineItemCtrl", "id" => "cart-variant-{{ line_item.variant.id }}"} @@ -32,11 +33,14 @@ %table{"ng-show" => "Cart.line_items_present().length > 0"} %tr.total-cart %td - %em Total: + %em + = t 'total' + \: %td.text-right %strong {{ Cart.total() | localizeCurrency }} .buttons.text-right %a.button.secondary.tiny.add_to_cart{ href: cart_path, type: :submit, "ng-disabled" => "Cart.dirty || Cart.empty()", "ng-class" => "{ dirty: Cart.dirty }" } - {{ Cart.dirty ? 'Updating cart...' : (Cart.empty() ? 'Cart empty' : 'Edit your cart' ) }} - %a.button.primary.tiny{href: checkout_path, "ng-disabled" => "Cart.dirty || Cart.empty()"} Checkout now + = "{{ Cart.dirty ? '#{t(:cart_updating)}' : (Cart.empty() ? '#{t(:cart_empty)}' : '#{t(:cart_edit)}' ) }}" + %a.button.primary.tiny{href: checkout_path, "ng-disabled" => "Cart.dirty || Cart.empty()"} + = t 'checkout' diff --git a/app/views/shared/menu/_large_menu.html.haml b/app/views/shared/menu/_large_menu.html.haml index 4f71e1c93e..05209dff75 100644 --- a/app/views/shared/menu/_large_menu.html.haml +++ b/app/views/shared/menu/_large_menu.html.haml @@ -7,19 +7,24 @@ %ul.center %li %a{href: main_app.shops_path} - %span.nav-primary Shops + %span.nav-primary + = t 'label_shops' %li %a{href: main_app.map_path} - %span.nav-primary Map + %span.nav-primary + = t 'label_map' %li %a{href: main_app.producers_path} - %span.nav-primary Producers + %span.nav-primary + = t 'label_producers' %li %a{href: main_app.groups_path} - %span.nav-primary Groups + %span.nav-primary + = t 'label_groups' %li %a{href: ContentConfig.footer_about_url} - %span.nav-primary About + %span.nav-primary + = t 'label_about' %ul.right - if spree_current_user.nil? = render 'shared/signed_out' @@ -27,7 +32,9 @@ = render 'shared/signed_in' %li.current_hub{"ng-controller" => "CurrentHubCtrl", "ng-show" => "CurrentHub.hub.id", "ng-cloak" => true} %a{href: main_app.shop_path} - %em Shopping @ + %em + = t 'label_shopping' + @ %span.nav-primary.nav-branded {{ CurrentHub.hub.name | truncate:25 }} %li.cart{"ng-cloak" => true} = render partial: "shared/menu/cart" diff --git a/app/views/shared/menu/_mobile_menu.html.haml b/app/views/shared/menu/_mobile_menu.html.haml index d43c95ca46..71fd8ea86f 100644 --- a/app/views/shared/menu/_mobile_menu.html.haml +++ b/app/views/shared/menu/_mobile_menu.html.haml @@ -24,32 +24,32 @@ %a{"ofn-scroll-to" => "hubs"} %span.nav-primary %i.ofn-i_019-map-pin - Shops + = t 'label_shops' - else %a{href: main_app.shops_path} %span.nav-primary %i.ofn-i_019-map-pin - Shops + = t 'label_shops' %li.li-menu %a{href: main_app.map_path} %span.nav-primary %i.ofn-i_037-map - Map + = t 'label_map' %li.li-menu %a{href: main_app.producers_path} %span.nav-primary %i.ofn-i_036-producers - Producers + = t 'label_producers' %li.li-menu %a{href: main_app.groups_path} %span.nav-primary %i.ofn-i_035-groups - Groups + = t 'label_groups' %li.li-menu %a{href: ContentConfig.footer_about_url} %span.nav-primary %i.ofn-i_013-help - About + = t 'label_about' %li - if spree_current_user.nil? diff --git a/app/views/shared/unauthorized.html.haml b/app/views/shared/unauthorized.html.haml index fcf3f3bf27..988fc5e369 100644 --- a/app/views/shared/unauthorized.html.haml +++ b/app/views/shared/unauthorized.html.haml @@ -1 +1 @@ -Unauthorized += t :unauthorized diff --git a/app/views/shop/products/_form.html.haml b/app/views/shop/products/_form.html.haml index 527ecbdd94..e6b0035e4c 100644 --- a/app/views/shop/products/_form.html.haml +++ b/app/views/shop/products/_form.html.haml @@ -7,22 +7,22 @@ .small-12.columns .alert-box.search-alert.ng-scope %a.right{"ng-click" => "clearAll()"} - Clear all + = t :products_clear_all %i.ofn-i_009-close %span.filter-label - Showing: + = t :products_showing %span.applied-properties {{ appliedPropertiesList() }} %span.applied-taxons {{ appliedTaxonsList() }} %span{ ng: { hide: "!query"} } %span{ "ng-show" => "appliedPropertiesList() || appliedTaxonsList()" } - with + = t :products_with %span.applied-search "{{ query }}" .row .small-12.medium-6.large-5.columns %input#search.text{"ng-model" => "query", - placeholder: "Search by product or producer", + placeholder: t(:products_search), "ng-debounce" => "100", "ofn-disable-enter" => true} @@ -39,7 +39,7 @@ %product{"ng-show" => "Products.loading"} .row.summary .small-12.columns.text-center - Loading products... + = t :products_loading .row .small-12.columns.text-center %img.spinner{ src: "/assets/spinning-circles.svg" } @@ -48,11 +48,9 @@ .row.summary .small-12.columns %p.no-results - Sorry, no results found for - %strong {{query}}. - Try another search? + = t :search_no_results_html, query: "{{query}}" .row .small-12.columns %form{action: cart_path} %i.ofn-i_011-spinner.cart-spinner{"ng-show" => "Cart.dirty"} - %input.small.button.primary.right.add_to_cart{type: :submit, value: "{{ Cart.dirty ? 'Updating cart...' : (Cart.empty() ? 'Cart empty' : 'Edit your cart' ) }}", "ng-disabled" => "Cart.dirty || Cart.empty()", "ng-class" => "{ dirty: Cart.dirty }" } + %input.small.button.primary.right.add_to_cart{type: :submit, value: "{{ Cart.dirty ? '#{t(:products_updating_cart)}' : (Cart.empty() ? '#{t(:products_cart_empty)}' : '#{t(:products_edit_cart)}' ) }}", "ng-disabled" => "Cart.dirty || Cart.empty()", "ng-class" => "{ dirty: Cart.dirty }" } diff --git a/app/views/shop/products/_summary.html.haml b/app/views/shop/products/_summary.html.haml index dec398f80f..6d36ac81ce 100644 --- a/app/views/shop/products/_summary.html.haml +++ b/app/views/shop/products/_summary.html.haml @@ -10,7 +10,8 @@ %span{"bo-text" => "product.name"} %i.ofn-i_057-expand %small - %em from + %em + = t :products_from %span %enterprise-modal %i.ofn-i_036-producers{"bo-text" => "enterprise.name"} diff --git a/app/views/shopping_shared/_contact.html.haml b/app/views/shopping_shared/_contact.html.haml index 6069d453a2..ac7783fda8 100644 --- a/app/views/shopping_shared/_contact.html.haml +++ b/app/views/shopping_shared/_contact.html.haml @@ -4,7 +4,8 @@ .small-12.large-4.columns - if current_distributor.address.address1 || current_distributor.address.address2 || current_distributor.address.city || current_distributor.address.state || current_distributor.address.zipcode %div.center - .header Address + .header + = t :shopping_contact_address %strong=current_distributor.name %p = current_distributor.address.address1 @@ -19,7 +20,8 @@ .small-12.large-4.columns - if current_distributor.website || current_distributor.email %div.center - .header Contact + .header + = t :shopping_contact_contact %p - unless current_distributor.website.blank? %a{href: "http://#{current_distributor.website}", target: "_blank" } @@ -33,7 +35,8 @@ .small-12.large-4.columns - if current_distributor.twitter.present? || current_distributor.facebook.present? || current_distributor.linkedin.present? || current_distributor.instagram.present? %div.center - .header Follow + .header + = t :shopping_contact_social %div.follow-icons - unless current_distributor.twitter.blank? %span diff --git a/app/views/shopping_shared/_groups.html.haml b/app/views/shopping_shared/_groups.html.haml index d94d61359c..6278f44c77 100644 --- a/app/views/shopping_shared/_groups.html.haml +++ b/app/views/shopping_shared/_groups.html.haml @@ -5,7 +5,7 @@ - if current_distributor.groups.length > 0 %h5 =current_distributor.name - is part of: + = t :shopping_groups_part_of %ul.bullet-list - for group in current_distributor.groups %li diff --git a/app/views/shopping_shared/_last_order_cycle.html.haml b/app/views/shopping_shared/_last_order_cycle.html.haml index 353529e60a..ca474fadd6 100644 --- a/app/views/shopping_shared/_last_order_cycle.html.haml +++ b/app/views/shopping_shared/_last_order_cycle.html.haml @@ -1,4 +1,2 @@ - if most_recently_closed = OrderCycle.most_recently_closed_for(@distributor) - The last cycle closed - = distance_of_time_in_words_to_now most_recently_closed.orders_close_at - ago + = t :shopping_oc_last_closed, distance_of_time: distance_of_time_in_words_to_now(most_recently_closed.orders_close_at) diff --git a/app/views/shopping_shared/_next_order_cycle.html.haml b/app/views/shopping_shared/_next_order_cycle.html.haml index f4b3e5172f..04f63fdcad 100644 --- a/app/views/shopping_shared/_next_order_cycle.html.haml +++ b/app/views/shopping_shared/_next_order_cycle.html.haml @@ -1,3 +1,2 @@ - if next_oc = OrderCycle.first_opening_for(@distributor) - The next cycle opens in - = distance_of_time_in_words_to_now next_oc.orders_open_at + = t :shopping_oc_next_open, distance_of_time: distance_of_time_in_words_to_now(next_oc.orders_open_at) diff --git a/app/views/shopping_shared/_order_cycles.html.haml b/app/views/shopping_shared/_order_cycles.html.haml index cfc77091d3..cd5ead30f3 100644 --- a/app/views/shopping_shared/_order_cycles.html.haml +++ b/app/views/shopping_shared/_order_cycles.html.haml @@ -5,8 +5,9 @@ - if @order_cycles and @order_cycles.empty? %h4.text-right %i.ofn-i_032-closed-sign - Orders are closed - %p.text-right Please wait until the next cycle opens (or contact us directly to see if we can accept any late orders) + = t :shopping_oc_closed + %p.text-right + = t :shopping_oc_closed_description .text-right %small %em diff --git a/app/views/shopping_shared/_producers.html.haml b/app/views/shopping_shared/_producers.html.haml index d1ece47329..3c9e9982db 100644 --- a/app/views/shopping_shared/_producers.html.haml +++ b/app/views/shopping_shared/_producers.html.haml @@ -2,7 +2,8 @@ .panel .row .small-12.columns - %h5 {{CurrentHub.hub.name}}'s producers: + %h5 + = t :shopping_producers_of_hub, hub: '{{CurrentHub.hub.name}}' %ul.small-block-grid-2.large-block-grid-4 %li{"ng-repeat" => "enterprise in CurrentHub.hub.producers"} %enterprise-modal diff --git a/app/views/shopping_shared/_tabs.html.haml b/app/views/shopping_shared/_tabs.html.haml index 48c0a1d7b5..8d0d9e021d 100644 --- a/app/views/shopping_shared/_tabs.html.haml +++ b/app/views/shopping_shared/_tabs.html.haml @@ -2,10 +2,10 @@ .row %tabset -# Build all tabs. - - for name, heading_cols in { about: ["About #{current_distributor.name}", 6], - producers: ["Producers",2], - contact: ["Contact",2], - groups: ["Groups",2]} + - for name, heading_cols in { about: [t(:shopping_tabs_about, distributor: current_distributor.name), 6], + producers: [t(:label_producers),2], + contact: [t(:shopping_tabs_contact),2], + groups: [t(:label_groups),2]} -# tabs take tab path in 'active' and 'select' functions defined in TabsCtrl. - heading, cols = heading_cols %tab.columns{heading: heading, diff --git a/app/views/shops/index.html.haml b/app/views/shops/index.html.haml index 40a42da1ea..1b3cf547a8 100644 --- a/app/views/shops/index.html.haml +++ b/app/views/shops/index.html.haml @@ -1,12 +1,14 @@ - content_for(:title) do - Shops + = t :shops_title #panes #shops.pane .row .small-12.medium-6.medium-offset-3.columns.text-center - %h2 Shopping, transformed. - %p.text-big Food grows in cycles, farmers harvest in cycles, and we order food in cycles. If you find an order cycle closed, check back soon. + %h2 + = t :shops_headline + %p.text-big + = t :shops_text = render partial: "home/hubs" = render partial: "shared/footer" diff --git a/app/views/shops/signup.html.haml b/app/views/shops/signup.html.haml index a04f7d82e2..fd8dc3a0da 100644 --- a/app/views/shops/signup.html.haml +++ b/app/views/shops/signup.html.haml @@ -1,21 +1,24 @@ - content_for(:title) do - Sign up as a hub + = t :shops_signup_title #panes #shops-signup.pane .row.header .small-12.medium-12.columns.text-center - %h2 Food hubs, unlimited. + %h2 + = t :shops_signup_headline .row.content .small-12.medium-6.medium-offset-3.columns.text-center - %p.text-big Whatever your model, we support you. However you change, we're with you. We're non-profit, independent, and open-sourced. We're the software partners you've dreamed of. + %p.text-big + = t :shops_signup_motivation %br %a.button.transparent{href: "/register"} - Join now + = t :shops_signup_action .pane .row .small-12.medium-10.medium-offset-1.columns.text-center - %h2 Enterprise Accounts + %h2 + = t :shops_signup_pricing -# %p.text-big -# If there is a time-sensitive offer you can write it here, e.g. -# Sign up before 30th June for an extra month free! @@ -25,23 +28,27 @@ #shops-case-studies .row .small-12.medium-10.medium-offset-1.columns - %h2.text-center Stories from our hubs. + %h2.text-center + = t :shops_signup_stories %br = ContentConfig.hub_signup_case_studies_html.html_safe .pane#cta .row .small-12.medium-6.medium-offset-3.columns.text-center - %h2 We're ready to help. - %p.text-big You need a better return. You need new buyers and logistics partners. You need your story told across wholesale, retail, and the kitchen table. + %h2 + = t :shops_signup_help + %p.text-big + = t :shops_signup_help_text %br %a.button.transparent{href: "/register"} - Join now + = t :shops_signup_action #hub-details.pane.footer-pad .row .small-12.medium-10.medium-offset-1.columns - %h2.text-center Here's the detail. + %h2.text-center + = t :shops_signup_detail = ContentConfig.hub_signup_detail_html.html_safe diff --git a/app/views/spree/api/products/bulk_show.v1.rabl b/app/views/spree/api/products/bulk_show.v1.rabl index d2cd23bd03..4a4df0eedf 100644 --- a/app/views/spree/api/products/bulk_show.v1.rabl +++ b/app/views/spree/api/products/bulk_show.v1.rabl @@ -3,7 +3,7 @@ attributes :id, :name, :variant_unit, :variant_unit_scale, :variant_unit_name, : # Infinity is not a valid JSON object, but Rails encodes it anyway node( :taxon_ids ) { |p| p.taxons.map{ |t| t.id }.join(",") } -node( :on_hand ) { |p| p.on_hand.nil? ? 0 : p.on_hand.to_f.finite? ? p.on_hand : "On demand" } +node( :on_hand ) { |p| p.on_hand.nil? ? 0 : p.on_hand.to_f.finite? ? p.on_hand : t(:on_demand) } node( :price ) { |p| p.price.nil? ? '0.0' : p.price } node( :available_on ) { |p| p.available_on.blank? ? "" : p.available_on.strftime("%F %T") } diff --git a/app/views/spree/api/variants/bulk_show.v1.rabl b/app/views/spree/api/variants/bulk_show.v1.rabl index 4a2a6bae9c..8044ded0a0 100644 --- a/app/views/spree/api/variants/bulk_show.v1.rabl +++ b/app/views/spree/api/variants/bulk_show.v1.rabl @@ -3,5 +3,5 @@ object @variant attributes :id, :options_text, :unit_value, :unit_description, :on_demand, :display_as, :display_name # Infinity is not a valid JSON object, but Rails encodes it anyway -node( :on_hand ) { |v| v.on_hand.nil? ? 0 : ( v.on_hand.to_f.finite? ? v.on_hand : "On demand" ) } -node( :price ) { |v| v.price.nil? ? 0.to_f : v.price } \ No newline at end of file +node( :on_hand ) { |v| v.on_hand.nil? ? 0 : ( v.on_hand.to_f.finite? ? v.on_hand : t(:on_demand) ) } +node( :price ) { |v| v.price.nil? ? 0.to_f : v.price } diff --git a/app/views/spree/checkout/payment/_gateway.html.haml b/app/views/spree/checkout/payment/_gateway.html.haml index 0b801cb420..33dcbda8fc 100644 --- a/app/views/spree/checkout/payment/_gateway.html.haml +++ b/app/views/spree/checkout/payment/_gateway.html.haml @@ -1,22 +1,23 @@ .row .small-6.columns %label - First Name + = t :first_name %input{type: :text, disabled: true, "ng-value" => "order.bill_address.firstname"} .small-6.columns %label - Last Name + = t :last_name %input{type: :text, disabled: true, "ng-value" => "order.bill_address.lastname"} .small-6.columns - = validated_input "Card Number", "secrets.card_number", required: true, maxlength: 19, autocomplete: "off" + = validated_input t(:card_number), "secrets.card_number", required: true, maxlength: 19, autocomplete: "off" .small-6.columns - = validated_input "Security Code", "secrets.card_verification_value", required: true + = validated_input t(:card_securitycode), "secrets.card_verification_value", required: true .row .small-12.columns - %label{for: "secrets.card_month"} Expiry Date + %label{for: "secrets.card_month"} + = t :card_expiry_date .row .small-6.columns diff --git a/app/views/spree/order_mailer/_order_summary.html.haml b/app/views/spree/order_mailer/_order_summary.html.haml index 86b1af1f3b..63ff741fc8 100644 --- a/app/views/spree/order_mailer/_order_summary.html.haml +++ b/app/views/spree/order_mailer/_order_summary.html.haml @@ -2,11 +2,14 @@ %thead %tr %th{:align => "left"} - %h4 Item + %h4 + = t :email_order_summary_item %th{:align => "right", :width => "25%"} - %h4 Qty + %h4 + = t :email_order_summary_quantity %th{:align => "right", :width => "25%"} - %h4 Price + %h4 + = t :email_order_summary_price %tbody - @order.line_items.each do |item| %tr @@ -29,7 +32,7 @@ %tfoot %tr %td{:align => "right", :colspan => "2"} - Subtotal: + = t :email_order_summary_subtotal %td{:align => "right"} = display_checkout_subtotal(@order) - checkout_adjustments_for(@order, exclude: [:line_item]).reject{ |a| a.amount == 0 }.reverse_each do |adjustment| @@ -40,7 +43,8 @@ = adjustment.display_amount %tr %td{:align => "right", :colspan => "2"} - %strong Total: + %strong + = t :email_order_summary_total %td{:align => "right"} %strong= @order.display_total diff --git a/app/views/spree/order_mailer/_payment.html.haml b/app/views/spree/order_mailer/_payment.html.haml index 41968ba1ad..98022ffb3d 100644 --- a/app/views/spree/order_mailer/_payment.html.haml +++ b/app/views/spree/order_mailer/_payment.html.haml @@ -2,12 +2,13 @@ %p.callout %span{:style => "float:right;"} - if @order.paid? - PAID + = t :email_payment_paid - else - NOT PAID - %strong Payment summary + = t :email_payment_not_paid + %strong + = t :email_payment_summary %h4 - Paying via: + = t :email_payment_method %strong= @order.payments.first.andand.payment_method.andand.name.andand.html_safe %p %em= @order.payments.first.andand.payment_method.andand.description.andand.html_safe diff --git a/app/views/spree/order_mailer/_shipping.html.haml b/app/views/spree/order_mailer/_shipping.html.haml index b50a03323c..ba4829b171 100644 --- a/app/views/spree/order_mailer/_shipping.html.haml +++ b/app/views/spree/order_mailer/_shipping.html.haml @@ -5,11 +5,11 @@ - if @order.shipping_method.andand.name #{@order.shipping_method.name.html_safe} - else - Delivery details + = t :email_shipping_delivery_details - if @order.order_cycle.andand.pickup_time_for(@order.distributor) %h4 - Delivery on: + = t :email_shipping_delivery_time %strong #{@order.order_cycle.pickup_time_for(@order.distributor)} - if @order.shipping_method.andand.description %p @@ -17,7 +17,8 @@ %br   - if @order.ship_address - %h4 Delivery address: + %h4 + = t :email_shipping_delivery_time %p #{@order.ship_address.full_name} %br @@ -34,11 +35,11 @@ - if @order.shipping_method.andand.name #{@order.shipping_method.name.html_safe} - else - Collection details + = t :email_shipping_collection_details - if @order.order_cycle.andand.pickup_time_for(@order.distributor).present? %h4 - Ready for collection: + = t :email_shipping_collection_time %strong #{@order.order_cycle.pickup_time_for(@order.distributor)} - if @order.shipping_method.andand.description.present? @@ -48,6 +49,7 @@ - if @order.order_cycle.andand.pickup_instructions_for(@order.distributor).present? %p - %strong Collection instructions: + %strong + = t :email_shipping_collection_time %br #{@order.order_cycle.pickup_instructions_for(@order.distributor)} diff --git a/app/views/spree/order_mailer/_special_instructions.html.haml b/app/views/spree/order_mailer/_special_instructions.html.haml index 5145260411..2d2f947405 100644 --- a/app/views/spree/order_mailer/_special_instructions.html.haml +++ b/app/views/spree/order_mailer/_special_instructions.html.haml @@ -2,6 +2,7 @@ %br %p %small - %strong Your notes: + %strong + = t :email_special_instructions %br #{@order.special_instructions} diff --git a/app/views/spree/order_mailer/confirm_email_for_customer.html.haml b/app/views/spree/order_mailer/confirm_email_for_customer.html.haml index 0816bd432d..75461f2208 100644 --- a/app/views/spree/order_mailer/confirm_email_for_customer.html.haml +++ b/app/views/spree/order_mailer/confirm_email_for_customer.html.haml @@ -5,10 +5,9 @@ %tr %td %h3 - Hi #{@order.bill_address.firstname}, + = t :email_confirm_customer_greeting, name: @order.bill_address.firstname %h4 - Thanks for shopping at - %strong= "#{@order.distributor.name}!" + = t :email_confirm_customer_intro_html, distributor: @order.distributor.name %table.column{:align => "left"} %tr %td{:align => "right"} @@ -17,11 +16,9 @@ %p   %h4 - Order confirmation - %strong ##{@order.number} + = t :email_confirm_customer_number_html, number: @order.number %p - Here are your order details from - %strong= "#{@order.distributor.name}:" + = t :email_confirm_customer_details_html, distributor: @order.distributor.name = render 'order_summary' = render 'payment' @@ -30,7 +27,7 @@ %br %p.callout - Kind regards, + = t :email_confirm_customer_signoff %br #{@order.distributor.contact} %br diff --git a/app/views/spree/order_mailer/confirm_email_for_shop.html.haml b/app/views/spree/order_mailer/confirm_email_for_shop.html.haml index f62b3cdfb4..e8a2d98894 100644 --- a/app/views/spree/order_mailer/confirm_email_for_shop.html.haml +++ b/app/views/spree/order_mailer/confirm_email_for_shop.html.haml @@ -5,10 +5,9 @@ %tr %td %h3 - Hi #{@order.distributor.contact}, + = t :email_confirm_shop_greeting, name: @order.distributor.contact %h4 - Well done! You have a new order for - %strong= "#{@order.distributor.name}!" + = t :email_confirm_shop_order_html, distributor: @order.distributor.name %table.column{:align => "left"} %tr %td{:align => "right"} @@ -17,11 +16,9 @@ %p   %h4 - Order confirmation - %strong ##{@order.number} + = t :email_confirm_shop_number_html, number: @order.number %p - %strong= "#{@order.bill_address.firstname} #{@order.bill_address.lastname}" - completed the following order at your shopfront: + = t :email_confirm_shop_order_detail_html, firstname: @order.bill_address.firstname, lastname: @order.bill_address.lastname = render 'order_summary' = render 'payment' diff --git a/app/views/spree/orders/_adjustments.html.haml b/app/views/spree/orders/_adjustments.html.haml index 12b16375ec..14fba90f72 100644 --- a/app/views/spree/orders/_adjustments.html.haml +++ b/app/views/spree/orders/_adjustments.html.haml @@ -1,6 +1,7 @@ %tr{"data-hook" => "cart_adjustments_headers"} %td.cart-adjustments{colspan: "5"} - %a{ href: "#" } Fees... + %a{ href: "#" } + = t :orders_fees - checkout_line_item_adjustments(@order).each do |adjustment| %tr.cart_adjustment diff --git a/app/views/spree/orders/_form.html.haml b/app/views/spree/orders/_form.html.haml index e71f92452f..68ba409aa0 100644 --- a/app/views/spree/orders/_form.html.haml +++ b/app/views/spree/orders/_form.html.haml @@ -30,7 +30,7 @@ %td %td#empty-cart.text-center %span#clear_cart_link{"data-hook" => ""} - = link_to "Empty cart", empty_cart_path, method: :put, :class => 'not-bold small' + = link_to t(:orders_form_empty_cart), empty_cart_path, method: :put, :class => 'not-bold small' -#= form_tag empty_cart_path, :method => :put do -#= submit_tag t(:empty_cart), :class => 'button alert expand small' @@ -39,20 +39,23 @@ -# = render "spree/orders/adjustments" %tr - %td.text-right{colspan:"3"} Produce subtotal + %td.text-right{colspan:"3"} + = t :orders_form_subtotal %td.text-right %span.order-total.item-total= display_checkout_subtotal(@order) %td %tr - %td.text-right{colspan:"3"} Admin & handling + %td.text-right{colspan:"3"} + = t :orders_form_admin %td.text-right %span.order-total.distribution-total= display_checkout_admin_and_handling_adjustments_total_for(@order) %td %tr %td.text-right{colspan:"3"} - %h5 Total + %h5 + = t :orders_form_total %td.text-right %h5.order-total.grand-total= @order.display_total %td diff --git a/app/views/spree/orders/edit.html.haml b/app/views/spree/orders/edit.html.haml index 3a00558a52..2fa5c043db 100644 --- a/app/views/spree/orders/edit.html.haml +++ b/app/views/spree/orders/edit.html.haml @@ -1,13 +1,14 @@ - content_for(:title) do - Shopping Cart + = t :orders_edit_title = inject_enterprises .darkswarm - content_for :order_cycle_form do - %closing Your shopping cart + %closing + = t :orders_edit_headline %p - Order ready for + = t :orders_edit_time %strong - if @order.order_cycle = pickup_time @order.order_cycle @@ -37,10 +38,10 @@ %a.button.large.secondary{href: main_app.shop_path} %i.ofn-i_008-caret-left - Continue shopping + = t :orders_edit_continue .columns.large-4.text-right %a#checkout-link.button.large.primary{href: main_app.checkout_path} - Checkout + = t :orders_edit_checkout %i.ofn-i_007-caret-right = render partial: "shared/footer" diff --git a/app/views/spree/orders/order_cycle_expired.html.haml b/app/views/spree/orders/order_cycle_expired.html.haml index c5726cf64e..66bb134b7a 100644 --- a/app/views/spree/orders/order_cycle_expired.html.haml +++ b/app/views/spree/orders/order_cycle_expired.html.haml @@ -1,17 +1,17 @@ -%h2 Orders have closed for this order cycle +%h2 + = t :orders_oc_expired_headline %p - = succeed "." do - Sorry, orders for this order cycle closed - = distance_of_time_in_words_to_now @order_cycle.orders_close_at - ago! Please contact your hub directly to see if they can accept late orders - - - if active_order_cycle_for_distributor? current_distributor - %strong= link_to 'or see the other order cycles available at this hub', spree.clear_orders_path + - if active_order_cycle_for_distributor? current_distributor + = t :orders_oc_expired_text_others_html, time: distance_of_time_in_words_to_now(@order_cycle.orders_close_at), link: link_to t(:orders_oc_expired_text_link), spree.clear_orders_path + - else + = t :orders_oc_expired_text, time: distance_of_time_in_words_to_now(@order_cycle.orders_close_at) %p - %strong Email: + %strong + = t :orders_oc_expired_email = current_distributor.email %br/ - %strong Phone: + %strong + = t :orders_oc_expired_phone = current_distributor.phone diff --git a/app/views/spree/orders/show.html.haml b/app/views/spree/orders/show.html.haml index 7533ae981a..438a611a68 100644 --- a/app/views/spree/orders/show.html.haml +++ b/app/views/spree/orders/show.html.haml @@ -1,12 +1,12 @@ - content_for(:title) do - Order Confirmation + = t :orders_show_title = inject_enterprises .darkswarm - content_for :order_cycle_form do %strong.avenir - Order ready on + = t :orders_show_time - if @order.order_cycle = @order.order_cycle.pickup_time_for(@order.distributor) - else @@ -18,7 +18,7 @@ .row .columns.large-12.text-center %h2 - Order confirmation + = t :orders_show_number = " #" + @order.number #order{"data-hook" => ""} diff --git a/app/views/spree/products/_add_to_cart_distributor_choice.html.haml b/app/views/spree/products/_add_to_cart_distributor_choice.html.haml index 79936442c7..6348760786 100644 --- a/app/views/spree/products/_add_to_cart_distributor_choice.html.haml +++ b/app/views/spree/products/_add_to_cart_distributor_choice.html.haml @@ -1,2 +1,3 @@ -.distributor Distributor for your order: +.distributor + = t :products_cart_distributor_choice = select_tag "distributor_id", options_from_collection_for_select([Enterprise.new]+distributor_collection, "id", "name", current_distributor.andand.id) diff --git a/app/views/spree/products/_add_to_cart_distributor_fixed.html.haml b/app/views/spree/products/_add_to_cart_distributor_fixed.html.haml index 7927f9fc3e..1c82199c89 100644 --- a/app/views/spree/products/_add_to_cart_distributor_fixed.html.haml +++ b/app/views/spree/products/_add_to_cart_distributor_fixed.html.haml @@ -1,6 +1,7 @@ = hidden_field_tag "distributor_id", distributor.id -- if changing_distributor - .distributor-fixed= "Your distributor for this order will be changed to #{distributor.name} if you add this product to your cart." -- else - .distributor-fixed= "Your distributor for this order is #{distributor.name}" +.distributor-fixed + - if changing_distributor + = t :products_cart_distributor_change, name: distributor.name + - else + = t :products_cart_distributor_is, name: distributor.name diff --git a/app/views/spree/products/_add_to_cart_distributor_unavailable.html.haml b/app/views/spree/products/_add_to_cart_distributor_unavailable.html.haml index fb84bd1e9f..283c628c72 100644 --- a/app/views/spree/products/_add_to_cart_distributor_unavailable.html.haml +++ b/app/views/spree/products/_add_to_cart_distributor_unavailable.html.haml @@ -1,4 +1,2 @@ .error-distributor - Please complete your order at - = link_to current_distributor.name, root_path - before shopping with another distributor. + = t :products_distributor_error, link: link_to(current_distributor.name, root_path) diff --git a/app/views/spree/products/_add_to_cart_order_cycle_choice.html.haml b/app/views/spree/products/_add_to_cart_order_cycle_choice.html.haml index 14c5ac5faa..18091d2dfe 100644 --- a/app/views/spree/products/_add_to_cart_order_cycle_choice.html.haml +++ b/app/views/spree/products/_add_to_cart_order_cycle_choice.html.haml @@ -1,2 +1,3 @@ -%div Order cycle for your order: -= select_tag "order_cycle_id", options_from_collection_for_select([OrderCycle.new(name: 'None')]+order_cycle_collection, "id", "name", current_order_cycle.andand.id) +%div + = t :products_oc += select_tag "order_cycle_id", options_from_collection_for_select([OrderCycle.new(name: t(:none))]+order_cycle_collection, "id", "name", current_order_cycle.andand.id) diff --git a/app/views/spree/products/_add_to_cart_order_cycle_fixed.html.haml b/app/views/spree/products/_add_to_cart_order_cycle_fixed.html.haml index 377b2c8e88..492ee0d156 100644 --- a/app/views/spree/products/_add_to_cart_order_cycle_fixed.html.haml +++ b/app/views/spree/products/_add_to_cart_order_cycle_fixed.html.haml @@ -1,6 +1,7 @@ = hidden_field_tag "order_cycle_id", order_cycle.id -- if changing_order_cycle - .order-cycle-fixed= "Your order cycle for this order will be changed to #{order_cycle.name} if you add this product to your cart." -- else - .order-cycle-fixed= "Your order cycle for this order is #{order_cycle.name}" +.order-cycle-fixed + - if changing_order_cycle + = t :products_oc_change, name: order_cycle.name + - else + = t :products_oc_is, name: order_cycle.name diff --git a/app/views/spree/products/_add_to_cart_order_cycle_unavailable.html.haml b/app/views/spree/products/_add_to_cart_order_cycle_unavailable.html.haml index d061f0595c..a123da18fe 100644 --- a/app/views/spree/products/_add_to_cart_order_cycle_unavailable.html.haml +++ b/app/views/spree/products/_add_to_cart_order_cycle_unavailable.html.haml @@ -1,4 +1,2 @@ .error-distributor - Please complete your order from - = link_to (current_order_cycle.andand.name || 'your current order cycle'), root_path - before shopping in a different order cycle. + = t :products_oc_error, link: = link_to((current_order_cycle.andand.name || t(:products_oc_current)), root_path) diff --git a/app/views/spree/products/_add_to_cart_quantity_fields.html.haml b/app/views/spree/products/_add_to_cart_quantity_fields.html.haml index 826464b162..7235690c52 100644 --- a/app/views/spree/products/_add_to_cart_quantity_fields.html.haml +++ b/app/views/spree/products/_add_to_cart_quantity_fields.html.haml @@ -1,7 +1,9 @@ %div(class = "columns alpha two") - %div Quantity + %div + = t :products_quantity = number_field_tag (product.has_variants? ? :quantity : "variants[#{product.master.id}]"), 1, :class => 'title', :in => 1..product.on_hand - if product.group_buy %div(class = "columns alpha three") - %div Max quantity + %div + = t :products_max_quantity = number_field_tag (product.has_variants? ? :max_quantity : "variant_attributes[#{product.master.id}][max_quantity]"), 1, :class => 'title max_quantity', :in => 1..product.on_hand diff --git a/app/views/spree/products/_distributor_details.html.haml b/app/views/spree/products/_distributor_details.html.haml index a8fe4af9a3..e91c0ea6e5 100644 --- a/app/views/spree/products/_distributor_details.html.haml +++ b/app/views/spree/products/_distributor_details.html.haml @@ -1,8 +1,9 @@ %fieldset#product-distributor-details.columns.five.omega - %legend Distributor + %legend + = t :products_distributor .distributor-details - order = current_order(false) - if order.andand.distributor.present? = render 'enterprises/distributor_details', :distributor => order.distributor - else - When you select a distributor for your order, their address and pickup times will be displayed here. + = t :products_distributor_info diff --git a/app/views/spree/shared/_order_details.html.haml b/app/views/spree/shared/_order_details.html.haml index e8315a00e9..d029c02b12 100644 --- a/app/views/spree/shared/_order_details.html.haml +++ b/app/views/spree/shared/_order_details.html.haml @@ -3,23 +3,23 @@ .order-summary.text-small .right - if order.paid? - PAID + = t :order_paid - else - NOT PAID + = t :order_not_paid %span - Total order + = t :order_total %strong = order.display_total.to_html .pad .text-big - Paying via: + = t :order_payment %strong= order.payments.first.andand.payment_method.andand.name.andand.html_safe %p.text-small.text-skinny.pre-line %em= order.payments.first.andand.payment_method.andand.description.andand.html_safe .order-summary.text-small %strong - Billing address + = t :order_billing_address .pad %p.text-small = order.bill_address.firstname + " " + order.bill_address.lastname @@ -35,13 +35,13 @@ %strong= order.shipping_method.name .pad .text-big - Delivery on + = t :order_delivery_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 || "" .order-summary.text-small %strong - Delivery address + = t :order_delivery_address .pad %p.text-small = order.ship_address.firstname + " " + order.ship_address.lastname @@ -52,7 +52,8 @@ - if order.special_instructions.present? %br %p.light.small - %strong Your notes: + %strong + = t :order_special_instructions %br = order.special_instructions - else @@ -70,14 +71,15 @@ %br %p.text-small %strong - Collection Instructions + = t :order_pickup_instructions %br #{order.order_cycle.pickup_instructions_for(order.distributor)} - if order.special_instructions.present? %br %p.light.small - %strong Your notes: + %strong + = t :order_special_instructions %br = order.special_instructions @@ -129,7 +131,7 @@ %tr#subtotal-row.total %td.text-right{colspan: "3"} %strong - Produce + = t :order_produce %td.text-right.total %span= display_checkout_subtotal(order) @@ -146,7 +148,7 @@ %tr.total %td.text-right{colspan: "3"} %h5 - Total + = t :order_produce %td.text-right.total %h5#order_total= order.display_total.to_html @@ -154,6 +156,6 @@ #tax{"data-hook" => "order_details_tax"} %tr#tax-row.total %td.text-right{colspan: "3"} - (includes tax) + = t :order_includes_tax %td.text-right.total %span= display_checkout_tax_total(order) diff --git a/app/views/spree/shared/_order_details_steps_data.html.erb b/app/views/spree/shared/_order_details_steps_data.html.erb index 68549ebbc6..eabe239c78 100644 --- a/app/views/spree/shared/_order_details_steps_data.html.erb +++ b/app/views/spree/shared/_order_details_steps_data.html.erb @@ -4,8 +4,8 @@
<%= "Customer Details" %> <%= link_to "(#{t(:edit)})", checkout_state_path(:address) unless @order.completed? %>
- Name: <%= order.bill_address.full_name %>
- Address: <%= order.bill_address.address1 + ", " + order.bill_address.city %> + <%= "#{t(:name)}: #{order.bill_address.full_name}" %>
+ <%= "#{t(:address)}: #{order.bill_address.address1}, #{order.bill_address.city}" %>

@@ -14,7 +14,7 @@
<%= t(:payment_information) %> <%= link_to "(#{t(:edit)})", checkout_state_path(:payment) unless @order.completed? %>
<% if payment.payment_method.name.include? "PayPal" %> -
Your payment via PayPal has been processed successfully.
+
<% t(:order_payment_paypal_successful) %>
<% elsif payment.payment_method.name.include? "EFT" %> <%= payment.payment_method.description.html_safe %> <% elsif order.credit_cards.empty? == false %> @@ -37,7 +37,7 @@
-
Hub Info
+
<% t(:order_hub_info) %>
<%= render 'enterprises/distributor_details', :distributor => order.distributor %>
diff --git a/app/views/spree/shared/_products_by_distribution.html.haml b/app/views/spree/shared/_products_by_distribution.html.haml index 2bc3088adb..39a50f80ac 100644 --- a/app/views/spree/shared/_products_by_distribution.html.haml +++ b/app/views/spree/shared/_products_by_distribution.html.haml @@ -6,10 +6,11 @@ - else #products-local %h2 - Products - = "in #{current_order_cycle.name}" if current_order_cycle - = "at #{current_distributor.name}" if current_distributor + = t :products + = t :products_in, oc: current_order_cycle.name if current_order_cycle + = t :products_at, distributor: current_distributor.name if current_distributor = render 'spree/shared/products', :products => @products_local, :taxon => @taxon #products-remote - %h2 Products found elsewhere + %h2 + = t :products_elsewhere = render 'spree/shared/products', :products => @products_remote, :taxon => @taxon diff --git a/app/views/spree/user_mailer/signup_confirmation.html.haml b/app/views/spree/user_mailer/signup_confirmation.html.haml index c85b377fa4..e45b99a000 100644 --- a/app/views/spree/user_mailer/signup_confirmation.html.haml +++ b/app/views/spree/user_mailer/signup_confirmation.html.haml @@ -1,34 +1,27 @@ %h3 - Hello! + = t :email_signup_greeting %p.lead - = "Welcome to #{ Spree::Config[:site_name] }!" + = t :email_signup_welcome, sitename: Spree::Config[:site_name] / Heading Panel %p   %p.callout %strong - Your login + = t :email_signup_login %p - Your login email is + = t :email_signup_email %strong = @user.email %p - You can start shopping online now at - %a{:href => "#{ spree.root_url }", :target => "_blank"} - -# Remove http:// and trailing slashes from root url if they exist - = spree.root_url.sub(/http:\/\//,"").sub(/\/$/,"") + -# Remove http:// and trailing slashes from root url if they exist + = t :email_signup_shop_html, link: link_to(spree.root_url.sub(/http:\/\//,"").sub(/\/$/,""), spree.root_url, target: '_blank') %p   %hr/ %p   %p.lead - Thanks for joining the network. - If you are a customer, we look forward to introducing you to many fantastic farmers, wonderful food hubs and delicious food! - If you are a producer or food enterprise, we are excited to have you as a part of the network. + = t :email_signup_text %p - We welcome all your questions and feedback; you can use the - %em - Send Feedback - button on the site or email us at + = t :email_signup_help_html %a{:href => "mailto:hello@openfoodnetwork.org", :target => "_blank"} hello@openfoodnetwork.org diff --git a/config/locales/en.yml b/config/locales/en.yml index 3149620eab..bc1a8d272c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -14,6 +14,7 @@ en: confirmation_sent: "Confirmation email sent!" confirmation_not_sent: "Could not send a confirmation email." home: "OFN" + title: Open Food Network welcome_to: 'Welcome to ' search_by_name: Search by name or suburb... producers: Aussie Producers @@ -35,4 +36,421 @@ en: footer_email: "Email" footer_links_md: "Links" footer_about_url: "About URL" - footer_tos_url: "Terms of Service URL" \ No newline at end of file + footer_tos_url: "Terms of Service URL" + + name: Name + first_name: First Name + last_name: Last Name + email: Email + phone: Phone + next: Next + address: Address + address2: Address (contd.) + city: City + state: State + postcode: Postcode + country: Country + unauthorized: Unauthorized + terms_of_service: "Terms of service" + on_demand: On demand + none: None + + alert_selling_on_ofn: "Interested in selling food on the Open Food Network?" + alert_start_here: "Start here" + label_shops: "Shops" + label_map: "Map" + label_producers: "Producers" + label_groups: "Groups" + label_about: "About" + label_shopping: "Shopping" + label_login: "Login" + label_logout: "Logout" + label_signup: "Sign up" + label_administration: "Administration" + label_admin: "Admin" + label_account: "Account" + label_more: "More" + label_less: "Show less" + + items: "items" + cart_headline: "Your shopping cart" + total: "Total" + checkout: "Checkout now" + cart_updating: "Updating cart..." + cart_empty: "Cart empty" + cart_edit: "Edit your cart" + + card_number: Card Number + card_securitycode: "Security Code" + card_expiry_date: Expiry Date + + ofn_cart_headline: "Current cart for:" + ofn_cart_distributor: "Distributor:" + ofn_cart_oc: "Order cycle:" + ofn_cart_from: "From:" + ofn_cart_to: "To:" + ofn_cart_product: "Product:" + ofn_cart_quantitiy: "Quantity:" + ofn_cart_send: "Buy me" + + ie_warning_headline: "Your browser is out of date :-(" + ie_warning_text: "For the best Open Food Network experience, we strongly recommend upgrading your browser:" + ie_warning_chrome: Download Chrome + ie_warning_firefox: Download Firefox + ie_warning_ie: Upgrade Internet Explorer + ie_warning_other: "Can't upgrade your browser? Try Open Food Network on your smartphone :-)" + + footer_global_headline: "OFN Global" + footer_global_home: "Home" + footer_global_news: "News" + footer_global_about: "About" + footer_global_contact: "Contact" + + footer_sites_headline: "OFN Sites" + footer_sites_developer: "Developer" + footer_sites_community: "Community" + footer_sites_userguide: "User Guide" + + footer_secure: "Secure and trusted." + footer_secure_text: "Open Food Network uses SSL encryption (2048 bit RSA) everywhere to keep your shopping and payment information private. Our servers do not store your credit card details and payments are processed by PCI-compliant services." + + footer_contact_headline: "Keep in touch" + footer_contact_email: "Email us" + + footer_nav_headline: "Navigate" + footer_join_headline: "Join us" + footer_join_producers: "Producers sign-up" + footer_join_hubs: "Hubs sign-up" + footer_join_groups: "Groups sign-up" + footer_join_partners: "Food systems partners" + + footer_legal_call: "Read our" + footer_legal_tos: "Terms & conditions" + footer_legal_visit: "Find us on" + footer_legal_text: "Open Food Network is a free and open source software platform. Our content is licensed with" + footer_legal_text2: "and our code with" + footer_legal_license_content: "CC BY-SA 3.0" + footer_legal_license_code: "AGPL 3" + + home_shop: Shop Now + + brandstory_headline: "Food, unincorporated." + brandstory_intro: "Sometimes the best way to fix the system is to start a new one…" + brandstory_part1: "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 seriously change the world." + brandstory_part2: "Then we need a way to make it real. A way to empower everyone who grows, sells and buys food. A way to tell all the stories, to handle all the logistics. A way to turn transaction into transformation every day." + brandstory_part3: "So we build an online marketplace that levels the playing field. It’s transparent, so it creates real relationships. It’s open source, so it’s owned by everyone. It scales to regions and nations, so people start versions across the world." + brandstory_part4: "It works everywhere. It changes everything." + brandstory_part5_strong: "We call it Open Food Network." + brandstory_part6: "We all love food. Now we can love our food system too." + + system_headline: "Here's how it works." + system_step1: "1. Search" + system_step1_text: "Search our diverse, independent shops for seasonal local food. Search by neighbourhood and food category, or whether you prefer delivery or pickup." + system_step2: "2. Shop" + system_step2_text: "Transform your transactions with affordable local food from diverse producers and hubs. Know the stories behind your food and the people who make it!" + system_step3: "3. Pick-up / Delivery" + system_step3_text: "Hang on for your delivery, or visit your producer or hub for a more personal connection with your food. Food shopping as diverse as nature intended it." + + cta_headline: "Shopping that makes the world a better place." + cta_label: "I'm Ready" + + stats_headline: "We're creating a new food system." + stats_producers: "food producers" + stats_shops: "food shops" + stats_shoppers: "food shoppers" + stats_orders: "food orders" + + checkout_title: Checkout + checkout_now: Checkout now + checkout_order_ready: Order ready for + checkout_hide: Hide + checkout_expand: Expand + checkout_headline: "Ok, ready to checkout?" + checkout_as_guest: "Checkout as guest" + checkout_details: "Your details" + checkout_billing: "Billing info" + checkout_shipping: Shipping info + checkout_method_free: Free + checkout_address_same: Shipping address same as billing address? + checkout_ready_for: "Ready for:" + checkout_instructions: "Any comments or special instructions?" + checkout_payment: Payment + checkout_send: Place order now + checkout_your_order: Your order + checkout_cart_total: Cart total + checkout_shipping_price: Shipping + checkout_total_price: Total + checkout_back_to_cart: "Back to Cart" + + order_paid: PAID + order_not_paid: NOT PAID + order_total: Total order + order_payment: "Paying via:" + order_billing_address: Billing address + order_delivery_on: Delivery on + order_delivery_address: Delivery address + order_special_instructions: "Your notes:" + order_pickup_instructions: Collection Instructions + order_produce: Produce + order_total_price: Total + order_includes_tax: (includes tax) + order_payment_paypal_successful: Your payment via PayPal has been processed successfully. + order_hub_info: Hub Info + + products: "Products" + products_in: "in %{oc}" + products_at: "at %{distributor}" + products_elsewhere: "Products found elsewhere" + + email_welcome: "Welcome" + email_confirmed: "Thank you for confirming your email address." + email_registered: "is now part of" + email_userguide_html: "The User Guide with detailed support for setting up your Producer or Hub is here: +%{link}" + email_admin_html: "You can manage your account by logging into the %{link} or by clicking on the cog in the top right hand side of the homepage, and selecting Administration." + email_community_html: "We also have an online forum for community discussion related to OFN software and the unique challenges of running a food enterprise. You are encouraged to join in. We are constantly evolving and your input into this forum will shape what happens next. +%{link}" + email_help: "If you have any difficulties, check out our FAQs, browse the forum or post a 'Support' topic and someone will help you out!" + email_confirmation_greeting: "Hi, %{contact}!" + email_confirmation_profile_created: "A profile for %{name} has been successfully created! +To activate your Profile we need to confirm this email address." + email_confirmation_click_link: "Please click the link below to confirm your email and to continue setting up your profile." + email_confirmation_link_label: "Confirm this email address »" + email_confirmation_help: "After confirming your email you can access your administration account for this enterprise. +See the %{link} to find out more about %{sitename}'s features and to start using your profile or online store." + email_confirmation_userguide: "User Guide" + email_social: "Connect with Us:" + email_contact: "Email us:" + email_signoff: "Cheers," + email_signature: "%{sitename} Team" + + email_confirm_customer_greeting: "Hi %{name}," + email_confirm_customer_intro_html: "Thanks for shopping at %{distributor}!" + email_confirm_customer_number_html: "Order confirmation #%{number}" + email_confirm_customer_details_html: "Here are your order details from %{distributor}:" + email_confirm_customer_signoff: "Kind regards," + email_confirm_shop_greeting: "Hi %{name}," + email_confirm_shop_order_html: "Well done! You have a new order for %{distributor}!" + email_confirm_shop_number_html: "Order confirmation #%{number}" + email_confirm_shop_order_detail_html: "%{firstname} %{lastname} completed the following order at your shopfront:" + email_order_summary_item: "Item" + email_order_summary_quantity: "Qty" + email_order_summary_price: "Price" + email_order_summary_subtotal: "Subtotal:" + email_order_summary_total: "Total:" + email_payment_paid: PAID + email_payment_not_paid: NOT PAID + email_payment_summary: Payment summary + email_order_summary_method: "Paying via:" + email_shipping_delivery_details: Delivery details + email_shipping_delivery_time: "Delivery on:" + email_shipping_delivery_address: "Delivery address:" + email_shipping_collection_details: Collection details + email_shipping_collection_time: "Ready for collection:" + email_shipping_collection_instructions: "Collection instructions:" + email_special_instructions: "Your notes:" + + email_signup_greeting: Hello! + email_signup_welcome: "Welcome to %{sitename}!" + email_signup_login: Your login + email_signup_email: Your login email is + email_signup_shop_html: "You can start shopping online now at %{link}." + email_signup_text: "Thanks for joining the network. + If you are a customer, we look forward to introducing you to many fantastic farmers, wonderful food hubs and delicious food! + If you are a producer or food enterprise, we are excited to have you as a part of the network." + email_signup_help_html: "We welcome all your questions and feedback; you can use the Send Feedback button on the site or email us at" + + shopping_oc_closed: Orders are closed + shopping_oc_closed_description: "Please wait until the next cycle opens (or contact us directly to see if we can accept any late orders)" + shopping_oc_last_closed: "The last cycle closed %{distance_of_time} ago" + shopping_oc_next_open: "The next cycle opens in %{distance_of_time}" + shopping_tabs_about: "About %{distributor}" + shopping_tabs_contact: "Contact" + shopping_contact_address: "Address" + shopping_contact_web: "Contact" + shopping_contact_social: "Follow" + shopping_groups_part_of: "is part of:" + shopping_producers_of_hub: "%{hub}'s producers:" + + enterprises_next_closing: "Next order closing" + enterprises_ready_for: "Ready for" + enterprises_choose: "Choose when you want your order:" + + hubs_buy: "Shop for:" + hubs_delivery_options: "Delivery options" + hubs_pickup: "Pickup" + hubs_delivery: "Delivery" + hubs_producers: "Our producers" + hubs_filter_by: "Filter by" + hubs_filter_type: "Type" + hubs_filter_delivery: "Delivery" + hubs_matches: "Did you mean?" + hubs_intro: Shop in your local area + hubs_distance: Closest to + hubs_distance_filter: "Show me shops near %{location}" + + products_clear_all: Clear all + products_showing: "Showing:" + products_with: with + products_search: "Search by product or producer" + products_loading: "Loading products..." + products_updating_cart: "Updating cart..." + products_cart_empty: "Cart empty" + products_edit_cart: "Edit your cart" + products_from: from + + search_no_results_html: "Sorry, no results found for %{query}. Try another search?" + + components_profiles_popover: "Profiles do not have a shopfront on the Open Food Network, but may have their own physical or online shop elsewhere" + components_profiles_show: "Show profiles" + components_filters_nofilters: "No filters" + components_filters_clearfilters: "Clear all filters" + + groups_title: Groups + groups_headline: Groups / regions + groups_search: "Search name or keyword" + groups_no_groups: "No groups found" + groups_about: "About Us" + groups_producers: "Our producers" + groups_hubs: "Our hubs" + groups_contact_web: Contact + groups_contact_social: Follow + groups_contact_address: Address + groups_contact_email: Email us + groups_contact_website: Visit our website + groups_contact_facebook: Follow us on Facebook + groups_signup_title: Sign up as a group + groups_signup_headline: Groups sign up + groups_signup_intro: "We're an amazing platform for collaborative marketing, the easiest way for your members and stakeholders to reach new markets. We're non-profit, affordable, and simple." + groups_signup_email: Email us + groups_signup_motivation1: We transform food systems fairly. + groups_signup_motivation2: It's why we get out of bed every day. We're a global non-profit, based on open source code. We play fair. You can always trust us. + groups_signup_motivation3: We know you have big ideas, and we want to help. We'll share our knowledge, networks and resources. We know that isolation doesn't create change, so we'll partner with you. + groups_signup_motivation4: We meet you where you are. + groups_signup_motivation5: You might be an alliance of food hubs, producers, or distributors, and an industry body, or a local government. + groups_signup_motivation6: Whatever your role in your local food movement, we're ready to help. However you come to wonder what Open Food Network would look like or is doing in your part of the world, let's start the conversation. + groups_signup_motivation7: We make food movements make more sense. + groups_signup_motivation8: You need to activate and enable your networks, we offer a platform for conversation and action. You need real engagement. We’ll help reach all the players, all the stakeholders, all the sectors. + groups_signup_motivation9: You need resourcing. We’ll bring all our experience to bear. You need cooperation. We’ll better connect you to a global network of peers. + groups_signup_pricing: Group Account + groups_signup_studies: Case Studies + groups_signup_contact: Ready to discuss? + groups_signup_contact_text: "Get in touch to discover what OFN can do for you:" + groups_signup_detail: "Here's the detail." + + login_invalid: "Invalid email or password" + + modal_hubs: "Food Hubs" + modal_hubs_abstract: Our food hubs are the point of contact between you and the people who make your food! + modal_hubs_content1: You can search for a convenient hub by location or name. Some hubs have multiple points where you can pick-up your purchases, and some will also provide delivery options. Each food hub is a sales point with independent business operations and logistics - so variations between hubs are to be expected. + modal_hubs_content2: You can only shop at one food hub at a time. + + modal_groups: "Groups / Regions" + modal_groups_content1: These are the organisations and relationships between hubs which make up the Open Food Network. + modal_groups_content2: Some groups are clustered by location or council, others by non-geographic similarities. + + modal_how: "How it works" + modal_how_shop: Shop the Open Food Network + modal_how_shop_explained: Search for a food hub near you to start shopping! You can expand each food hub to see what kinds of goodies are available, and click through to start shopping. (You can only shop one food hub at a time.) + modal_how_pickup: Pick-ups, delivery & shipping costs + modal_how_pickup_explained: Some food hubs deliver to your door, while others require you to pick-up your purchases. You can see which options are available on the homepage, and select which you'd like at the shopping and check-out pages. Delivery will cost more, and pricing differs from hub-to-hub. Each food hub is a sales point with independent business operations and logisitics - so variations between hubs are to be expected. + modal_how_more: Learn more + modal_how_more_explained: "If you want to learn more about the Open Food Network, how it works, and get involved, check out:" + + modal_producers: "Producers" + modal_producers_explained: "Our producers make all the delicious food you can shop for on the Open Food Network." + + ocs_choice_hub: "Hub:" + ocs_choice_oc: "Order Cycle:" + ocs_choice_text: "You have not yet picked where you will get your order from." + ocs_closed_headline: Orders are currently closed for this hub + ocs_closed_time: "The last cycle closed %{time} ago." + ocs_closed_contact: "Please contact your hub directly to see if they accept late orders, or wait until the next cycle opens." + ocs_closed_opens: "The next order cycle opens in %{time}" + ocs_closed_email: "Email: %{email}" + ocs_closed_phone: "Phone: %{phone}" + ocs_pickup_time: "Your order will be ready on %{pickup_time}" + ocs_change_date: "Change Collection Date" + ocs_change_date_notice: "(This will reset your cart)" + ocs_close_time: "ORDERS CLOSE" + ocs_when_headline: When do you want your order? + ocs_when_text: No products are displayed until you select a date. + ocs_when_closing: "Closing On" + ocs_when_choose: "Choose Order Cycle" + ocs_list: "List View" + + producers_about: About us + producers_buy: Shop for + producers_contact: Contact + producers_contact_phone: Call + producers_contact_social: Follow + producers_at: "products at:" + producers_filter: Filter by + producers_filter_type: Type + producers_title: Producers + producers_headline: Find local producers + producers_signup_title: Sign up as a producer + producers_signup_headline: Food producers, empowered. + producers_signup_motivation: Sell your food and tell your stories to diverse new markets. Save time and money on every overhead. We support innovation without the risk. We've levelled the playing field. + producers_signup_send: Join now + producers_signup_enterprise: Enterprise Accounts + producers_signup_studies: Stories from our producers. + producers_signup_cta_headline: Join now! + producers_signup_cta_action: Join now + producers_signup_detail: Here's the detail. + + products_item: Item + products_description: Description + products_variant: Variant + products_quantity: Quantity + products_availabel: Available? + products_price: Price + + register_title: Register + + shops_title: Shops + shops_headline: Shopping, transformed. + shops_text: Food grows in cycles, farmers harvest in cycles, and we order food in cycles. If you find an order cycle closed, check back soon. + shops_signup_title: Sign up as a hub + shops_signup_headline: Food hubs, unlimited. + shops_signup_motivation: Whatever your model, we support you. However you change, we're with you. We're non-profit, independent, and open-sourced. We're the software partners you've dreamed of. + shops_signup_action: Join now + shops_signup_pricing: Enterprise Accounts + shops_signup_stories: Stories from our hubs. + shops_signup_help: We're ready to help. + shops_signup_help_text: You need a better return. You need new buyers and logistics partners. You need your story told across wholesale, retail, and the kitchen table. + shops_signup_detail: Here's the detail. + + orders_fees: Fees... + orders_edit_title: Shopping Cart + orders_edit_headline: Your shopping cart + orders_edit_time: Order ready for + orders_edit_continue: Continue shopping + orders_edit_checkout: Checkout + orders_form_empty_cart: "Empty cart" + orders_form_subtotal: Produce subtotal + orders_form_admin: Admin & handling + orders_form_subtotal: Total + orders_oc_expired_headline: Orders have closed for this order cycle + orders_oc_expired_text: "Sorry, orders for this order cycle closed %{time} ago! Please contact your hub directly to see if they can accept late orders." + orders_oc_expired_text_others_html: "Sorry, orders for this order cycle closed %{time} ago! Please contact your hub directly to see if they can accept late orders %{link}." + orders_oc_expired_text_link: "or see the other order cycles available at this hub" + orders_oc_expired_email: "Email:" + orders_oc_expired_phone: "Phone:" + orders_show_title: Order Confirmation + orders_show_time: Order ready on + orders_show_number: Order confirmation + + products_cart_distributor_choice: "Distributor for your order:" + products_cart_distributor_change: "Your distributor for this order will be changed to %{name} if you add this product to your cart." + products_cart_distributor_is: "Your distributor for this order is %{name}." + products_distributor_error: "Please complete your order at %{link} before shopping with another distributor." + products_oc: "Order cycle for your order:" + products_oc_change: "Your order cycle for this order will be changed to %{name} if you add this product to your cart." + products_oc_is: "Your order cycle for this order is %{name}." + products_oc_error: "Please complete your order from %{link} before shopping in a different order cycle." + products_oc_current: "your current order cycle" + products_quantity: Quantity + products_max_quantity: Max quantity + products_distributor: Distributor + products_distributor_info: When you select a distributor for your order, their address and pickup times will be displayed here. From 8b6f5b4a991f04e6aba17229b5c10f3f3a4659c8 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 28 Aug 2015 18:36:23 +1000 Subject: [PATCH 02/30] Updating spec for new Login label --- spec/support/request/ui_component_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/request/ui_component_helper.rb b/spec/support/request/ui_component_helper.rb index d9f01b447b..e4b4e5a050 100644 --- a/spec/support/request/ui_component_helper.rb +++ b/spec/support/request/ui_component_helper.rb @@ -28,7 +28,7 @@ module UIComponentHelper end def open_login_modal - find("a", text: "Log in").click + find("a", text: "Login").click end def open_off_canvas From 415dac3ae3092e75128c49968d4595b2d019aa4d Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 28 Aug 2015 21:12:56 +1000 Subject: [PATCH 03/30] Updating spec for new Login label --- spec/features/consumer/shopping/checkout_auth_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/features/consumer/shopping/checkout_auth_spec.rb b/spec/features/consumer/shopping/checkout_auth_spec.rb index 8b4f3bb977..b9b2a15e33 100644 --- a/spec/features/consumer/shopping/checkout_auth_spec.rb +++ b/spec/features/consumer/shopping/checkout_auth_spec.rb @@ -33,15 +33,15 @@ feature "As a consumer I want to check out my cart", js: true do it "renders the login buttons when logged out" do visit checkout_path within "section[role='main']" do - page.should have_content "Log in" - click_button "Log in" + page.should have_content "Login" + click_button "Login" end page.should have_login_modal end it "populates user details once logged in" do visit checkout_path - within("section[role='main']") { click_button "Log in" } + within("section[role='main']") { click_button "Login" } page.should have_login_modal fill_in "Email", with: user.email fill_in "Password", with: user.password From 832f47d6b0bf91d510c3dbad3227bed9dbd5cd96 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 2 Sep 2015 16:58:04 +1000 Subject: [PATCH 04/30] fix i18n typo --- app/views/shopping_shared/_contact.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shopping_shared/_contact.html.haml b/app/views/shopping_shared/_contact.html.haml index ac7783fda8..a88c421270 100644 --- a/app/views/shopping_shared/_contact.html.haml +++ b/app/views/shopping_shared/_contact.html.haml @@ -21,7 +21,7 @@ - if current_distributor.website || current_distributor.email %div.center .header - = t :shopping_contact_contact + = t :shopping_contact_web %p - unless current_distributor.website.blank? %a{href: "http://#{current_distributor.website}", target: "_blank" } From e61abb92d29a328254b36c903b49083af65298be Mon Sep 17 00:00:00 2001 From: sigmundpetersen Date: Thu, 3 Sep 2015 12:16:58 +0200 Subject: [PATCH 05/30] Create no.yml --- config/locales/no.yml | 456 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 456 insertions(+) create mode 100644 config/locales/no.yml diff --git a/config/locales/no.yml b/config/locales/no.yml new file mode 100644 index 0000000000..bc1a8d272c --- /dev/null +++ b/config/locales/no.yml @@ -0,0 +1,456 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +en: + devise: + failure: + invalid: | + Invalid email or password. + Were you a guest last time? Perhaps you need to create an account or reset your password. + enterprise_confirmations: + enterprise: + confirmed: Thankyou, your email address has been confirmed. + not_confirmed: Your email address could not be confirmed. Perhaps you have already completed this step? + confirmation_sent: "Confirmation email sent!" + confirmation_not_sent: "Could not send a confirmation email." + home: "OFN" + title: Open Food Network + welcome_to: 'Welcome to ' + search_by_name: Search by name or suburb... + producers: Aussie Producers + producers_join: Australian producers are now welcome to join the Open Food Network. + charges_sales_tax: Charges GST? + + logo: "Logo (640x130)" + logo_mobile: "Mobile logo (75x26)" + logo_mobile_svg: "Mobile logo (SVG)" + home_hero: "Hero image" + home_show_stats: "Show statistics" + footer_logo: "Logo (220x76)" + footer_facebook_url: "Facebook URL" + footer_twitter_url: "Twitter URL" + footer_instagram_url: "Instagram URL" + footer_linkedin_url: "LinkedIn URL" + footer_googleplus_url: "Google Plus URL" + footer_pinterest_url: "Pinterest URL" + footer_email: "Email" + footer_links_md: "Links" + footer_about_url: "About URL" + footer_tos_url: "Terms of Service URL" + + name: Name + first_name: First Name + last_name: Last Name + email: Email + phone: Phone + next: Next + address: Address + address2: Address (contd.) + city: City + state: State + postcode: Postcode + country: Country + unauthorized: Unauthorized + terms_of_service: "Terms of service" + on_demand: On demand + none: None + + alert_selling_on_ofn: "Interested in selling food on the Open Food Network?" + alert_start_here: "Start here" + label_shops: "Shops" + label_map: "Map" + label_producers: "Producers" + label_groups: "Groups" + label_about: "About" + label_shopping: "Shopping" + label_login: "Login" + label_logout: "Logout" + label_signup: "Sign up" + label_administration: "Administration" + label_admin: "Admin" + label_account: "Account" + label_more: "More" + label_less: "Show less" + + items: "items" + cart_headline: "Your shopping cart" + total: "Total" + checkout: "Checkout now" + cart_updating: "Updating cart..." + cart_empty: "Cart empty" + cart_edit: "Edit your cart" + + card_number: Card Number + card_securitycode: "Security Code" + card_expiry_date: Expiry Date + + ofn_cart_headline: "Current cart for:" + ofn_cart_distributor: "Distributor:" + ofn_cart_oc: "Order cycle:" + ofn_cart_from: "From:" + ofn_cart_to: "To:" + ofn_cart_product: "Product:" + ofn_cart_quantitiy: "Quantity:" + ofn_cart_send: "Buy me" + + ie_warning_headline: "Your browser is out of date :-(" + ie_warning_text: "For the best Open Food Network experience, we strongly recommend upgrading your browser:" + ie_warning_chrome: Download Chrome + ie_warning_firefox: Download Firefox + ie_warning_ie: Upgrade Internet Explorer + ie_warning_other: "Can't upgrade your browser? Try Open Food Network on your smartphone :-)" + + footer_global_headline: "OFN Global" + footer_global_home: "Home" + footer_global_news: "News" + footer_global_about: "About" + footer_global_contact: "Contact" + + footer_sites_headline: "OFN Sites" + footer_sites_developer: "Developer" + footer_sites_community: "Community" + footer_sites_userguide: "User Guide" + + footer_secure: "Secure and trusted." + footer_secure_text: "Open Food Network uses SSL encryption (2048 bit RSA) everywhere to keep your shopping and payment information private. Our servers do not store your credit card details and payments are processed by PCI-compliant services." + + footer_contact_headline: "Keep in touch" + footer_contact_email: "Email us" + + footer_nav_headline: "Navigate" + footer_join_headline: "Join us" + footer_join_producers: "Producers sign-up" + footer_join_hubs: "Hubs sign-up" + footer_join_groups: "Groups sign-up" + footer_join_partners: "Food systems partners" + + footer_legal_call: "Read our" + footer_legal_tos: "Terms & conditions" + footer_legal_visit: "Find us on" + footer_legal_text: "Open Food Network is a free and open source software platform. Our content is licensed with" + footer_legal_text2: "and our code with" + footer_legal_license_content: "CC BY-SA 3.0" + footer_legal_license_code: "AGPL 3" + + home_shop: Shop Now + + brandstory_headline: "Food, unincorporated." + brandstory_intro: "Sometimes the best way to fix the system is to start a new one…" + brandstory_part1: "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 seriously change the world." + brandstory_part2: "Then we need a way to make it real. A way to empower everyone who grows, sells and buys food. A way to tell all the stories, to handle all the logistics. A way to turn transaction into transformation every day." + brandstory_part3: "So we build an online marketplace that levels the playing field. It’s transparent, so it creates real relationships. It’s open source, so it’s owned by everyone. It scales to regions and nations, so people start versions across the world." + brandstory_part4: "It works everywhere. It changes everything." + brandstory_part5_strong: "We call it Open Food Network." + brandstory_part6: "We all love food. Now we can love our food system too." + + system_headline: "Here's how it works." + system_step1: "1. Search" + system_step1_text: "Search our diverse, independent shops for seasonal local food. Search by neighbourhood and food category, or whether you prefer delivery or pickup." + system_step2: "2. Shop" + system_step2_text: "Transform your transactions with affordable local food from diverse producers and hubs. Know the stories behind your food and the people who make it!" + system_step3: "3. Pick-up / Delivery" + system_step3_text: "Hang on for your delivery, or visit your producer or hub for a more personal connection with your food. Food shopping as diverse as nature intended it." + + cta_headline: "Shopping that makes the world a better place." + cta_label: "I'm Ready" + + stats_headline: "We're creating a new food system." + stats_producers: "food producers" + stats_shops: "food shops" + stats_shoppers: "food shoppers" + stats_orders: "food orders" + + checkout_title: Checkout + checkout_now: Checkout now + checkout_order_ready: Order ready for + checkout_hide: Hide + checkout_expand: Expand + checkout_headline: "Ok, ready to checkout?" + checkout_as_guest: "Checkout as guest" + checkout_details: "Your details" + checkout_billing: "Billing info" + checkout_shipping: Shipping info + checkout_method_free: Free + checkout_address_same: Shipping address same as billing address? + checkout_ready_for: "Ready for:" + checkout_instructions: "Any comments or special instructions?" + checkout_payment: Payment + checkout_send: Place order now + checkout_your_order: Your order + checkout_cart_total: Cart total + checkout_shipping_price: Shipping + checkout_total_price: Total + checkout_back_to_cart: "Back to Cart" + + order_paid: PAID + order_not_paid: NOT PAID + order_total: Total order + order_payment: "Paying via:" + order_billing_address: Billing address + order_delivery_on: Delivery on + order_delivery_address: Delivery address + order_special_instructions: "Your notes:" + order_pickup_instructions: Collection Instructions + order_produce: Produce + order_total_price: Total + order_includes_tax: (includes tax) + order_payment_paypal_successful: Your payment via PayPal has been processed successfully. + order_hub_info: Hub Info + + products: "Products" + products_in: "in %{oc}" + products_at: "at %{distributor}" + products_elsewhere: "Products found elsewhere" + + email_welcome: "Welcome" + email_confirmed: "Thank you for confirming your email address." + email_registered: "is now part of" + email_userguide_html: "The User Guide with detailed support for setting up your Producer or Hub is here: +%{link}" + email_admin_html: "You can manage your account by logging into the %{link} or by clicking on the cog in the top right hand side of the homepage, and selecting Administration." + email_community_html: "We also have an online forum for community discussion related to OFN software and the unique challenges of running a food enterprise. You are encouraged to join in. We are constantly evolving and your input into this forum will shape what happens next. +%{link}" + email_help: "If you have any difficulties, check out our FAQs, browse the forum or post a 'Support' topic and someone will help you out!" + email_confirmation_greeting: "Hi, %{contact}!" + email_confirmation_profile_created: "A profile for %{name} has been successfully created! +To activate your Profile we need to confirm this email address." + email_confirmation_click_link: "Please click the link below to confirm your email and to continue setting up your profile." + email_confirmation_link_label: "Confirm this email address »" + email_confirmation_help: "After confirming your email you can access your administration account for this enterprise. +See the %{link} to find out more about %{sitename}'s features and to start using your profile or online store." + email_confirmation_userguide: "User Guide" + email_social: "Connect with Us:" + email_contact: "Email us:" + email_signoff: "Cheers," + email_signature: "%{sitename} Team" + + email_confirm_customer_greeting: "Hi %{name}," + email_confirm_customer_intro_html: "Thanks for shopping at %{distributor}!" + email_confirm_customer_number_html: "Order confirmation #%{number}" + email_confirm_customer_details_html: "Here are your order details from %{distributor}:" + email_confirm_customer_signoff: "Kind regards," + email_confirm_shop_greeting: "Hi %{name}," + email_confirm_shop_order_html: "Well done! You have a new order for %{distributor}!" + email_confirm_shop_number_html: "Order confirmation #%{number}" + email_confirm_shop_order_detail_html: "%{firstname} %{lastname} completed the following order at your shopfront:" + email_order_summary_item: "Item" + email_order_summary_quantity: "Qty" + email_order_summary_price: "Price" + email_order_summary_subtotal: "Subtotal:" + email_order_summary_total: "Total:" + email_payment_paid: PAID + email_payment_not_paid: NOT PAID + email_payment_summary: Payment summary + email_order_summary_method: "Paying via:" + email_shipping_delivery_details: Delivery details + email_shipping_delivery_time: "Delivery on:" + email_shipping_delivery_address: "Delivery address:" + email_shipping_collection_details: Collection details + email_shipping_collection_time: "Ready for collection:" + email_shipping_collection_instructions: "Collection instructions:" + email_special_instructions: "Your notes:" + + email_signup_greeting: Hello! + email_signup_welcome: "Welcome to %{sitename}!" + email_signup_login: Your login + email_signup_email: Your login email is + email_signup_shop_html: "You can start shopping online now at %{link}." + email_signup_text: "Thanks for joining the network. + If you are a customer, we look forward to introducing you to many fantastic farmers, wonderful food hubs and delicious food! + If you are a producer or food enterprise, we are excited to have you as a part of the network." + email_signup_help_html: "We welcome all your questions and feedback; you can use the Send Feedback button on the site or email us at" + + shopping_oc_closed: Orders are closed + shopping_oc_closed_description: "Please wait until the next cycle opens (or contact us directly to see if we can accept any late orders)" + shopping_oc_last_closed: "The last cycle closed %{distance_of_time} ago" + shopping_oc_next_open: "The next cycle opens in %{distance_of_time}" + shopping_tabs_about: "About %{distributor}" + shopping_tabs_contact: "Contact" + shopping_contact_address: "Address" + shopping_contact_web: "Contact" + shopping_contact_social: "Follow" + shopping_groups_part_of: "is part of:" + shopping_producers_of_hub: "%{hub}'s producers:" + + enterprises_next_closing: "Next order closing" + enterprises_ready_for: "Ready for" + enterprises_choose: "Choose when you want your order:" + + hubs_buy: "Shop for:" + hubs_delivery_options: "Delivery options" + hubs_pickup: "Pickup" + hubs_delivery: "Delivery" + hubs_producers: "Our producers" + hubs_filter_by: "Filter by" + hubs_filter_type: "Type" + hubs_filter_delivery: "Delivery" + hubs_matches: "Did you mean?" + hubs_intro: Shop in your local area + hubs_distance: Closest to + hubs_distance_filter: "Show me shops near %{location}" + + products_clear_all: Clear all + products_showing: "Showing:" + products_with: with + products_search: "Search by product or producer" + products_loading: "Loading products..." + products_updating_cart: "Updating cart..." + products_cart_empty: "Cart empty" + products_edit_cart: "Edit your cart" + products_from: from + + search_no_results_html: "Sorry, no results found for %{query}. Try another search?" + + components_profiles_popover: "Profiles do not have a shopfront on the Open Food Network, but may have their own physical or online shop elsewhere" + components_profiles_show: "Show profiles" + components_filters_nofilters: "No filters" + components_filters_clearfilters: "Clear all filters" + + groups_title: Groups + groups_headline: Groups / regions + groups_search: "Search name or keyword" + groups_no_groups: "No groups found" + groups_about: "About Us" + groups_producers: "Our producers" + groups_hubs: "Our hubs" + groups_contact_web: Contact + groups_contact_social: Follow + groups_contact_address: Address + groups_contact_email: Email us + groups_contact_website: Visit our website + groups_contact_facebook: Follow us on Facebook + groups_signup_title: Sign up as a group + groups_signup_headline: Groups sign up + groups_signup_intro: "We're an amazing platform for collaborative marketing, the easiest way for your members and stakeholders to reach new markets. We're non-profit, affordable, and simple." + groups_signup_email: Email us + groups_signup_motivation1: We transform food systems fairly. + groups_signup_motivation2: It's why we get out of bed every day. We're a global non-profit, based on open source code. We play fair. You can always trust us. + groups_signup_motivation3: We know you have big ideas, and we want to help. We'll share our knowledge, networks and resources. We know that isolation doesn't create change, so we'll partner with you. + groups_signup_motivation4: We meet you where you are. + groups_signup_motivation5: You might be an alliance of food hubs, producers, or distributors, and an industry body, or a local government. + groups_signup_motivation6: Whatever your role in your local food movement, we're ready to help. However you come to wonder what Open Food Network would look like or is doing in your part of the world, let's start the conversation. + groups_signup_motivation7: We make food movements make more sense. + groups_signup_motivation8: You need to activate and enable your networks, we offer a platform for conversation and action. You need real engagement. We’ll help reach all the players, all the stakeholders, all the sectors. + groups_signup_motivation9: You need resourcing. We’ll bring all our experience to bear. You need cooperation. We’ll better connect you to a global network of peers. + groups_signup_pricing: Group Account + groups_signup_studies: Case Studies + groups_signup_contact: Ready to discuss? + groups_signup_contact_text: "Get in touch to discover what OFN can do for you:" + groups_signup_detail: "Here's the detail." + + login_invalid: "Invalid email or password" + + modal_hubs: "Food Hubs" + modal_hubs_abstract: Our food hubs are the point of contact between you and the people who make your food! + modal_hubs_content1: You can search for a convenient hub by location or name. Some hubs have multiple points where you can pick-up your purchases, and some will also provide delivery options. Each food hub is a sales point with independent business operations and logistics - so variations between hubs are to be expected. + modal_hubs_content2: You can only shop at one food hub at a time. + + modal_groups: "Groups / Regions" + modal_groups_content1: These are the organisations and relationships between hubs which make up the Open Food Network. + modal_groups_content2: Some groups are clustered by location or council, others by non-geographic similarities. + + modal_how: "How it works" + modal_how_shop: Shop the Open Food Network + modal_how_shop_explained: Search for a food hub near you to start shopping! You can expand each food hub to see what kinds of goodies are available, and click through to start shopping. (You can only shop one food hub at a time.) + modal_how_pickup: Pick-ups, delivery & shipping costs + modal_how_pickup_explained: Some food hubs deliver to your door, while others require you to pick-up your purchases. You can see which options are available on the homepage, and select which you'd like at the shopping and check-out pages. Delivery will cost more, and pricing differs from hub-to-hub. Each food hub is a sales point with independent business operations and logisitics - so variations between hubs are to be expected. + modal_how_more: Learn more + modal_how_more_explained: "If you want to learn more about the Open Food Network, how it works, and get involved, check out:" + + modal_producers: "Producers" + modal_producers_explained: "Our producers make all the delicious food you can shop for on the Open Food Network." + + ocs_choice_hub: "Hub:" + ocs_choice_oc: "Order Cycle:" + ocs_choice_text: "You have not yet picked where you will get your order from." + ocs_closed_headline: Orders are currently closed for this hub + ocs_closed_time: "The last cycle closed %{time} ago." + ocs_closed_contact: "Please contact your hub directly to see if they accept late orders, or wait until the next cycle opens." + ocs_closed_opens: "The next order cycle opens in %{time}" + ocs_closed_email: "Email: %{email}" + ocs_closed_phone: "Phone: %{phone}" + ocs_pickup_time: "Your order will be ready on %{pickup_time}" + ocs_change_date: "Change Collection Date" + ocs_change_date_notice: "(This will reset your cart)" + ocs_close_time: "ORDERS CLOSE" + ocs_when_headline: When do you want your order? + ocs_when_text: No products are displayed until you select a date. + ocs_when_closing: "Closing On" + ocs_when_choose: "Choose Order Cycle" + ocs_list: "List View" + + producers_about: About us + producers_buy: Shop for + producers_contact: Contact + producers_contact_phone: Call + producers_contact_social: Follow + producers_at: "products at:" + producers_filter: Filter by + producers_filter_type: Type + producers_title: Producers + producers_headline: Find local producers + producers_signup_title: Sign up as a producer + producers_signup_headline: Food producers, empowered. + producers_signup_motivation: Sell your food and tell your stories to diverse new markets. Save time and money on every overhead. We support innovation without the risk. We've levelled the playing field. + producers_signup_send: Join now + producers_signup_enterprise: Enterprise Accounts + producers_signup_studies: Stories from our producers. + producers_signup_cta_headline: Join now! + producers_signup_cta_action: Join now + producers_signup_detail: Here's the detail. + + products_item: Item + products_description: Description + products_variant: Variant + products_quantity: Quantity + products_availabel: Available? + products_price: Price + + register_title: Register + + shops_title: Shops + shops_headline: Shopping, transformed. + shops_text: Food grows in cycles, farmers harvest in cycles, and we order food in cycles. If you find an order cycle closed, check back soon. + shops_signup_title: Sign up as a hub + shops_signup_headline: Food hubs, unlimited. + shops_signup_motivation: Whatever your model, we support you. However you change, we're with you. We're non-profit, independent, and open-sourced. We're the software partners you've dreamed of. + shops_signup_action: Join now + shops_signup_pricing: Enterprise Accounts + shops_signup_stories: Stories from our hubs. + shops_signup_help: We're ready to help. + shops_signup_help_text: You need a better return. You need new buyers and logistics partners. You need your story told across wholesale, retail, and the kitchen table. + shops_signup_detail: Here's the detail. + + orders_fees: Fees... + orders_edit_title: Shopping Cart + orders_edit_headline: Your shopping cart + orders_edit_time: Order ready for + orders_edit_continue: Continue shopping + orders_edit_checkout: Checkout + orders_form_empty_cart: "Empty cart" + orders_form_subtotal: Produce subtotal + orders_form_admin: Admin & handling + orders_form_subtotal: Total + orders_oc_expired_headline: Orders have closed for this order cycle + orders_oc_expired_text: "Sorry, orders for this order cycle closed %{time} ago! Please contact your hub directly to see if they can accept late orders." + orders_oc_expired_text_others_html: "Sorry, orders for this order cycle closed %{time} ago! Please contact your hub directly to see if they can accept late orders %{link}." + orders_oc_expired_text_link: "or see the other order cycles available at this hub" + orders_oc_expired_email: "Email:" + orders_oc_expired_phone: "Phone:" + orders_show_title: Order Confirmation + orders_show_time: Order ready on + orders_show_number: Order confirmation + + products_cart_distributor_choice: "Distributor for your order:" + products_cart_distributor_change: "Your distributor for this order will be changed to %{name} if you add this product to your cart." + products_cart_distributor_is: "Your distributor for this order is %{name}." + products_distributor_error: "Please complete your order at %{link} before shopping with another distributor." + products_oc: "Order cycle for your order:" + products_oc_change: "Your order cycle for this order will be changed to %{name} if you add this product to your cart." + products_oc_is: "Your order cycle for this order is %{name}." + products_oc_error: "Please complete your order from %{link} before shopping in a different order cycle." + products_oc_current: "your current order cycle" + products_quantity: Quantity + products_max_quantity: Max quantity + products_distributor: Distributor + products_distributor_info: When you select a distributor for your order, their address and pickup times will be displayed here. From 4f0e75893e2528ec193f0fd6ce219a6f70ae3628 Mon Sep 17 00:00:00 2001 From: Myriam Date: Fri, 4 Sep 2015 15:22:19 +0200 Subject: [PATCH 06/30] Create fr.yml --- config/locales/fr.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 config/locales/fr.yml diff --git a/config/locales/fr.yml b/config/locales/fr.yml new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/config/locales/fr.yml @@ -0,0 +1 @@ + From 3e53decd851e09bde74daedce384ee11f831e681 Mon Sep 17 00:00:00 2001 From: Myriam Date: Fri, 4 Sep 2015 15:25:53 +0200 Subject: [PATCH 07/30] Delete fr.yml --- config/locales/fr.yml | 1 - 1 file changed, 1 deletion(-) delete mode 100644 config/locales/fr.yml diff --git a/config/locales/fr.yml b/config/locales/fr.yml deleted file mode 100644 index 8b13789179..0000000000 --- a/config/locales/fr.yml +++ /dev/null @@ -1 +0,0 @@ - From 11892ffe21f73cda61d709a2d8baeb966c0f0897 Mon Sep 17 00:00:00 2001 From: Myriam Date: Mon, 14 Sep 2015 14:42:37 +0200 Subject: [PATCH 08/30] creation of the french translation file --- config/locales/fr.yml | 456 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 456 insertions(+) create mode 100644 config/locales/fr.yml diff --git a/config/locales/fr.yml b/config/locales/fr.yml new file mode 100644 index 0000000000..b6605cbeed --- /dev/null +++ b/config/locales/fr.yml @@ -0,0 +1,456 @@ +# Localization file for French. +# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +en: + devise: + failure: + invalid: | + Email / mot de passe incorrect. + Créez votre compte ou réinitialisez votre mot de passe. + enterprise_confirmations: + enterprise: + confirmed: Merci, votre adresse email est confirmée. + not_confirmed: Votre adresse email n'a pas pu être confirmée. Peut-être l'aviez-vous déjà confirmée? + confirmation_sent: "Un mail de confirmation a été envoyé!" + confirmation_not_sent: "Impossible d'envoyer le mail de confirmation." + home: "OFN" + title: Open Food France + welcome_to: 'Bienvenue sur ' + search_by_name: Recherche pas nom ou région... + producers: Producteurs & hubs + producers_join: Les producteurs et autres hubs basés en France sont invités à rejoindre Open Food France. + charges_sales_tax: Soumis à la TVA? + + logo: "Logo (640x130)" + logo_mobile: "Logo smartphone (75x26)" + logo_mobile_svg: "Logo smartphone (SVG)" + home_hero: "Bannière" + home_show_stats: "Afficher statistiques" + footer_logo: "Logo (220x76)" + footer_facebook_url: "Facebook URL" + footer_twitter_url: "Twitter URL" + footer_instagram_url: "Instagram URL" + footer_linkedin_url: "LinkedIn URL" + footer_googleplus_url: "Google Plus URL" + footer_pinterest_url: "Pinterest URL" + footer_email: "Email" + footer_links_md: "Liens" + footer_about_url: "A propos URL" + footer_tos_url: "Conditions d'utilisation URL" + + name: Nom + first_name: Prénom + last_name: Nom de famille + email: Email + phone: Téléphone + next: Suivant + address: Adresse + address2: Adresse (suite) + city: Ville + state: Région + postcode: Code postal + country: Pays + unauthorized: Non authorisé + terms_of_service: "Conditions d'utilisation" + on_demand: A volonté + none: Aucun + + alert_selling_on_ofn: "Vous souhaitez proposer votre produits sur Open Food France?" + alert_start_here: "Démarrez ici" + label_shops: "Boutiques" + label_map: "Carte" + label_producers: "Producteurs" + label_groups: "Groupes" + label_about: "A propos" + label_shopping: "Achats" + label_login: "Login" + label_logout: "Logout" + label_signup: "Inscription" + label_administration: "Administration" + label_admin: "Admin" + label_account: "Compte" + label_more: "Afficher" + label_less: "Masquer" + + items: "produits" + cart_headline: "Votre panier" + total: "Total" + checkout: "Régler la commande" + cart_updating: "Mettre à jour le panier" + cart_empty: "Panier vide" + cart_edit: "Modifier votre panier" + + card_number: Numéro de carte + card_securitycode: "Cryptogramme visuel" + card_expiry_date: Date d'expiration + + ofn_cart_headline: "Panier actuel pour:" + ofn_cart_distributor: "Distributeur:" + ofn_cart_oc: "Cycle de vente:" + ofn_cart_from: "De:" + ofn_cart_to: "Pour:" + ofn_cart_product: "Produit:" + ofn_cart_quantitiy: "Quantité:" + ofn_cart_send: "Acheter" + + ie_warning_headline: "Votre navigateur n'est pas à jour :-(" + ie_warning_text: "Pour une expérience optimale sur Open Food France, nous vous recommandons fortement de mettre à jour votre navigateur:" + ie_warning_chrome: Télécharger Chrome + ie_warning_firefox: Télécharger Firefox + ie_warning_ie: Mettre à jour Internet Explorer + ie_warning_other: "Impossible de mettre à jour votre navigateur? Essayez Open Food France sur votre smartphone :-)" + + footer_global_headline: "OFN Global" + footer_global_home: "Accueil" + footer_global_news: "News" + footer_global_about: "A propos" + footer_global_contact: "Contact" + + footer_sites_headline: "Sites OFN" + footer_sites_developer: "Developpeur" + footer_sites_community: "Communauté" + footer_sites_userguide: "Guide utilisateur" + + footer_secure: "Fiable et sécurisé." + footer_secure_text: "Open Food France utilise un certificat type SSL (2048 bit RSA) pour garantir la confidentialité de votre commandes et données bancaires. Nos serveurs ne conservent pas vos données bancaires et les paiements sont effectués conformément aux normes de sécurité PCI." + + footer_contact_headline: "Restez en contact" + footer_contact_email: "Nous écrire" + + footer_nav_headline: "Naviguer" + footer_join_headline: "Nous rejoindre" + footer_join_producers: "Inscription producteurs" + footer_join_hubs: "Inscription hubs" + footer_join_groups: "Inscription groupes" + footer_join_partners: "Partenaires" + + footer_legal_call: "Lire notre/nos" + footer_legal_tos: "Termes & conditions" + footer_legal_visit: "Nous trouver sur" + footer_legal_text: "Open Food Network est une plateforme logicielle open source, libre et gratuite. Nos données sont protégées sous licence" + footer_legal_text2: "et notre code sous" + footer_legal_license_content: "CC BY-SA 3.0" + footer_legal_license_code: "AGPL 3" + + home_shop: Faire mes courses + + brandstory_headline: "Des aliments, non centralisés." + brandstory_intro: "Parfois, le meilleur moyen de réparer le système, c'est d'en inventer un autre..." + brandstory_part1: "Nous commençons à partir du sol. Avec des paysans, agriculteurs, producteurs prêts à raconter leurs histoires avec fierté et en toute transparence. Avec des distributeurs prêts à connecter les gens aux produits de manière équitable et honnête. Avec des acheteurs qui croient que de meilleures décisions d'achats peuvent véritablement changer le monde." + brandstory_part2: "Ensuite, nous avons besoin d'un moyen pour rendre tout ça réel. Un moyen de redonner le pouvoir à ceux qui cultivent, vendent et achètent la nourriture. Un moyen de raconter les histoires, de gérer la logistique. Un moyen de transformer chaque jour les transactions en transformation." + brandstory_part3: "Alors, nous construisons un marché en ligne pour niveller le terrain de jeu. Il est transparent, de sorte qu'il crée de vraies relations. Il est open source, donc possédé par tout le monde. Il se déploie aux échelles régionales et nationales, et des gens lancent de multiples versions à travers le monde." + brandstory_part4: "Il fonctionne partout. Il change tout." + brandstory_part5_strong: "Il s'appelle Open Food Network." + brandstory_part6: "Nous aimons notre nourriture. Maintenant nous pouvons aussi aimer notre système alimentaire." + + system_headline: "Comment ça marche?" + system_step1: "1. Recherche" + system_step1_text: "Recherchez parmi nos multiples boutiques indépendantes pour des produits locaux et de saison. Filtrez pas quartier ou catégorie de produits, ou si vous préférez une option livraison ou retrait." + system_step2: "2. Achat" + system_step2_text: "Transformez vos achats en choisissant des produits locaux et abordables, proposés par les divers producteurs et hubs. Découvrez les histoires et les personnes qui se cachent derrière les produits!" + system_step3: "3. Retrait / Livraison" + system_step3_text: "Réceptionnez vos produits à domicile, ou rendez vous chez votre producteur ou hub pour un lien plus personnel avec votre nourriture. Des expériences d'achat de nourriture aussi diverses que la nature l'a souhaitée." + + cta_headline: "Des achats qui rendent le monde un peu meilleur." + cta_label: "Je suis prêt" + + stats_headline: "Nous créons un nouveau système alimentaire." + stats_producers: "agriculteurs et producteurs" + stats_shops: "boutiques" + stats_shoppers: "acheteurs" + stats_orders: "commandes" + + checkout_title: Paiement + checkout_now: Régler la commande + checkout_order_ready: Commande prête pour + checkout_hide: Masquer + checkout_expand: Afficher + checkout_headline: "Ok, prêt pour le paiement?" + checkout_as_guest: "Régler en mode invité" + checkout_details: "Vos informations" + checkout_billing: "Informations de paiement" + checkout_shipping: Informations de livraison + checkout_method_free: Gratuit + checkout_address_same: Adresse de livraison identique à l'adresse de facturation? + checkout_ready_for: "Prêt pour:" + checkout_instructions: "Commentaires ou demandes spécifiques?" + checkout_payment: Paiement + checkout_send: Passer la commande + checkout_your_order: Votre commande + checkout_cart_total: Panier total + checkout_shipping_price: Livraison + checkout_total_price: Total + checkout_back_to_cart: "Retour au Panier" + + order_paid: RÉGLÉ + order_not_paid: NON RÉGLÉ + order_total: Total commande + order_payment: "Payer via:" + order_billing_address: Adresse de facturation + order_delivery_on: Livraison prévue + order_delivery_address: Adresse de livraison + order_special_instructions: "Vos commentaires:" + order_pickup_instructions: Instructions de retrait + order_produce: Produit + order_total_price: Total + order_includes_tax: (TVA inclue) + order_payment_paypal_successful: Votre paiement via PayPal a été réalisé avec succès. + order_hub_info: Hub Info + + products: "Produits" + products_in: "dans %{oc}" + products_at: "à %{distributor}" + products_elsewhere: "Produits trouvés ailleurs" + + email_welcome: "Bienvenue" + email_confirmed: "Veuillez confirmer votre adresse email." + email_registered: "fait maintenant partie de" + email_userguide_html: "Le Guide Utilisateur expliquant comment mettre en place son profil producteur ou son hub est accessible ici: +%{link}" + email_admin_html: "Vous pouvez gérer votre compte en vous connectant ici %{link} ou en cliquant sur la roue en haut à droite de la page d'accueil et en sélectionnant Administration." + email_community_html: "Nous avons aussi un forum de discussion en ligne (en anglais) pour échanger avec la communauté sur des questions liées au logiciel OFN et aux défis de la gestion d'un food hub. Nous vous invitons à y participer. Nous sommes en constante évolution et vos contributions à ce forum vont façonner les prochaines étapes. +%{link}" + email_help: "En cas de difficulté, consultez notre FAQ, parcourez le forum (en anglais) ou postez un message dans la section 'Support' et quelqu'un viendra vous aider!" + email_confirmation_greeting: "Bonjour %{contact}!" + email_confirmation_profile_created: "Le profil pour %{name} a été créé avec succès! +Pour activer votre Profil nous devons vérifier cette adresse email." + email_confirmation_click_link: "Veuillez cliquer sur le lien ci-dessous pour confirmer votre email et continuer la configuration de votre compte." + email_confirmation_link_label: "Confirmer cette adresse email »" + email_confirmation_help: "Après avoir confirmé votre adresse email vous pouvez accéder au compte d'administration de cette entreprise. +Voir le %{link} pour en savoir plus sur les fonctionnalités de %{sitename} et commencer à utiliser votre profil ou votre boutique en ligne." + email_confirmation_userguide: "Guide Utilisateur" + email_social: "Nous suivre:" + email_contact: "Nous écrire:" + email_signoff: "Cordialement," + email_signature: "L'équipe %{sitename}" + + email_confirm_customer_greeting: "Bonjour %{name}," + email_confirm_customer_intro_html: "Merci d'avoir passé commande chez %{distributor}!" + email_confirm_customer_number_html: "Confirmation de commande #%{number}" + email_confirm_customer_details_html: "Détails de votre commande chez %{distributor}:" + email_confirm_customer_signoff: "Cordialement," + email_confirm_shop_greeting: "Bonjour %{name}," + email_confirm_shop_order_html: "Bravo! Vous avez reçu une nouvelle commande pour %{distributor}!" + email_confirm_shop_number_html: "Confirmation de commande #%{number}" + email_confirm_shop_order_detail_html: "%{firstname} %{lastname} a passé la commande suivante sur votre boutique en ligne:" + email_order_summary_item: "Produit" + email_order_summary_quantity: "Qté" + email_order_summary_price: "Prix" + email_order_summary_subtotal: "Sous-total:" + email_order_summary_total: "Total:" + email_payment_paid: RÉGLÉ + email_payment_not_paid: NON RÉGLÉ + email_payment_summary: Résumé du paiement + email_order_summary_method: "Payé via:" + email_shipping_delivery_details: Détails de livraison + email_shipping_delivery_time: "Livré le:" + email_shipping_delivery_address: "Adresse de livraison:" + email_shipping_collection_details: Détails de retrait + email_shipping_collection_time: "Prêt pour retrait:" + email_shipping_collection_instructions: "Instructions de retrait:" + email_special_instructions: "Vos commentaires:" + + email_signup_greeting: Bonjour! + email_signup_welcome: "Bienvenue sur %{sitename}!" + email_signup_login: Votre login + email_signup_email: Votre email de connexion est + email_signup_shop_html: "Vous pouvez maintenant commencer vos achats sur %{link}." + email_signup_text: "Merci d'avoir rejoint le réseau. + Si vous êtes un client, nous sommes impatients de vous faire découvrir de nombreux agriculteurs fantastiques, de merveilleux hubs de distribution et des plats délicieux! + Si vous êtes un producteur ou autre entreprise alimentaire, nous sommes ravis de vous compter parmi les membres du réseau." + email_signup_help_html: "Vos questions et suggestions sont les bienvenues; vous pouvez utiliser le bouton Envoyer un commentaire sur le site ou envoyez-nous un email à" + + shopping_oc_closed: La boutique est actuellement fermée + shopping_oc_closed_description: "Veuillez attendre l'ouverture du prochain cycle de vente (ou contactez-nous directement pour voir si nous pouvez accépter une commande tardive)" + shopping_oc_last_closed: "Le dernier cycle de vente s'est terminé il y a %{distance_of_time}" + shopping_oc_next_open: "Le prochain cycle de vente ouvrira dans %{distance_of_time}" + shopping_tabs_about: "A propos de %{distributor}" + shopping_tabs_contact: "Contact" + shopping_contact_address: "Adresse" + shopping_contact_web: "Contact" + shopping_contact_social: "Suivre" + shopping_groups_part_of: "fait partie de:" + shopping_producers_of_hub: "Les producteurs de %{hub}:" + + enterprises_next_closing: "Prochaine commande à passer avant" + enterprises_ready_for: "Prêt pour" + enterprises_choose: "Choisissez votre date de commande:" + + hubs_buy: "Acheter pour:" + hubs_delivery_options: "Options de livraison" + hubs_pickup: "Retrait" + hubs_delivery: "Livraison" + hubs_producers: "Nos producteurs" + hubs_filter_by: "Filtrer par" + hubs_filter_type: "Type" + hubs_filter_delivery: "Livraison" + hubs_matches: "Vous voulez dire?" + hubs_intro: Passez commande près de chez vous + hubs_distance: Le plus près de + hubs_distance_filter: "Afficher les boutiques près de %{location}" + + products_clear_all: Vider + products_showing: "Afficher:" + products_with: avec + products_search: "Recherche par produit ou producteur" + products_loading: "Produits en cours de chargement..." + products_updating_cart: "Actualisation du panier..." + products_cart_empty: "Panier vide" + products_edit_cart: "Modifier votre panier" + products_from: de + + search_no_results_html: "Désolé, aucun résultat pour %{query}. Autre recherche?" + + components_profiles_popover: "Cette entreprise n'a pas de boutique en ligne sur Open Food France, mais peut-être a-t-elle une boutique physique ou en ligne quelque part" + components_profiles_show: "Afficher les résultats" + components_filters_nofilters: "Pas de filtre" + components_filters_clearfilters: "Vider les filtres" + + groups_title: Groupes + groups_headline: Groupes / territoires + groups_search: "Techerche par nom ou mot-clé" + groups_no_groups: "Aucun groupe trouvé" + groups_about: "A propos" + groups_producers: "Nos producteurs" + groups_hubs: "Nos hubs" + groups_contact_web: Contact + groups_contact_social: Suivre + groups_contact_address: Adresse + groups_contact_email: Nous écrire + groups_contact_website: Visiter notre site web + groups_contact_facebook: Nous suivre sur Facebook + groups_signup_title: S'inscrire en tant que groupe + groups_signup_headline: Inscription groupe + groups_signup_intro: "Nous sommes une plate-forme très efficace pour le marketing collaboratif, une excellente manière pour vos membres et parties prenantes d'atteindre de nouveaux marchés. Nous sommes à but non lucratif, abordable et simple." + groups_signup_email: Nous écrire + groups_signup_motivation1: Nous transformons les systèmes alimentaires pour remettre de l'équité dans les échanges. + groups_signup_motivation2: C'est pourquoi nous sortons du lit chaque matin. Nous sommes une organisation à but non lucratif, basée sur un code source ouvert. Nous opérons en toute transparence. + groups_signup_motivation3: Vous avez de belles idées, et nous voulons vous aider. Nous partageons nos connaissances, réseaux et ressources. Nous savons que l'isolement ne crée pas le changement, alors coopérons. + groups_signup_motivation4: Nous venons à votre rencontrer. + groups_signup_motivation5: Vous êtes un réseau de circuits de distribution alternatifs, de producteurs, de distributeurs, une administration liée à l'industrie alimentaire ou une autorité locale? + groups_signup_motivation6: Quel que soit votre rôle dans la relocalisation des systèmes alimentaires, nous sommes prêts à vous soutenir. Si vous vous demandez à quoi Open Food Network ressemble / pourrait ressembler dans votre coin du monde, contactez-nous. + groups_signup_motivation7: Nous contribuons à remettre du sens dans les systèmes alimentaires. + groups_signup_motivation8: Vous avez besoin de connecter et d'outiller vos réseaux, nous offrons une plate-forme pour la coopération et l'action. Vous souhaitez de l'engagement. Nous vous aidons à atteindre les acteurs, les parties-prenantes, les secteurs. + groups_signup_motivation9: Vous avez besoin de ressources. Nous mettons à votre service notre expérience. Vous avez besoin de coopération. Nous vous connectons à un large réseau d'acteurs et d'organisations soeurs partout dans le monde. + groups_signup_pricing: Compte Groupe + groups_signup_studies: Etudes de cas + groups_signup_contact: Vous voulez discuter? + groups_signup_contact_text: "Prenez contact et découvrez ce qu'Open Food France peut faire pour vous:" + groups_signup_detail: "Plus de précisions." + + login_invalid: "Email ou mot de passe erroné" + + modal_hubs: "Food Hubs" + modal_hubs_abstract: Nos food hubs sont les points de contact entre vous et les personnes qui produisent votre nourriture! + modal_hubs_content1: Vous pouvez chercher le hub qui vous convient par localisation ou par nom. Certains hubs ont de multiples points de retrait de vos achats, et certains proposent également la livraison à domicile. Chaque food hub est un point de vente et gère de façon indépendante ses opérations et sa logistique - attendez-vous donc à des disparités de fonctionnement entre les hubs. + modal_hubs_content2: Vous pouvez uniquement faire vos courses dans un hub à la fois. + + modal_groups: "Groupes / Territoires" + modal_groups_content1: Voilà les organisations et les relations inter-hubs qui constituent l'Open Food Network. + modal_groups_content2: Certains groupes sont regroupés pas localisation ou région, d'autres sur des smilitudes non géographiques. + + modal_how: "Comment ça marche" + modal_how_shop: Faire vos courses sur Open Food France + modal_how_shop_explained: Recherchez un food hub près de chez vous et commencez vos achats! Vous pouvez afficher plus d'infos sur chaque food hub pour voir le type de produits qu'il propose, et cliquer sur le hub pour commencer vos achats. (Vous ne pouvez faire vos courses que dans un food hub à la fois.) + modal_how_pickup: Frais de retraits, livraison, transport + modal_how_pickup_explained: Certains food hubs livrent à domicile, d'autres vous demandent de venir récupérer vos achats dans un point de retrait. Vous pouvez voir quelle options sont proposées sur la page d'accueil du hub, et sélectionner votre choix au moment de la validation de la commande. La livraison à domicile coûtera souvent plus cher, et les prix diffèrent selon le hub. Chaque food hub est un point de vente et gère de façon indépendante ses opérations et sa logistique - attendez-vous donc à des disparités de fonctionnement entre les hubs. + modal_how_more: En savoir plus + modal_how_more_explained: "Pour en savoir plus sur Open Food France, comment ça marche, et contribuer, allez voir:" + + modal_producers: "Producteurs" + modal_producers_explained: "Nos producteurs font pousser et fabriquent tous les délicieux produits que vous pouvez acheter sur Open Food France." + + ocs_choice_hub: "Hub:" + ocs_choice_oc: "Cycle de vente:" + ocs_choice_text: "Vous n'avez pas encore sélectionné votre point de retrait." + ocs_closed_headline: La boutique est actuellement fermée + ocs_closed_time: "Le dernier cycle de vente s'est terminé il y a %{time}." + ocs_closed_contact: "Veuillez contacter le hub en direct pour voir s'il accepte des commandes tardives, ou patientez jusqu'à l'ouverture du prochain cycle de vente." + ocs_closed_opens: "Le prochain cycle de vente commence dans %{time}" + ocs_closed_email: "Email: %{email}" + ocs_closed_phone: "Téléphone: %{phone}" + ocs_pickup_time: "Votre commande sera prête pour %{pickup_time}" + ocs_change_date: "Changer la date de retrait" + ocs_change_date_notice: "(Votre panier sera vidé)" + ocs_close_time: "BOUTIQUE FERMÉE" + ocs_when_headline: Quand voulez-vous commander? + ocs_when_text: Les produits s'afficheront quand vous aurez sélectionné une date. + ocs_when_closing: "Fermera" + ocs_when_choose: "Choisir le cycle de vente" + ocs_list: "Afficher la liste" + + producers_about: A propos + producers_buy: Faire ses courses pour + producers_contact: Contact + producers_contact_phone: Appeler + producers_contact_social: Suivre + producers_at: "produits à:" + producers_filter: Filtrer par + producers_filter_type: Type + producers_title: Producteurs + producers_headline: Trouver un producteur local + producers_signup_title: S'inscrire en tant que producteur + producers_signup_headline: Des producteurs, indépendants + producers_signup_motivation: Vendez vos produits et racontez vos histoires pour toucher de nouveaux marchés. Gagnez du temps et de l'argent sur la gestion des opérations courantes. Vous pouvez innover sans prendre de risque. Nous nivellons le terrain de jeu pour des échanges plus équitables. + producers_signup_send: Rejoindre le réseau + producers_signup_enterprise: Comptes organisation + producers_signup_studies: Les histoires de nos producteurs. + producers_signup_cta_headline: Rejoindre le réseau! + producers_signup_cta_action: Rejoindre le réseau + producers_signup_detail: Voilà comment. + + products_item: Produit + products_description: Description + products_variant: Variante + products_quantity: Quantité + products_availabel: En stock? + products_price: Prix + + register_title: S'inscrire + + shops_title: Boutiques + shops_headline: Des achats, transformés. + shops_text: Les aliments poussent selon des cycles naturels, les fermiers récoltent en cycles, et ici, nous achetons aussi en cycles. Si un cycle de vente est terminé, attendez le suivant ou demandez des infos au hub. + shops_signup_title: S'inscrire en tant que hub + shops_signup_headline: Food hubs, une infinité de possibilités. + shops_signup_motivation: Quel que soit votre modèle, nous vous apportons notre support. Si vous voulez changez, nous sommes à vos côtés. Nous sommes une organisation à but non lucratif, independante, et open-source. Nous sommes le partenaire système dont vous avez rêvé. + shops_signup_action: Rejoindre le réseau + shops_signup_pricing: Comptes organisations + shops_signup_stories: Histoires de hubs. + shops_signup_help: Nous sommes prêts à vous aider. + shops_signup_help_text: Vous avez besoin d'efficacité. Vous avez besoin de nouveaux acheteurs et de partenaires logistiques. Vous souhaitez que votre histoire soit racontée tout au long du circuit de distribution, jusqu'à la table à manger. + shops_signup_detail: Voilà comment. + + orders_fees: Frais... + orders_edit_title: Panier + orders_edit_headline: Votre panier + orders_edit_time: Commande prête pour + orders_edit_continue: Poursuivre mes achats + orders_edit_checkout: Régler ma commande + orders_form_empty_cart: "Panier vide" + orders_form_subtotal: Sous-total produits + orders_form_admin: Admin & opérations + orders_form_subtotal: Total + orders_oc_expired_headline: Les commandes ne sont plus possibles pour ce cycle de vente. + orders_oc_expired_text: "Désolé, les commandes pour ce cycle de vente ont été clôturées il y a %{time}! Veuillez contacter directement le hub pour voir s'il accepte les commandes tardives." + orders_oc_expired_text_others_html: "Désolé, les commandes pour ce cycle de vente ont été clôturées il y a %{time}! Veuillez contacter directement le hub pour voir s'il accepte les commandes tardives %{link}." + orders_oc_expired_text_link: "ou voir si d'autres cycles de vente sont ouverts pour ce hub" + orders_oc_expired_email: "Email:" + orders_oc_expired_phone: "Téléphone:" + orders_show_title: Confirmation de commande + orders_show_time: Commande prête pour + orders_show_number: Confirmation de commande + + products_cart_distributor_choice: "Distributeur pour votre commande:" + products_cart_distributor_change: "Vore distributeur pour cette commande sera dorénavant %{name} si vous ajoutez ce produit à votre panier." + products_cart_distributor_is: "Votre distributeur pour cette commande est %{name}." + products_distributor_error: "Terminez votre commande chez %{link} avant de faire vos courses chez un autre distributeur." + products_oc: "Cycle de vente pour votre commande:" + products_oc_change: "Votre cycle de vente pour cette commande sera dorénavant %{name} si vous ajoutez ce produit à votre panier." + products_oc_is: "Votre cycle de vente pour cette commande est %{name}." + products_oc_error: "Veuillez terminer votre commande pour %{link} avant de faire vos courses pour un autre cycle de vente." + products_oc_current: "votre cycle de vente actuel" + products_quantity: Quantité + products_max_quantity: Quantité max + products_distributor: Distributeur + products_distributor_info: Quand vous choisissez un distributeur pour votre commande, les adresse et date de retrait seront affichées ici. From 2e591b98e126e828dbe70f1cdbf0d8a6e9198964 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 2 Sep 2015 15:00:14 +1000 Subject: [PATCH 09/30] remove unused javascript --- app/assets/javascripts/distributors.js.coffee | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 app/assets/javascripts/distributors.js.coffee diff --git a/app/assets/javascripts/distributors.js.coffee b/app/assets/javascripts/distributors.js.coffee deleted file mode 100644 index 761567942f..0000000000 --- a/app/assets/javascripts/distributors.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ From b8e40d799be644130cbd3874b9e590a22db43bda Mon Sep 17 00:00:00 2001 From: sigmundpetersen Date: Thu, 17 Sep 2015 14:18:09 +0200 Subject: [PATCH 10/30] Added translations --- config/locales/no.yml | 765 +++++++++++++++++++++--------------------- 1 file changed, 380 insertions(+), 385 deletions(-) diff --git a/config/locales/no.yml b/config/locales/no.yml index a44f0317a9..505737a10d 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -1,31 +1,31 @@ # Sample localization file for English. Add more files in this directory for other locales. # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. -en: +no: devise: failure: invalid: | - Invalid email or password. - Were you a guest last time? Perhaps you need to create an account or reset your password. + Ugyldig epost eller passord. + Var du gjest forrige gang? Kanskje du må opprette en konto eller nullstille passordet. enterprise_confirmations: enterprise: - confirmed: Thankyou, your email address has been confirmed. - not_confirmed: Your email address could not be confirmed. Perhaps you have already completed this step? - confirmation_sent: "Confirmation email sent!" - confirmation_not_sent: "Could not send a confirmation email." + confirmed: Takk, din epostadressen er bekreftet. + not_confirmed: Din epostadresse kan ikke bekreftes. Kanskje du allerede har fullført dette steget? + confirmation_sent: "Bekreftelse på epost er sendt!" + confirmation_not_sent: "Kunne ikke sende bekreftelse på epost." home: "OFN" title: Open Food Network - welcome_to: 'Welcome to ' - search_by_name: Search by name or suburb... - producers: Aussie Producers - producers_join: Australian producers are now welcome to join the Open Food Network. - charges_sales_tax: Charges GST? + welcome_to: 'Velkommen til ' + search_by_name: Søk på navn eller sted... + producers: Norske Produsenter + producers_join: Norske produsenter er nå velkommen til å bli med i Open Food Network. + charges_sales_tax: MVA-pliktig? logo: "Logo (640x130)" - logo_mobile: "Mobile logo (75x26)" - logo_mobile_svg: "Mobile logo (SVG)" - home_hero: "Hero image" - home_show_stats: "Show statistics" + logo_mobile: "Mobil logo (75x26)" + logo_mobile_svg: "Mobil logo (SVG)" + home_hero: "Heltebilde* + home_show_stats: "Vis statistikk" footer_logo: "Logo (220x76)" footer_facebook_url: "Facebook URL" footer_twitter_url: "Twitter URL" @@ -33,423 +33,418 @@ en: footer_linkedin_url: "LinkedIn URL" footer_googleplus_url: "Google Plus URL" footer_pinterest_url: "Pinterest URL" - footer_email: "Email" - footer_links_md: "Links" - footer_about_url: "About URL" - footer_tos_url: "Terms of Service URL" + footer_email: "Epost" + footer_links_md: "Linker" + footer_about_url: "Om URL" + footer_tos_url: "Vilkår URL" - name: Name - first_name: First Name - last_name: Last Name - email: Email - phone: Phone - next: Next - address: Address - address2: Address (contd.) - city: City - state: State - postcode: Postcode - country: Country - unauthorized: Unauthorized - terms_of_service: "Terms of service" - on_demand: On demand - none: None + name: Navn + first_name: Fornavn + last_name: Etternavn + email: Epost + phone: Telefon + next: Neste + address: Adresse + address2: Adresse (forts.) + city: Kommune + state: Fylke + postcode: Postnummer + country: Land + unauthorized: Uautorisert + terms_of_service: "Vilkår" + on_demand: Ved forespørsel + none: Ingen - alert_selling_on_ofn: "Interested in selling food on the Open Food Network?" - alert_start_here: "Start here" - label_shops: "Shops" - label_map: "Map" - label_producers: "Producers" - label_groups: "Groups" - label_about: "About" - label_shopping: "Shopping" - label_login: "Login" - label_logout: "Logout" - label_signup: "Sign up" - label_administration: "Administration" + alert_selling_on_ofn: "Interessert i å selge mat gjennom Open Food Network?" + alert_start_here: "Start her" + label_shops: "Butikker" + label_map: "Kart" + label_producers: "Produsenter" + label_groups: "Grupper" + label_about: "Om" + label_shopping: "Handle" + label_login: "Logg inn" + label_logout: "Logg ut" + label_signup: "Bli medlem" + label_administration: "Administrasjon" label_admin: "Admin" - label_account: "Account" - label_more: "More" - label_less: "Show less" + label_account: "Konto" + label_more: "Mer" + label_less: "Vis mindre" - items: "items" - cart_headline: "Your shopping cart" - total: "Total" - checkout: "Checkout now" - cart_updating: "Updating cart..." - cart_empty: "Cart empty" - cart_edit: "Edit your cart" + items: "varer" + cart_headline: "Din handlekurv" + total: "Sum" + checkout: "Gå til kassen" + cart_updating: "Oppdaterer handlekurv..." + cart_empty: "Handlekurven er tom" + cart_edit: "Rediger handlekurv" - card_number: Card Number - card_securitycode: "Security Code" - card_expiry_date: Expiry Date + card_number: Kortnummer + card_securitycode: "Sikkerhetskode" + card_expiry_date: Utløpsdato - ofn_cart_headline: "Current cart for:" - ofn_cart_distributor: "Distributor:" - ofn_cart_oc: "Order cycle:" - ofn_cart_from: "From:" - ofn_cart_to: "To:" - ofn_cart_product: "Product:" - ofn_cart_quantitiy: "Quantity:" - ofn_cart_send: "Buy me" + ofn_cart_headline: "Gjeldende handlekurv for:" + ofn_cart_distributor: "Distributør:" + ofn_cart_oc: "Bestillingsrunde:" + ofn_cart_from: "Fra:" + ofn_cart_to: "Til:" + ofn_cart_product: "Produkt:" + ofn_cart_quantitiy: "Antall:" + ofn_cart_send: "Kjøp" - ie_warning_headline: "Your browser is out of date :-(" - ie_warning_text: "For the best Open Food Network experience, we strongly recommend upgrading your browser:" - ie_warning_chrome: Download Chrome - ie_warning_firefox: Download Firefox - ie_warning_ie: Upgrade Internet Explorer - ie_warning_other: "Can't upgrade your browser? Try Open Food Network on your smartphone :-)" + ie_warning_headline: "Din nettleser er for gammel :-(" + ie_warning_text: "For den beste opplevelsen med Open Food Network anbefaler vi på det sterkeste å oppgradere nettleseren din:" + ie_warning_chrome: Last ned Chrome + ie_warning_firefox: Last ned Firefox + ie_warning_ie: Oppgrader Internet Explorer + ie_warning_other: "Kan ikke oppgradere nettleseren din? Prøv Open Food Network på smart-telefonen din :-)" - footer_global_headline: "OFN Global" - footer_global_home: "Home" - footer_global_news: "News" - footer_global_about: "About" - footer_global_contact: "Contact" + footer_global_headline: "OFN Globalt" + footer_global_home: "Hjem" + footer_global_news: "Nyheter" + footer_global_about: "Om" + footer_global_contact: "Kontakt" - footer_sites_headline: "OFN Sites" - footer_sites_developer: "Developer" - footer_sites_community: "Community" - footer_sites_userguide: "User Guide" + footer_sites_headline: "OFN nettsteder" + footer_sites_developer: "Utvikler" + footer_sites_community: "Forum" + footer_sites_userguide: "Brukerhåndbok" - footer_secure: "Secure and trusted." - footer_secure_text: "Open Food Network uses SSL encryption (2048 bit RSA) everywhere to keep your shopping and payment information private. Our servers do not store your credit card details and payments are processed by PCI-compliant services." + footer_secure: "Sikker og klarert." + footer_secure_text: "Open Food Network bruker SSL-kryptering (2048 bit RSA) overalt for å holde handlingen og betalingen din privat. Våre servere lagrer ikke kortopplysninger og betalinger behandles av PCI-kompatible tjenester." - footer_contact_headline: "Keep in touch" - footer_contact_email: "Email us" + footer_contact_headline: "Hold kontakten" + footer_contact_email: "Send oss en epost" - footer_nav_headline: "Navigate" - footer_join_headline: "Join us" - footer_join_producers: "Producers sign-up" - footer_join_hubs: "Hubs sign-up" - footer_join_groups: "Groups sign-up" - footer_join_partners: "Food systems partners" + footer_nav_headline: "Naviger" + footer_join_headline: "Bli med" + footer_join_producers: "Bli med som Produsent" + footer_join_hubs: "Bli med som Hub" + footer_join_groups: "Bli med som Gruppe" + footer_join_partners: "Samarbeidspartnere" - footer_legal_call: "Read our" - footer_legal_tos: "Terms & conditions" - footer_legal_visit: "Find us on" - footer_legal_text: "Open Food Network is a free and open source software platform. Our content is licensed with" - footer_legal_text2: "and our code with" + footer_legal_call: "Les våre" + footer_legal_tos: "Vilkår & betingelser" + footer_legal_visit: "Finn oss på" + footer_legal_text: "Open Food Network er en programvareplattform med fri og åpen kilde. Innholdet er lisensiert under" + footer_legal_text2: "og vår kode under" footer_legal_license_content: "CC BY-SA 3.0" footer_legal_license_code: "AGPL 3" - home_shop: Shop Now + home_shop: Handle nå brandstory_headline: "Food, unincorporated." - brandstory_intro: "Sometimes the best way to fix the system is to start a new one…" - brandstory_part1: "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 seriously change the world." - brandstory_part2: "Then we need a way to make it real. A way to empower everyone who grows, sells and buys food. A way to tell all the stories, to handle all the logistics. A way to turn transaction into transformation every day." - brandstory_part3: "So we build an online marketplace that levels the playing field. It’s transparent, so it creates real relationships. It’s open source, so it’s owned by everyone. It scales to regions and nations, so people start versions across the world." - brandstory_part4: "It works everywhere. It changes everything." - brandstory_part5_strong: "We call it Open Food Network." - brandstory_part6: "We all love food. Now we can love our food system too." + brandstory_intro: "Noen ganger er det best å fikse systemet ved å starte et nytt..." + brandstory_part1: "Vi begynner fra grunnen. Med bønder og dyrkere klare til å fortelle sine historier, stolt og virkelig. Med distributører klare til å koble mennesker med produkter på en rettferdig og ærlig måte. Med kjøpere som tror på at ukentlige innkjøpsrutiner kan bidra til å forandre verden." + brandstory_part2: "Da trenger vi en ordentlig måte å gjøre det på. En måte som styrker alle som dyrker, selger og kjøper mat. En måte å fortelle alle historiene på, håndtere all logistikk. En måte å forvandle transaksjon til transformasjon hver dag." + brandstory_part3: "Derfor bygger vi en online markedsplass som endrer spillereglene. Det er transparent, slik at det skaper ekte relasjoner. Det er open-source, slik at det er eid av alle. Metoden er skalérbar for regioner og nasjoner, så folk kan starte versjoner over hele verden." + brandstory_part4: "Det fungerer overalt. Det forandrer alt." + brandstory_part5_strong: "Vi kaller det Open Food Network." + brandstory_part6: "Alle er vi glad i mat. Nå kan vi elske vårt matsystem også." - system_headline: "Here's how it works." - system_step1: "1. Search" - system_step1_text: "Search our diverse, independent shops for seasonal local food. Search by neighbourhood and food category, or whether you prefer delivery or pickup." - system_step2: "2. Shop" - system_step2_text: "Transform your transactions with affordable local food from diverse producers and hubs. Know the stories behind your food and the people who make it!" - system_step3: "3. Pick-up / Delivery" - system_step3_text: "Hang on for your delivery, or visit your producer or hub for a more personal connection with your food. Food shopping as diverse as nature intended it." + system_headline: "Slik fungerer det." + system_step1: "1. Søk" + system_step1_text: "Søk blant våre mangfoldige, uavhengige butikker for lokal mat i sesong. Søk i nabolag og matkategori, eller om du foretrekker levering eller å hente selv." + system_step2: "2. Handle" + system_step2_text: "Omform dine transakjsoner med rimelig lokal mat fra mangfoldige produsenter og hubs. Oppdag historiene bak maten din og de som lager den!" + system_step3: "3. Hent / Få det levert" + system_step3_text: "Vent på din leveranse, eller besøk produsenten eller hub'en for en mer personlig kobling til maten din. Mathandling så mangfoldig som meningen var fra naturens side." - cta_headline: "Shopping that makes the world a better place." - cta_label: "I'm Ready" + cta_headline: "Handling som gjør verden til et bedre sted." + cta_label: "Jeg er klar" - stats_headline: "We're creating a new food system." - stats_producers: "food producers" - stats_shops: "food shops" - stats_shoppers: "food shoppers" - stats_orders: "food orders" + stats_headline: "Vi skaper et nytt matsystem." + stats_producers: "matprodusenter" + stats_shops: "matbutikker" + stats_shoppers: "matkunder" + stats_orders: "matbestillinger" - checkout_title: Checkout - checkout_now: Checkout now - checkout_order_ready: Order ready for - checkout_hide: Hide - checkout_expand: Expand - checkout_headline: "Ok, ready to checkout?" - checkout_as_guest: "Checkout as guest" - checkout_details: "Your details" - checkout_billing: "Billing info" - checkout_shipping: Shipping info - checkout_method_free: Free - checkout_address_same: Shipping address same as billing address? - checkout_ready_for: "Ready for:" - checkout_instructions: "Any comments or special instructions?" - checkout_payment: Payment - checkout_send: Place order now - checkout_your_order: Your order - checkout_cart_total: Cart total - checkout_shipping_price: Shipping - checkout_total_price: Total - checkout_back_to_cart: "Back to Cart" + checkout_title: Kasse + checkout_now: Gå til kassen + checkout_order_ready: Bestilling klar for + checkout_hide: Skjul + checkout_expand: Utvid + checkout_headline: "Ok, klar for betaling?" + checkout_as_guest: "Betal som gjest" + checkout_details: "Dine detaljer" + checkout_billing: "Betalingsinformasjon" + checkout_shipping: Leveringsinformasjon + checkout_method_free: Gratis + checkout_address_same: Leveringsadresse samme som fakturaadresse? + checkout_ready_for: "Klar for:" + checkout_instructions: "Kommentarer eller spesielle instruksjoner?" + checkout_payment: Betaling + checkout_send: Send bestilling + checkout_your_order: Din bestilling + checkout_cart_total: Sum handlekurv + checkout_shipping_price: Levering + checkout_total_price: Sum + checkout_back_to_cart: "Tilbake til Handlekurv" - order_paid: PAID - order_not_paid: NOT PAID - order_total: Total order - order_payment: "Paying via:" - order_billing_address: Billing address - order_delivery_on: Delivery on - order_delivery_address: Delivery address - order_special_instructions: "Your notes:" - order_pickup_instructions: Collection Instructions - order_produce: Produce - order_total_price: Total - order_includes_tax: (includes tax) - order_payment_paypal_successful: Your payment via PayPal has been processed successfully. - order_hub_info: Hub Info + order_paid: BETALT + order_not_paid: IKKE BETALT + order_total: Sum bestilling + order_payment: "Betaler via:" + order_billing_address: Fakturaadresse + order_delivery_on: Levering på + order_delivery_address: Leveringsadresse + order_special_instructions: "Dine kommentarer:" + order_pickup_instructions: Henteinstruksjoner + order_produce: Varer + order_total_price: Sum + order_includes_tax: (inkludert MVA) + order_payment_paypal_successful: Din betaling via PayPal har blitt godkjent. + order_hub_info: Hub info - products: "Products" - products_in: "in %{oc}" - products_at: "at %{distributor}" - products_elsewhere: "Products found elsewhere" + products: "Produkter" + products_in: "i %{oc}" + products_at: "hos %{distributor}" + products_elsewhere: "Produkter funnet andre steder" - email_welcome: "Welcome" - email_confirmed: "Thank you for confirming your email address." - email_registered: "is now part of" - email_userguide_html: "The User Guide with detailed support for setting up your Producer or Hub is here: -%{link}" - email_admin_html: "You can manage your account by logging into the %{link} or by clicking on the cog in the top right hand side of the homepage, and selecting Administration." - email_community_html: "We also have an online forum for community discussion related to OFN software and the unique challenges of running a food enterprise. You are encouraged to join in. We are constantly evolving and your input into this forum will shape what happens next. -%{link}" - email_help: "If you have any difficulties, check out our FAQs, browse the forum or post a 'Support' topic and someone will help you out!" - email_confirmation_greeting: "Hi, %{contact}!" - email_confirmation_profile_created: "A profile for %{name} has been successfully created! -To activate your Profile we need to confirm this email address." - email_confirmation_click_link: "Please click the link below to confirm your email and to continue setting up your profile." - email_confirmation_link_label: "Confirm this email address »" - email_confirmation_help: "After confirming your email you can access your administration account for this enterprise. -See the %{link} to find out more about %{sitename}'s features and to start using your profile or online store." - email_confirmation_userguide: "User Guide" - email_social: "Connect with Us:" - email_contact: "Email us:" - email_signoff: "Cheers," + email_welcome: "Velkommen" + email_confirmed: "Takk for at du bekrefter din e-postadresse" + email_registered: "er nå en del av" + email_userguide_html: "Brukerhåndboken med detaljert støtte om hvordan man setter opp som Produsent eller Hub finnes her: %{link}" + email_admin_html: "Du kan administrere din konto ved å logge inn på %{link} eller ved klikke på tannhjulet øverst til høyre på hjemmesiden og velge Aministrasjon." + email_community_html: "Vi har også et online forum for diskusjon relatert til OFN programvaren og de forskjellige utfordringene med å drive matfirma. Vi oppfordrer deg til å bli med. Vi utvikler oss hele tiden og dine innspill til dette forumet vil forme det som skjer videre. %{link}" + email_help: "Hvis du har problemer, sjekk vår FAQ, utforsk forumet eller skriv et 'Support'-emne og noen vil hjelpe deg!" + email_confirmation_greeting: "Hei, %{contact}!" + email_confirmation_profile_created: "En profil for %{name} har blitt opprettet! For å aktivere din Profil må du bekrefte denne epostadressen." + email_confirmation_click_link: "Trykk på linken under for å bekrefte din e-post og for å fortsette oppsettet av din profil." + email_confirmation_link_label: "Bekreft denne epostadressen »" + email_confirmation_help: "Etter du har bekreftet e-postadressen får du tilgang til din administrasjonskonto for dette selskapet. Se linken %{link} for å finne ut mer om %{sitename}s funksjoner og for å begynne å bruke din profil eller nettbutikk." + email_confirmation_userguide: "Brukerhåndbok" + email_social: "Her finner du oss:" + email_contact: "Send oss en epost:" + email_signoff: "Mvh," email_signature: "%{sitename} Team" - email_confirm_customer_greeting: "Hi %{name}," - email_confirm_customer_intro_html: "Thanks for shopping at %{distributor}!" - email_confirm_customer_number_html: "Order confirmation #%{number}" - email_confirm_customer_details_html: "Here are your order details from %{distributor}:" - email_confirm_customer_signoff: "Kind regards," - email_confirm_shop_greeting: "Hi %{name}," - email_confirm_shop_order_html: "Well done! You have a new order for %{distributor}!" - email_confirm_shop_number_html: "Order confirmation #%{number}" - email_order_summary_item: "Item" - email_order_summary_quantity: "Qty" - email_order_summary_price: "Price" - email_order_summary_subtotal: "Subtotal:" - email_order_summary_total: "Total:" - email_payment_paid: PAID - email_payment_not_paid: NOT PAID - email_payment_summary: Payment summary - email_order_summary_method: "Paying via:" - email_shipping_delivery_details: Delivery details - email_shipping_delivery_time: "Delivery on:" - email_shipping_delivery_address: "Delivery address:" - email_shipping_collection_details: Collection details - email_shipping_collection_time: "Ready for collection:" - email_shipping_collection_instructions: "Collection instructions:" - email_special_instructions: "Your notes:" + email_confirm_customer_greeting: "Hei %{name}," + email_confirm_customer_intro_html: "Takk for at du handler hos %{distributor}!" + email_confirm_customer_number_html: "Ordrebekreftelse #%{number}" + email_confirm_customer_details_html: "Her er dine ordredetaljer fra %{distributor}:" + email_confirm_customer_signoff: "Vennlig hilsen," + email_confirm_shop_greeting: "Hei %{name}," + email_confirm_shop_order_html: "Bra jobbet! Du har en ny ordre fra %{distributor}!" + email_confirm_shop_number_html: "Ordrebekreftelse #%{number}" + email_confirm_shop_order_detail_html: "%{firstname} %{lastname} gjennomførte følgende bestilling i din butikk:" + email_order_summary_item: "Vare" + email_order_summary_quantity: "Stk" + email_order_summary_price: "Pris" + email_order_summary_subtotal: "Delsum:" + email_order_summary_total: "Sum:" + email_payment_paid: BETALT + email_payment_not_paid: IKKE BETALT + email_payment_summary: Betalingssammendrag + email_order_summary_method: "Betaler via:" + email_shipping_delivery_details: Leveringsdetaljer + email_shipping_delivery_time: "Levering på:" + email_shipping_delivery_address: "Leveringsadresse:" + email_shipping_collection_details: Hentedetaljer + email_shipping_collection_time: "Klar for henting:" + email_shipping_collection_instructions: "Henteinstruksjoner:" + email_special_instructions: "Dine kommentarer:" - email_signup_greeting: Hello! - email_signup_welcome: "Welcome to %{sitename}!" - email_signup_login: Your login - email_signup_email: Your login email is - email_signup_shop_html: "You can start shopping online now at %{link}." - email_signup_text: "Thanks for joining the network. - If you are a customer, we look forward to introducing you to many fantastic farmers, wonderful food hubs and delicious food! - If you are a producer or food enterprise, we are excited to have you as a part of the network." - email_signup_help_html: "We welcome all your questions and feedback; you can use the Send Feedback button on the site or email us at" + email_signup_greeting: Hei! + email_signup_welcome: "Velkommen til %{sitename}!" + email_signup_login: Din login + email_signup_email: Din login e-post er + email_signup_shop_html: "Du kan begynne å handle på nett nå på %{link}." + email_signup_text: "Takk for at du ble med i nettverket. Hvis du er kunde ser vi frem til å vise deg mange fantastiske bønder, flotte mat-hubs og deilig mat! Hvis du er produsent eller selskap er vi glade for å ha deg som en del av nettverket." + email_signup_help_html: "Vi tar i mot alle dine spørsmål og tilbakemeldinger; du kan bruke Send tilbakemelding-knappen på nettsiden eller sende oss en epost på" - shopping_oc_closed: Orders are closed - shopping_oc_closed_description: "Please wait until the next cycle opens (or contact us directly to see if we can accept any late orders)" - shopping_oc_last_closed: "The last cycle closed %{distance_of_time} ago" - shopping_oc_next_open: "The next cycle opens in %{distance_of_time}" - shopping_tabs_about: "About %{distributor}" - shopping_tabs_contact: "Contact" - shopping_contact_address: "Address" - shopping_contact_web: "Contact" - shopping_contact_social: "Follow" - shopping_groups_part_of: "is part of:" - shopping_producers_of_hub: "%{hub}'s producers:" + shopping_oc_closed: Stengt for bestilling + shopping_oc_closed_description: "Vent til neste runde åpner (eller kontakt oss direkte for å se om vi tar i mot sene bestillinger)" + shopping_oc_last_closed: "Den siste runden stengte for %{distance_of_time} siden" + shopping_oc_next_open: "Neste runde åpner om %{distance_of_time}" + shopping_tabs_about: "Om %{distributor}" + shopping_tabs_contact: "Kontakt" + shopping_contact_address: "Adresse" + shopping_contact_web: "Kontakt" + shopping_contact_social: "Følg" + shopping_groups_part_of: "er en del av:" + shopping_producers_of_hub: "%{hub}s produsenter:" - enterprises_next_closing: "Next order closing" - enterprises_ready_for: "Ready for" - enterprises_choose: "Choose when you want your order:" + enterprises_next_closing: "Neste runde stenger" + enterprises_ready_for: "Klar til" + enterprises_choose: "Velg når du ønsker din bestilling:" - hubs_buy: "Shop for:" - hubs_delivery_options: "Delivery options" - hubs_pickup: "Pickup" - hubs_delivery: "Delivery" - hubs_producers: "Our producers" - hubs_filter_by: "Filter by" + hubs_buy: "Handle:" + hubs_delivery_options: "Leveringsvalg" + hubs_pickup: "Henting" + hubs_delivery: "Levering" + hubs_producers: "Våre produsenter" + hubs_filter_by: "Filtrer" hubs_filter_type: "Type" - hubs_filter_delivery: "Delivery" - hubs_matches: "Did you mean?" - hubs_intro: Shop in your local area - hubs_distance: Closest to - hubs_distance_filter: "Show me shops near %{location}" + hubs_filter_delivery: "Levering" + hubs_matches: "Mente du?" + hubs_intro: Handle lokalt + hubs_distance: Nærmest + hubs_distance_filter: "Vis meg butikker nær %{location}" - products_clear_all: Clear all - products_showing: "Showing:" - products_with: with - products_search: "Search by product or producer" - products_loading: "Loading products..." - products_updating_cart: "Updating cart..." - products_cart_empty: "Cart empty" - products_edit_cart: "Edit your cart" - products_from: from + products_clear_all: Fjern alt + products_showing: "Viser:" + products_with: med + products_search: "Søk på produkt eller produsent" + products_loading: "Laster produkter..." + products_updating_cart: "Oppdaterer handlekurv..." + products_cart_empty: "Handlekurv tom" + products_edit_cart: "Rediger handlekurv" + products_from: fra - search_no_results_html: "Sorry, no results found for %{query}. Try another search?" + search_no_results_html: "Beklager, ingen treff på %{query}. Prøv på nytt?" - components_profiles_popover: "Profiles do not have a shopfront on the Open Food Network, but may have their own physical or online shop elsewhere" - components_profiles_show: "Show profiles" - components_filters_nofilters: "No filters" - components_filters_clearfilters: "Clear all filters" + components_profiles_popover: "Profiler har ikke butikkvindu på Open Food Network men kan ha sin egen fysiske butikk eller nettbutikk et annet sted" + components_profiles_show: "Vis profiler" + components_filters_nofilters: "Ingen filter" + components_filters_clearfilters: "Fjern alle filtre" - groups_title: Groups - groups_headline: Groups / regions - groups_search: "Search name or keyword" - groups_no_groups: "No groups found" - groups_about: "About Us" - groups_producers: "Our producers" - groups_hubs: "Our hubs" - groups_contact_web: Contact - groups_contact_social: Follow - groups_contact_address: Address - groups_contact_email: Email us - groups_contact_website: Visit our website - groups_contact_facebook: Follow us on Facebook - groups_signup_title: Sign up as a group - groups_signup_headline: Groups sign up - groups_signup_intro: "We're an amazing platform for collaborative marketing, the easiest way for your members and stakeholders to reach new markets. We're non-profit, affordable, and simple." - groups_signup_email: Email us - groups_signup_motivation1: We transform food systems fairly. - groups_signup_motivation2: It's why we get out of bed every day. We're a global non-profit, based on open source code. We play fair. You can always trust us. - groups_signup_motivation3: We know you have big ideas, and we want to help. We'll share our knowledge, networks and resources. We know that isolation doesn't create change, so we'll partner with you. - groups_signup_motivation4: We meet you where you are. - groups_signup_motivation5: You might be an alliance of food hubs, producers, or distributors, and an industry body, or a local government. - groups_signup_motivation6: Whatever your role in your local food movement, we're ready to help. However you come to wonder what Open Food Network would look like or is doing in your part of the world, let's start the conversation. - groups_signup_motivation7: We make food movements make more sense. - groups_signup_motivation8: You need to activate and enable your networks, we offer a platform for conversation and action. You need real engagement. We’ll help reach all the players, all the stakeholders, all the sectors. - groups_signup_motivation9: You need resourcing. We’ll bring all our experience to bear. You need cooperation. We’ll better connect you to a global network of peers. - groups_signup_pricing: Group Account - groups_signup_studies: Case Studies - groups_signup_contact: Ready to discuss? - groups_signup_contact_text: "Get in touch to discover what OFN can do for you:" - groups_signup_detail: "Here's the detail." + groups_title: Grupper + groups_headline: Grupper / regioner + groups_search: "Søk på navn eller nøkkelord" + groups_no_groups: "Fant ingen grupper" + groups_about: "Om oss" + groups_producers: "Våre produsenter" + groups_hubs: "Våre hubs" + groups_contact_web: Kontakt + groups_contact_social: Følg + groups_contact_address: Adresse + groups_contact_email: Send oss epost + groups_contact_website: Besøk oss på nett + groups_contact_facebook: Følg oss på Facebook + groups_signup_title: Bli med som gruppe + groups_signup_headline: Bli med som gruppe + groups_signup_intro: "Vi er en fantastisk plattform for samarbeidende markedsføring, den enkleste måten for medlemmer og interessenter å nå nye markeder. Vi er non-profit, rimelig og enkel." + groups_signup_email: Send oss epost + groups_signup_motivation1: Vi forvandler matsystemer rettferdig. + groups_signup_motivation2: Det er grunnen til at vi står opp om morgenen. Vi er en global non-profit, basert på åpen kildekode. We opptrer rettferdig. Du kan alltid stole på oss. + groups_signup_motivation3: Vi vet du har gode ideer og vi ønsker å hjelpe. Vi deler vår kunnskap, våre nettverk og ressurser. Vi vet at isolasjon ikke skaper endring så vi vil samarbeide med deg. + groups_signup_motivation4: Vi møter deg der du er. + groups_signup_motivation5: Du kan være en allianse av mat-hubs, produsenter eller distributører, i industri eller lokale myndigheter. + groups_signup_motivation6: Uansett din rolle i den lokale matkjeden, vi ønsker å hjelpe. Hvis du lurer på hvordan Open Food Network vil se ut eller hva de gjør i din del av verden, la oss snakke sammen. + groups_signup_motivation7: Vi gir matkjeden mer mening. + groups_signup_motivation8: Du trenger å aktivere og tilrettelegge for dine nettverk, vi tilbyr en plattform for samtale og handling. Du trenger ekte engasjement. Vi hjelper til med å nå alle aktører, alle interessenter, alle sektorer. + groups_signup_motivation9: Du trenger flere ressurser. We kommer med all erfaring vi kan bære. Du trenger samarbeid. Vi kobler deg med et globalt nettverk med likesinnede. + groups_signup_pricing: Gruppekonto + groups_signup_studies: Bruksundersøkelser + groups_signup_contact: Klar for å snakke sammen? + groups_signup_contact_text: "Ta kontakt for å oppdage hva OFN kan gjøre for deg:" + groups_signup_detail: "Her er detaljene." - login_invalid: "Invalid email or password" + login_invalid: "Ugyldig epost eller passord" - modal_hubs: "Food Hubs" - modal_hubs_abstract: Our food hubs are the point of contact between you and the people who make your food! - modal_hubs_content1: You can search for a convenient hub by location or name. Some hubs have multiple points where you can pick-up your purchases, and some will also provide delivery options. Each food hub is a sales point with independent business operations and logistics - so variations between hubs are to be expected. - modal_hubs_content2: You can only shop at one food hub at a time. + modal_hubs: "Mat-hubs" + modal_hubs_abstract: Våre hubs er kontaktpunkt mellom deg og menneskene som lager maten din! + modal_hubs_content1: Du kan søke etter en passende hub på lokasjon eller navn. Noen hubs har flere hentepunkt hvor du kan plukke opp det du har kjøpt, og noen tilbyr også levering. Hver mat-hub er en butikk med uavhengige drift og logistikk - så det vil være forskjeller mellom huber. + modal_hubs_content2: Du kan kun handle hos en hub om gangen. - modal_groups: "Groups / Regions" - modal_groups_content1: These are the organisations and relationships between hubs which make up the Open Food Network. - modal_groups_content2: Some groups are clustered by location or council, others by non-geographic similarities. + modal_groups: "Grupper / Regioner" + modal_groups_content1: Dette er organisasjonene og hub-koblingene som utgjør Open Food Network. + modal_groups_content2: Noen grupper er klynger basert på lokalnivå eller kommunenivå, andre har ingen geografiske likheter. - modal_how: "How it works" - modal_how_shop: Shop the Open Food Network - modal_how_shop_explained: Search for a food hub near you to start shopping! You can expand each food hub to see what kinds of goodies are available, and click through to start shopping. (You can only shop one food hub at a time.) - modal_how_pickup: Pick-ups, delivery & shipping costs - modal_how_pickup_explained: Some food hubs deliver to your door, while others require you to pick-up your purchases. You can see which options are available on the homepage, and select which you'd like at the shopping and check-out pages. Delivery will cost more, and pricing differs from hub-to-hub. Each food hub is a sales point with independent business operations and logisitics - so variations between hubs are to be expected. - modal_how_more: Learn more - modal_how_more_explained: "If you want to learn more about the Open Food Network, how it works, and get involved, check out:" + modal_how: "Slik fungerer det" + modal_how_shop: Handle på Open Food Network + modal_how_shop_explained: Søk etter en mat-hub nær deg for å begynne å handle! Du kan utse detaljer for hver mat-hub for å se hvilke godbiter som er finnes, og klikk deg videre for å handle. (Du kan kun handle hos en mat-hub om gangen). + modal_how_pickup: Henting, levering og transportkostnader + modal_how_pickup_explained: Noen mat-hubs leverer på døren, mens andre krever at du henter varene du har kjøpt. Du kan se hvilke alternativ som er tilgjengelige på hjemmesiden, og velge hvilket du ønsker på handle- og betalingssidene. Levering koster mer, og prisene varierer fra hub til hub. Hver mat-hub er en forretning med uavhengig drift og logistikk - så variasjoner mellom hubs er naturlig. + modal_how_more: Finn ut mer + modal_how_more_explained: "Hvis du ønsker å lære mer om Open Food Network, hvordan det fungerer og ta del, sjekk ut:" - modal_producers: "Producers" - modal_producers_explained: "Our producers make all the delicious food you can shop for on the Open Food Network." + modal_producers: "Produsenter" + modal_producers_explained: "Våre produsenter lager all den herlige maten du kan handle på Open Food Network." ocs_choice_hub: "Hub:" - ocs_choice_oc: "Order Cycle:" - ocs_choice_text: "You have not yet picked where you will get your order from." - ocs_closed_headline: Orders are currently closed for this hub - ocs_closed_time: "The last cycle closed %{time} ago." - ocs_closed_contact: "Please contact your hub directly to see if they accept late orders, or wait until the next cycle opens." - ocs_closed_opens: "The next order cycle opens in %{time}" - ocs_closed_email: "Email: %{email}" - ocs_closed_phone: "Phone: %{phone}" - ocs_pickup_time: "Your order will be ready on %{pickup_time}" - ocs_change_date: "Change Collection Date" - ocs_change_date_notice: "(This will reset your cart)" - ocs_close_time: "ORDERS CLOSE" - ocs_when_headline: When do you want your order? - ocs_when_text: No products are displayed until you select a date. - ocs_when_closing: "Closing On" - ocs_when_choose: "Choose Order Cycle" - ocs_list: "List View" + ocs_choice_oc: "Bestillingsrunde:" + ocs_choice_text: "Du har ennå ikke valgt hvor du vil handle fra." + ocs_closed_headline: Bestillinger er for tiden stengt for denne huben + ocs_closed_time: "Den siste runden stengte for %{time} siden." + ocs_closed_contact: "Vennligst kontakt din hub direkte for å se om de godtar sene bestillinger, eller vent til neste runde åpner." + ocs_closed_opens: "Den neste bestillingsrunden åpner om %{time}" + ocs_closed_email: "Epost: %{email}" + ocs_closed_phone: "Telefon: %{phone}" + ocs_pickup_time: "Din bestilling vil være klar %{pickup_time}" + ocs_change_date: "Endre hentedato" + ocs_change_date_notice: "(Dette nullstiller kurven din)" + ocs_close_time: "BESTILLINGER STENGER" + ocs_when_headline: Når ønsker du bestillingen din? + ocs_when_text: Ingen varer vises før du velger en dato. + ocs_when_closing: "Stenger" + ocs_when_choose: "Velg Bestillingsrunde" + ocs_list: "Listevisning" - producers_about: About us - producers_buy: Shop for - producers_contact: Contact - producers_contact_phone: Call - producers_contact_social: Follow - producers_at: "products at:" - producers_filter: Filter by + producers_about: Om oss + producers_buy: Handle + producers_contact: Kontakt + producers_contact_phone: Ring + producers_contact_social: Følg + producers_at: "varer hos:" + producers_filter: Filtrer på producers_filter_type: Type - producers_title: Producers - producers_headline: Find local producers - producers_signup_title: Sign up as a producer - producers_signup_headline: Food producers, empowered. - producers_signup_motivation: Sell your food and tell your stories to diverse new markets. Save time and money on every overhead. We support innovation without the risk. We've levelled the playing field. - producers_signup_send: Join now - producers_signup_enterprise: Enterprise Accounts - producers_signup_studies: Stories from our producers. - producers_signup_cta_headline: Join now! - producers_signup_cta_action: Join now - producers_signup_detail: Here's the detail. + producers_title: Produsenter + producers_headline: Finn lokale produsenter + producers_signup_title: Bli med som produsent + producers_signup_headline: Matprodusenter, styrket. + producers_signup_motivation: Selg dine produkter og fortell dine historier til mangfoldige ny markeder. Spar tid og penger på alt du ikke ønsker å gjøre selv. Vi støtter nyskaping uten risiko. Vi jevner ut spillet. + producers_signup_send: Bli med nå + producers_signup_enterprise: Bedriftskonto + producers_signup_studies: Historier fra våre produsenter. + producers_signup_cta_headline: Bli med nå! + producers_signup_cta_action: Bli med nå + producers_signup_detail: Detaljene. - products_item: Item - products_description: Description + products_item: Vare + products_description: Beskrivelse products_variant: Variant - products_quantity: Quantity - products_availabel: Available? - products_price: Price + products_quantity: Antall + products_availabel: Tilgjengelig? + products_price: Pris - register_title: Register + register_title: Registrer - shops_title: Shops - shops_headline: Shopping, transformed. - shops_text: Food grows in cycles, farmers harvest in cycles, and we order food in cycles. If you find an order cycle closed, check back soon. - shops_signup_title: Sign up as a hub - shops_signup_headline: Food hubs, unlimited. - shops_signup_motivation: Whatever your model, we support you. However you change, we're with you. We're non-profit, independent, and open-sourced. We're the software partners you've dreamed of. - shops_signup_action: Join now - shops_signup_pricing: Enterprise Accounts - shops_signup_stories: Stories from our hubs. - shops_signup_help: We're ready to help. - shops_signup_help_text: You need a better return. You need new buyers and logistics partners. You need your story told across wholesale, retail, and the kitchen table. - shops_signup_detail: Here's the detail. + shops_title: Butikker + shops_headline: Handling på en ny måte. + shops_text: Mat gror i syklus, bønder høster i syklus, og vi bestiller mat i syklus. Hvis du møter en stengt besillingsrunde, sjekk igjen snart. + shops_signup_title: Bli med som hub + shops_signup_headline: Mat-hubs, ubegrenset. + shops_signup_motivation: Uansett modell støtter vi deg. Uansett hvordan du forandrer deg er vi med deg. Vi er non-profitt, uavhengig, og transparent. Vi er løsningspartneren du har drømt om. + shops_signup_action: Bli med nå + shops_signup_pricing: Bedriftskonto + shops_signup_stories: Historier fra våre hubs. + shops_signup_help: Vi er klar til å hjelpe. + shops_signup_help_text: Du trenger bedre resultater. Du trenger nye kunder og logistikkpartnere. Du trenger å få din historie fortalt hos grossister, i dagligvaren og rundt kjøkkenbordet. + shops_signup_detail: Detaljene. - orders_fees: Fees... - orders_edit_title: Shopping Cart - orders_edit_headline: Your shopping cart - orders_edit_time: Order ready for - orders_edit_continue: Continue shopping - orders_edit_checkout: Checkout - orders_form_empty_cart: "Empty cart" - orders_form_subtotal: Produce subtotal - orders_form_admin: Admin & handling - orders_form_subtotal: Total - orders_oc_expired_headline: Orders have closed for this order cycle - orders_oc_expired_text: "Sorry, orders for this order cycle closed %{time} ago! Please contact your hub directly to see if they can accept late orders." - orders_oc_expired_text_others_html: "Sorry, orders for this order cycle closed %{time} ago! Please contact your hub directly to see if they can accept late orders %{link}." - orders_oc_expired_text_link: "or see the other order cycles available at this hub" - orders_oc_expired_email: "Email:" - orders_oc_expired_phone: "Phone:" - orders_show_title: Order Confirmation - orders_show_time: Order ready on - orders_show_number: Order confirmation + orders_fees: Gebyrer... + orders_edit_title: Handlekurv + orders_edit_headline: Din handlekurv + orders_edit_time: Bestilling klar for + orders_edit_continue: Fortsett å handle + orders_edit_checkout: Kassen + orders_form_empty_cart: "Tøm handlekurv" + orders_form_subtotal: Vis delsum + orders_form_admin: Admin og håndtering + orders_form_subtotal: Sum + orders_oc_expired_headline: Bestillinger stengt for denne runden + orders_oc_expired_text: "Beklager, bestillinger for denne runden stengte for %{time} siden! Kontakt din hub direkte for å høre om de tar i mot sene bestillinger." + orders_oc_expired_text_others_html: "Beklager, bestillinger for denne runden stengte for %{time} siden! Kontakt din hub direkte for å høre om de tar i mot sene bestillinger %{link}." + orders_oc_expired_text_link: "eller se på de andre bestillinsrundene tilgjengelig fra denne huben" + orders_oc_expired_email: "Epost:" + orders_oc_expired_phone: "Telefon:" + orders_show_title: Ordrebekreftelse + orders_show_time: Bestilling klar for + orders_show_number: Ordrebekreftelse - products_cart_distributor_choice: "Distributor for your order:" - products_cart_distributor_change: "Your distributor for this order will be changed to %{name} if you add this product to your cart." - products_cart_distributor_is: "Your distributor for this order is %{name}." - products_distributor_error: "Please complete your order at %{link} before shopping with another distributor." - products_oc: "Order cycle for your order:" - products_oc_change: "Your order cycle for this order will be changed to %{name} if you add this product to your cart." - products_oc_is: "Your order cycle for this order is %{name}." - products_oc_error: "Please complete your order from %{link} before shopping in a different order cycle." - products_oc_current: "your current order cycle" - products_quantity: Quantity - products_max_quantity: Max quantity - products_distributor: Distributor - products_distributor_info: When you select a distributor for your order, their address and pickup times will be displayed here. + products_cart_distributor_choice: "Distributør for bestillingen:" + products_cart_distributor_change: "Din distributør for denne ordren vil bli endret til %{name} hvis du legger til dette produktet i handlekurven din." + products_cart_distributor_is: "Din distributør for denne ordren er %{name}." + products_distributor_error: "Vennligst fullfør din bestilling hos %{link} før du handler hos en annen distributør." + products_oc: "Bestillingsrunde for din bestilling:" + products_oc_change: "Din bestillingsrunde for denne bestillingen vil bli endret til %{name} hvis du legger til dette produktet i den handlekurv." + products_oc_is: "Din bestillingsrunde for denne bestillingen er %{name}." + products_oc_error: "Vennligst fullfør din bestilling hos %{link} før du handler i en annen bestillingsrunde." + products_oc_current: "din nåværende bestillingsrunde" + products_quantity: Mengde + products_max_quantity: Max mengde + products_distributor: Distributør + products_distributor_info: Når du velger en distributør for din bestilling, vil deres adresse og hentetider vises her. From aa4f1f1dec45c2f744096dbee345c81d9327e54f Mon Sep 17 00:00:00 2001 From: Maikel Date: Fri, 18 Sep 2015 09:37:35 +1000 Subject: [PATCH 11/30] Fixing syntax typo in Norwegian language file --- config/locales/no.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/no.yml b/config/locales/no.yml index 505737a10d..56af830111 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -24,7 +24,7 @@ no: logo: "Logo (640x130)" logo_mobile: "Mobil logo (75x26)" logo_mobile_svg: "Mobil logo (SVG)" - home_hero: "Heltebilde* + home_hero: "Heltebilde" home_show_stats: "Vis statistikk" footer_logo: "Logo (220x76)" footer_facebook_url: "Facebook URL" From 4f05b9c28dd9c18d00dd43c348a80eca1cd373db Mon Sep 17 00:00:00 2001 From: Maikel Date: Fri, 18 Sep 2015 09:38:21 +1000 Subject: [PATCH 12/30] Changing en: to fr: in French locale file --- config/locales/fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 851d2b12e4..9141265f86 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -1,7 +1,7 @@ # Localization file for French. # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. -en: +fr: devise: failure: invalid: | From f8725a0174d518c4038d98e77913a102e31063f2 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 1 Oct 2015 11:12:31 +1000 Subject: [PATCH 13/30] Removing unused JS partial --- .../templates/partials/hub_actions.html.haml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 app/assets/javascripts/templates/partials/hub_actions.html.haml diff --git a/app/assets/javascripts/templates/partials/hub_actions.html.haml b/app/assets/javascripts/templates/partials/hub_actions.html.haml deleted file mode 100644 index c17f9a86f5..0000000000 --- a/app/assets/javascripts/templates/partials/hub_actions.html.haml +++ /dev/null @@ -1,15 +0,0 @@ -.row.pad-top{bindonce: true, "ng-if" => "enterprise.hubs.length > 0 && enterprise.is_distributor"} - .cta-container.small-12.columns - %label - Shop for - %strong{"bo-text" => "enterprise.name"} - products at: - %a.cta-hub{"ng-repeat" => "hub in enterprise.hubs", - "bo-href" => "hub.path", - "bo-class" => "{primary: hub.active, secondary: !hub.active}", - "ofn-change-hub" => "hub"} - %i.ofn-i_033-open-sign{"bo-if" => "hub.active"} - %i.ofn-i_032-closed-sign{"bo-if" => "!hub.active"} - .hub-name{"bo-text" => "hub.name"} - .button-address{"bo-bind" => "[hub.address.city, hub.address.state_name] | printArray"} - / %i.ofn-i_007-caret-right From ae9654111226ca69513331c08c274db7dc8d4b84 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 1 Oct 2015 11:13:06 +1000 Subject: [PATCH 14/30] Internationalisation of Javascript views --- .../javascripts/darkswarm/cart.js.coffee | 2 +- .../forgot_controller.js.coffee | 4 +- .../authentication/login_controller.js.coffee | 2 +- .../checkout/payment_controller.js.coffee | 24 +-- .../darkswarm/directives/change_hub.js.coffee | 2 +- .../directives/change_order_cycle.js.coffee | 2 +- .../darkswarm/directives/map_search.js.coffee | 2 +- .../registration_limit_modal.js.coffee | 2 +- .../darkswarm/filters/dates.js.coffee | 4 +- .../javascripts/darkswarm/i18n.js.coffee | 15 ++ .../darkswarm/mixins/fieldset_mixin.js.coffee | 8 +- .../services/authentication_service.js.coffee | 2 +- .../darkswarm/services/cart.js.coffee | 2 +- .../darkswarm/services/checkout.js.coffee | 2 +- .../enterprise_registration_service.js.coffee | 12 +- .../services/filter_selectors.js.coffee | 6 +- .../services/registration_service.js.coffee | 2 +- .../javascripts/templates/forgot.html.haml | 8 +- .../javascripts/templates/login.html.haml | 10 +- .../templates/partials/contact.html.haml | 2 +- .../partials/enterprise_details.html.haml | 2 +- .../templates/partials/follow.html.haml | 2 +- .../templates/partials/hub_details.html.haml | 8 +- .../partials/producer_details.html.haml | 5 +- .../templates/price_breakdown.html.haml | 16 +- .../templates/price_percentage.html.haml | 4 +- .../templates/product_modal.html.haml | 2 +- .../templates/registration/about.html.haml | 34 ++-- .../templates/registration/contact.html.haml | 18 +- .../templates/registration/details.html.haml | 57 +++--- .../templates/registration/finished.html.haml | 19 +- .../templates/registration/images.html.haml | 8 +- .../registration/images/logo.html.haml | 18 +- .../registration/images/promo.html.haml | 18 +- .../registration/introduction.html.haml | 35 ++-- .../registration/limit_reached.html.haml | 8 +- .../templates/registration/social.html.haml | 31 ++- .../templates/registration/type.html.haml | 20 +- .../registration_authentication.html.haml | 8 +- .../templates/shop_variant.html.haml | 6 +- .../javascripts/templates/signup.html.haml | 10 +- .../layouts/_i18n_translations.html.haml | 5 + app/views/layouts/darkswarm.html.haml | 1 + app/views/layouts/registration.html.haml | 1 + config/locales/en.yml | 178 ++++++++++++++++++ 45 files changed, 396 insertions(+), 231 deletions(-) create mode 100644 app/assets/javascripts/darkswarm/i18n.js.coffee create mode 100644 app/views/layouts/_i18n_translations.html.haml diff --git a/app/assets/javascripts/darkswarm/cart.js.coffee b/app/assets/javascripts/darkswarm/cart.js.coffee index 471991143a..1e971c8bb4 100644 --- a/app/assets/javascripts/darkswarm/cart.js.coffee +++ b/app/assets/javascripts/darkswarm/cart.js.coffee @@ -15,5 +15,5 @@ $(document).ready -> $('td.cart-adjustments a').click -> $('.cart_adjustment').toggle() - $(this).html('Item Handling Fees (included in item totals)') + $(this).html(t('item_handling_fees')) false diff --git a/app/assets/javascripts/darkswarm/controllers/authentication/forgot_controller.js.coffee b/app/assets/javascripts/darkswarm/controllers/authentication/forgot_controller.js.coffee index 175e18d2a2..85920de958 100644 --- a/app/assets/javascripts/darkswarm/controllers/authentication/forgot_controller.js.coffee +++ b/app/assets/javascripts/darkswarm/controllers/authentication/forgot_controller.js.coffee @@ -7,6 +7,6 @@ Darkswarm.controller "ForgotCtrl", ($scope, $http, $location, AuthenticationServ $http.post("/user/spree_user/password", {spree_user: $scope.spree_user}).success (data)-> $scope.sent = true .error (data) -> - $scope.errors = "Email address not found" + $scope.errors = t 'email_not_found' else - $scope.errors = "You must provide an email address" + $scope.errors = t 'email_required' diff --git a/app/assets/javascripts/darkswarm/controllers/authentication/login_controller.js.coffee b/app/assets/javascripts/darkswarm/controllers/authentication/login_controller.js.coffee index 144cf0dfef..f91e137ca7 100644 --- a/app/assets/javascripts/darkswarm/controllers/authentication/login_controller.js.coffee +++ b/app/assets/javascripts/darkswarm/controllers/authentication/login_controller.js.coffee @@ -2,7 +2,7 @@ Darkswarm.controller "LoginCtrl", ($scope, $http, $window, AuthenticationService $scope.path = "/login" $scope.submit = -> - Loading.message = "Hold on a moment, we're logging you in" + Loading.message = t 'logging_in' $http.post("/user/spree_user/sign_in", {spree_user: $scope.spree_user}).success (data)-> if Redirections.after_login $window.location.href = $window.location.origin + Redirections.after_login diff --git a/app/assets/javascripts/darkswarm/controllers/checkout/payment_controller.js.coffee b/app/assets/javascripts/darkswarm/controllers/checkout/payment_controller.js.coffee index 374f0b35d5..924df3c447 100644 --- a/app/assets/javascripts/darkswarm/controllers/checkout/payment_controller.js.coffee +++ b/app/assets/javascripts/darkswarm/controllers/checkout/payment_controller.js.coffee @@ -3,18 +3,18 @@ Darkswarm.controller "PaymentCtrl", ($scope, $timeout) -> $scope.name = "payment" $scope.months = [ - {key: "January", value: "1"}, - {key: "February", value: "2"}, - {key: "March", value: "3"}, - {key: "April", value: "4"}, - {key: "May", value: "5"}, - {key: "June", value: "6"}, - {key: "July", value: "7"}, - {key: "August", value: "8"}, - {key: "September", value: "9"}, - {key: "October", value: "10"}, - {key: "November", value: "11"}, - {key: "December", value: "12"}, + {key: t("january"), value: "1"}, + {key: t("february"), value: "2"}, + {key: t("march"), value: "3"}, + {key: t("april"), value: "4"}, + {key: t("may"), value: "5"}, + {key: t("june"), value: "6"}, + {key: t("july"), value: "7"}, + {key: t("august"), value: "8"}, + {key: t("september"), value: "9"}, + {key: t("october"), value: "10"}, + {key: t("november"), value: "11"}, + {key: t("december"), value: "12"}, ] $scope.years = [moment().year()..(moment().year()+15)] diff --git a/app/assets/javascripts/darkswarm/directives/change_hub.js.coffee b/app/assets/javascripts/darkswarm/directives/change_hub.js.coffee index a699e18902..8629edfce2 100644 --- a/app/assets/javascripts/darkswarm/directives/change_hub.js.coffee +++ b/app/assets/javascripts/darkswarm/directives/change_hub.js.coffee @@ -10,7 +10,7 @@ Darkswarm.directive "ofnChangeHub", (CurrentHub, Cart) -> if cart_will_need_emptying() elm.bind 'click', (ev)-> - if confirm "Are you sure? This will change your selected hub and remove any items in your shopping cart." + if confirm t('confirm_hub_change') Cart.clear() else ev.preventDefault() diff --git a/app/assets/javascripts/darkswarm/directives/change_order_cycle.js.coffee b/app/assets/javascripts/darkswarm/directives/change_order_cycle.js.coffee index a747e5c219..b2478a6fad 100644 --- a/app/assets/javascripts/darkswarm/directives/change_order_cycle.js.coffee +++ b/app/assets/javascripts/darkswarm/directives/change_order_cycle.js.coffee @@ -12,7 +12,7 @@ Darkswarm.directive "ofnChangeOrderCycle", (OrderCycle, Cart, storage) -> elm.bind 'change', (ev)-> if cart_needs_emptying() - if confirm "Are you sure? This will change your selected order cycle and remove any items in your shopping cart." + if confirm t('confirm_oc_change') Cart.clear() scope.changeOrderCycle() else diff --git a/app/assets/javascripts/darkswarm/directives/map_search.js.coffee b/app/assets/javascripts/darkswarm/directives/map_search.js.coffee index 88456db2a3..f67407ffb3 100644 --- a/app/assets/javascripts/darkswarm/directives/map_search.js.coffee +++ b/app/assets/javascripts/darkswarm/directives/map_search.js.coffee @@ -3,7 +3,7 @@ Darkswarm.directive 'mapSearch', ($timeout)-> restrict: 'E' require: '^googleMap' replace: true - template: '' + template: '' link: (scope, elem, attrs, ctrl)-> $timeout => map = ctrl.getMap() diff --git a/app/assets/javascripts/darkswarm/directives/registration_limit_modal.js.coffee b/app/assets/javascripts/darkswarm/directives/registration_limit_modal.js.coffee index 2b38b3d31f..fce9a7ee59 100644 --- a/app/assets/javascripts/darkswarm/directives/registration_limit_modal.js.coffee +++ b/app/assets/javascripts/darkswarm/directives/registration_limit_modal.js.coffee @@ -9,5 +9,5 @@ Darkswarm.directive "ofnRegistrationLimitModal", (Navigation, $modal, Loading) - scope.modalInstance.result.then scope.close, scope.close scope.close = -> - Loading.message = "Taking you back to the home page" + Loading.message = t 'going_back_to_home_page' Navigation.go "/" diff --git a/app/assets/javascripts/darkswarm/filters/dates.js.coffee b/app/assets/javascripts/darkswarm/filters/dates.js.coffee index d223411e99..7b5dd861d5 100644 --- a/app/assets/javascripts/darkswarm/filters/dates.js.coffee +++ b/app/assets/javascripts/darkswarm/filters/dates.js.coffee @@ -5,6 +5,6 @@ Darkswarm.filter "date_in_words", -> Darkswarm.filter "sensible_timeframe", (date_in_wordsFilter)-> (date) -> if moment().add('days', 2) < moment(date) - "Orders open" + t 'orders_open' else - "Closing #{date_in_wordsFilter(date)}" + t('closing') + date_in_wordsFilter(date) diff --git a/app/assets/javascripts/darkswarm/i18n.js.coffee b/app/assets/javascripts/darkswarm/i18n.js.coffee new file mode 100644 index 0000000000..857437a51d --- /dev/null +++ b/app/assets/javascripts/darkswarm/i18n.js.coffee @@ -0,0 +1,15 @@ +# Declares the translation function t. +# You can use t('login') in Javascript. +window.t = (key, options = {}) -> + if I18n == undefined + console.log 'The I18n object is undefined. Cannot translate text.' + return key + text = I18n[key] + return key if text == undefined + text = text.split("%{#{name}}").join(value) for name, value of options + text + +# Provides the translation function t on all scopes. +# You can write {{t('login')}} in all templates. +window.Darkswarm.run ($rootScope) -> + $rootScope.t = t diff --git a/app/assets/javascripts/darkswarm/mixins/fieldset_mixin.js.coffee b/app/assets/javascripts/darkswarm/mixins/fieldset_mixin.js.coffee index ee4058221c..e5aa1375c0 100644 --- a/app/assets/javascripts/darkswarm/mixins/fieldset_mixin.js.coffee +++ b/app/assets/javascripts/darkswarm/mixins/fieldset_mixin.js.coffee @@ -32,10 +32,10 @@ window.FieldsetMixin = ($scope)-> errors = for error, invalid of $scope.error(path) if invalid switch error - when "required" then "can't be blank" - when "number" then "must be number" - when "email" then "must be email address" + when "required" then t('error_required') + when "number" then t('error_number') + when "email" then t('error_email') #server_errors = $scope.Order.errors[path.replace('order.', '')] #errors.push server_errors if server_errors? - (errors.filter (error) -> error?).join ", " \ No newline at end of file + (errors.filter (error) -> error?).join ", " diff --git a/app/assets/javascripts/darkswarm/services/authentication_service.js.coffee b/app/assets/javascripts/darkswarm/services/authentication_service.js.coffee index c83022b579..10f75675f8 100644 --- a/app/assets/javascripts/darkswarm/services/authentication_service.js.coffee +++ b/app/assets/javascripts/darkswarm/services/authentication_service.js.coffee @@ -28,6 +28,6 @@ Darkswarm.factory "AuthenticationService", (Navigation, $modal, $location, Redir if location.pathname in ["/", "/checkout"] Navigation.navigate "/" else - Loading.message = "Taking you back to the home page" + Loading.message = t 'going_back_to_home_page' location.hash = "" location.pathname = "/" diff --git a/app/assets/javascripts/darkswarm/services/cart.js.coffee b/app/assets/javascripts/darkswarm/services/cart.js.coffee index 7550b151f0..ed7d9ac273 100644 --- a/app/assets/javascripts/darkswarm/services/cart.js.coffee +++ b/app/assets/javascripts/darkswarm/services/cart.js.coffee @@ -44,7 +44,7 @@ Darkswarm.factory 'Cart', (CurrentOrder, Variants, $timeout, $http, storage)-> unsaved: => @dirty = true $(window).bind "beforeunload", -> - "Your order hasn't been saved yet. Give us a few seconds to finish!" + t 'order_not_saved_yet' line_items_present: => @line_items.filter (li)-> diff --git a/app/assets/javascripts/darkswarm/services/checkout.js.coffee b/app/assets/javascripts/darkswarm/services/checkout.js.coffee index a12ed1ae45..652ecd02f9 100644 --- a/app/assets/javascripts/darkswarm/services/checkout.js.coffee +++ b/app/assets/javascripts/darkswarm/services/checkout.js.coffee @@ -6,7 +6,7 @@ Darkswarm.factory 'Checkout', (CurrentOrder, ShippingMethods, PaymentMethods, $h ship_address_same_as_billing: true submit: -> - Loading.message = "Submitting your order: please wait" + Loading.message = t 'submitting_order' $http.put('/checkout', {order: @preprocess()}).success (data, status)=> Navigation.go data.path .error (response, status)=> diff --git a/app/assets/javascripts/darkswarm/services/enterprise_registration_service.js.coffee b/app/assets/javascripts/darkswarm/services/enterprise_registration_service.js.coffee index 702a382eb0..c4055bb93c 100644 --- a/app/assets/javascripts/darkswarm/services/enterprise_registration_service.js.coffee +++ b/app/assets/javascripts/darkswarm/services/enterprise_registration_service.js.coffee @@ -11,7 +11,7 @@ Darkswarm.factory "EnterpriseRegistrationService", ($http, RegistrationService, @enterprise[key] = value create: => - Loading.message = "Creating " + @enterprise.name + Loading.message = t('creating') + " " + @enterprise.name $http( method: "POST" url: "/api/enterprises" @@ -28,14 +28,13 @@ Darkswarm.factory "EnterpriseRegistrationService", ($http, RegistrationService, Loading.clear() if data?.errors? errors = ("#{k.capitalize()} #{v[0]}" for k, v of data.errors when v.length > 0) - alert "Failed to create your enterprise.\n" + errors.join('\n') + alert t('failed_to_create_enterprise') + "\n" + errors.join('\n') else - alert('Failed to create your enterprise.\nPlease ensure all fields are completely filled out.') + alert(t('failed_to_create_enterprise_unknown')) ) - # RegistrationService.select('about') update: (step) => - Loading.message = "Updating " + @enterprise.name + Loading.message = t('updating') + " " + @enterprise.name $http( method: "PUT" url: "/api/enterprises/#{@enterprise.id}" @@ -48,9 +47,8 @@ Darkswarm.factory "EnterpriseRegistrationService", ($http, RegistrationService, RegistrationService.select(step) ).error((data) -> Loading.clear() - alert('Failed to update your enterprise.\nPlease ensure all fields are completely filled out.') + alert(t('failed_to_create_enterprise_unknown')) ) - # RegistrationService.select(step) prepare: => enterprise = {} diff --git a/app/assets/javascripts/darkswarm/services/filter_selectors.js.coffee b/app/assets/javascripts/darkswarm/services/filter_selectors.js.coffee index 47ed12806d..ca80ae344c 100644 --- a/app/assets/javascripts/darkswarm/services/filter_selectors.js.coffee +++ b/app/assets/javascripts/darkswarm/services/filter_selectors.js.coffee @@ -16,11 +16,11 @@ Darkswarm.factory "FilterSelectorsService", -> filterText: (active)=> total = @totalActive() if total == 0 - if active then "Hide filters" else "Filter by" + if active then t('hide_filters') else t('filter_by') else if total == 1 - "1 filter applied" + t 'one_filter_applied' else - "#{@totalActive()} filters applied" + @totalActive() + t('x_filters_applied') clearAll: => for selector in @selectors diff --git a/app/assets/javascripts/darkswarm/services/registration_service.js.coffee b/app/assets/javascripts/darkswarm/services/registration_service.js.coffee index 530d118025..bb45a7ad79 100644 --- a/app/assets/javascripts/darkswarm/services/registration_service.js.coffee +++ b/app/assets/javascripts/darkswarm/services/registration_service.js.coffee @@ -19,5 +19,5 @@ angular.module('Darkswarm').factory "RegistrationService", (Navigation, $modal, @current_step close: -> - Loading.message = "Taking you back to the home page" + Loading.message = t 'going_back_to_home_page' Navigation.go "/" diff --git a/app/assets/javascripts/templates/forgot.html.haml b/app/assets/javascripts/templates/forgot.html.haml index 646d5832c2..ebe5c36abd 100644 --- a/app/assets/javascripts/templates/forgot.html.haml +++ b/app/assets/javascripts/templates/forgot.html.haml @@ -1,5 +1,5 @@ %tab#forgot{"ng-controller" => "ForgotCtrl", - heading: "Forgot Password?", + heading: "{{t('forgot_password')}}", active: "active(path)", select: "select(path)"} @@ -8,7 +8,7 @@ .row .large-12.columns .alert-box.success.radius{"ng-show" => "sent"} - An email with instructions on resetting your password has been sent! + {{t('password_reset_sent')}} %div{"ng-show" => "!sent"} .alert-box.alert{"ng-show" => "errors != null"} @@ -16,7 +16,7 @@ .row .large-12.columns - %label{for: "email"} Your email + %label{for: "email"} {{t('signup_email')}} %input.title.input-text{name: "email", type: "email", id: "email", @@ -27,4 +27,4 @@ %input.button.primary{name: "commit", tabindex: "3", type: "submit", - value: "Reset password"} + value: "{{t('reset_password')}}"} diff --git a/app/assets/javascripts/templates/login.html.haml b/app/assets/javascripts/templates/login.html.haml index 992dfd265a..f002a393a1 100644 --- a/app/assets/javascripts/templates/login.html.haml +++ b/app/assets/javascripts/templates/login.html.haml @@ -1,5 +1,5 @@ %tab#login-content{"ng-controller" => "LoginCtrl", - heading: "Log in", + heading: "{{t('label_login')}}", active: "active(path)", select: "select(path)"} %form{"ng-submit" => "submit()"} @@ -9,7 +9,7 @@ {{ errors }} .row .large-12.columns - %label{for: "email"} Email + %label{for: "email"} {{t('email')}} %input.title.input-text{name: "email", type: "email", id: "email", @@ -17,7 +17,7 @@ "ng-model" => "spree_user.email"} .row .large-12.columns - %label{for: "password"} Password + %label{for: "password"} {{t('password')}} %input.title.input-text{name: "password", type: "password", id: "password", @@ -31,10 +31,10 @@ id: "remember_me", value: "1", "ng-model" => "spree_user.remember_me"} - %label{for: "remember_me"} Remember Me + %label{for: "remember_me"} {{t('remember_me')}} .row .large-12.columns %input.button.primary{name: "commit", tabindex: "3", type: "submit", - value: "Log in"} + value: "{{t('label_login')}}"} diff --git a/app/assets/javascripts/templates/partials/contact.html.haml b/app/assets/javascripts/templates/partials/contact.html.haml index 165fd69d80..da8fdaa8ac 100644 --- a/app/assets/javascripts/templates/partials/contact.html.haml +++ b/app/assets/javascripts/templates/partials/contact.html.haml @@ -1,6 +1,6 @@ %div.contact-container{bindonce: true} %div.modal-centered{"bo-if" => "enterprise.email || enterprise.website || enterprise.phone"} - %p.modal-header Contact + %p.modal-header {{t('contact')}} %p{"bo-if" => "enterprise.phone", "bo-text" => "enterprise.phone"} %p.word-wrap{"ng-if" => "enterprise.email"} diff --git a/app/assets/javascripts/templates/partials/enterprise_details.html.haml b/app/assets/javascripts/templates/partials/enterprise_details.html.haml index 3a9d97f59e..2d896baf3c 100644 --- a/app/assets/javascripts/templates/partials/enterprise_details.html.haml +++ b/app/assets/javascripts/templates/partials/enterprise_details.html.haml @@ -3,7 +3,7 @@ / TODO: Rob add logic for taxons and properties too: / %div{"ng-if" => "enterprise.long_description.length > 0 || enterprise.logo"} %div - %p.modal-header About + %p.modal-header {{t('label_about')}} / TODO: Rob - add in taxons and properties and property pop-overs -# TODO: Add producer taxons and properties here diff --git a/app/assets/javascripts/templates/partials/follow.html.haml b/app/assets/javascripts/templates/partials/follow.html.haml index 4e2a00086a..c4081cd94f 100644 --- a/app/assets/javascripts/templates/partials/follow.html.haml +++ b/app/assets/javascripts/templates/partials/follow.html.haml @@ -1,5 +1,5 @@ %div.modal-centered{bindonce: true, "bo-if" => "enterprise.twitter || enterprise.facebook || enterprise.linkedin || enterprise.instagram"} - %p.modal-header Follow + %p.modal-header {{t('follow')}} .follow-icons %span{"bo-if" => "enterprise.twitter"} %a{"bo-href-i" => "http://twitter.com/{{enterprise.twitter}}", target: "_blank"} diff --git a/app/assets/javascripts/templates/partials/hub_details.html.haml b/app/assets/javascripts/templates/partials/hub_details.html.haml index 17fabe846a..c7282abe80 100644 --- a/app/assets/javascripts/templates/partials/hub_details.html.haml +++ b/app/assets/javascripts/templates/partials/hub_details.html.haml @@ -2,16 +2,16 @@ .cta-container.small-12.columns .row .small-4.columns - %label{"active-table-hub-link" => "enterprise", change: "Change shop to:", shop: "Shop now at:"} + %label{"active-table-hub-link" => "enterprise", change: "{{t('change_shop')}}", shop: "{{t('shop_at')}}"} .small-8.columns.right %label.right{"bo-if" => "enterprise.pickup || enterprise.delivery"} - Delivery options: + {{t('hubs_delivery_options')}}: %span{"bo-if" => "enterprise.pickup"} %i.ofn-i_038-takeaway - Pickup + {{t('hubs_pickup')}} %span{"bo-if" => "enterprise.delivery"} %i.ofn-i_039-delivery - Delivery + {{t('hubs_delivery')}} .row .columns.small-12 %a.cta-hub{"bo-href" => "enterprise.path", diff --git a/app/assets/javascripts/templates/partials/producer_details.html.haml b/app/assets/javascripts/templates/partials/producer_details.html.haml index 08ac6ea1f1..36718e0cb9 100644 --- a/app/assets/javascripts/templates/partials/producer_details.html.haml +++ b/app/assets/javascripts/templates/partials/producer_details.html.haml @@ -6,10 +6,7 @@ .row .columns.small-12.fat %div{"bo-if" => "enterprise.name"} - %label - Shop for - %span.turquoise{"bo-text" => "enterprise.name"} - products at: + %label{"bo-html" => "t('shop_for_products_html', {enterprise: enterprise.name})"} %div.show-for-medium-up{"bo-if" => "!enterprise.name"}   .row.cta-container diff --git a/app/assets/javascripts/templates/price_breakdown.html.haml b/app/assets/javascripts/templates/price_breakdown.html.haml index 21104b71a0..8bb6bb5caf 100644 --- a/app/assets/javascripts/templates/price_breakdown.html.haml +++ b/app/assets/javascripts/templates/price_breakdown.html.haml @@ -4,35 +4,35 @@ .collapsed{"ng-show" => "!expanded"} %price-percentage{percentage: 'variant.basePricePercentage'} %a{"ng-click" => "expanded = !expanded"} - Full price breakdown + {{t('price_breakdown')}} %i.ofn-i_005-caret-down .expanded{"ng-show" => "expanded"} %ul %li.cost .right {{ variant.price | localizeCurrency }} - Item cost + {{t('item_cost')}} %li.admin-fee{"bo-if" => "variant.fees.admin"} .right {{ variant.fees.admin | localizeCurrency }} - Admin fee + {{t('admin_fee')}} %li.sales-fee{"bo-if" => "variant.fees.sales"} .right {{ variant.fees.sales | localizeCurrency }} - Sales fee + {{t('sales_fee')}} %li.packing-fee{"bo-if" => "variant.fees.packing"} .right {{ variant.fees.packing | localizeCurrency }} - Packing fee + {{t('packing_fee')}} %li.transport-fee{"bo-if" => "variant.fees.transport"} .right {{ variant.fees.transport | localizeCurrency }} - Transport fee + {{t('transport_fee')}} %li.fundraising-fee{"bo-if" => "variant.fees.fundraising"} .right {{ variant.fees.fundraising | localizeCurrency }} - Fundraising fee + {{t('fundraising_fee')}} %li.total %strong .right = {{ variant.price_with_fees | localizeCurrency }}   %a{"ng-click" => "expanded = !expanded"} - Price graph + {{t('price_graph')}} %i.ofn-i_006-caret-up diff --git a/app/assets/javascripts/templates/price_percentage.html.haml b/app/assets/javascripts/templates/price_percentage.html.haml index e577d86d7a..bb3ce9d01f 100644 --- a/app/assets/javascripts/templates/price_percentage.html.haml +++ b/app/assets/javascripts/templates/price_percentage.html.haml @@ -1,5 +1,5 @@ .progress - .right Fees + .right {{t('fees')}} .meter - Item cost + {{t('item_cost')}} diff --git a/app/assets/javascripts/templates/product_modal.html.haml b/app/assets/javascripts/templates/product_modal.html.haml index 481fa67c20..294e8738eb 100644 --- a/app/assets/javascripts/templates/product_modal.html.haml +++ b/app/assets/javascripts/templates/product_modal.html.haml @@ -3,7 +3,7 @@ .columns.small-12.large-6.product-header %h3{"bo-text" => "product.name"} %span - %em from + %em {{t('products_from')}} %span{"bo-text" => "enterprise.name"} %br diff --git a/app/assets/javascripts/templates/registration/about.html.haml b/app/assets/javascripts/templates/registration/about.html.haml index 9c57240dfe..4742d5deb1 100644 --- a/app/assets/javascripts/templates/registration/about.html.haml +++ b/app/assets/javascripts/templates/registration/about.html.haml @@ -3,9 +3,9 @@ .row .small-12.columns %header - %h2 Nice one! + %h2 {{t('enterprise_about_headline')}} %h5 - Now let's flesh out the details about + {{t('enterprise_about_message')}} %span{ ng: { class: "{brick: !enterprise.is_primary_producer, turquoise: enterprise.is_primary_producer}" } } {{ enterprise.name }} @@ -13,45 +13,45 @@ .row .small-12.columns .alert-box.info{ "ofn-inline-alert" => true, ng: { show: "visible" } } - %h6 Success! {{ enterprise.name }} added to the Open Food Network - %span If you exit this wizard at any stage, you need to click the confirmation link in the email you have received. This will take you to your admin interface where you can continue setting up your profile. + %h6 {{t('enterprise_success', {enterprise: enterprise.name})}} + %span {{t('enterprise_registration_exit_message')}} %a.close{ ng: { click: "close()" } } × .small-12.large-8.columns .row .small-12.columns .field - %label{ for: 'enterprise_description' } Short Description: - %input.chunky{ id: 'enterprise_description', placeholder: "A short sentence describing your enterprise", ng: { model: 'enterprise.description' } } + %label{ for: 'enterprise_description' } {{t('enterprise_description')}}: + %input.chunky{ id: 'enterprise_description', placeholder: "{{t('enterprise_description_placeholder')}}", ng: { model: 'enterprise.description' } } .row .small-12.columns .field - %label{ for: 'enterprise_long_desc' } Long Description: - %textarea.chunky{ id: 'enterprise_long_desc', rows: 6, placeholder: "This is your opportunity to tell the story of your enterprise - what makes you different and wonderful? We'd suggest keeping your description to under 600 characters or 150 words.", ng: { model: 'enterprise.long_description' } } - %small {{ enterprise.long_description.length }} characters / up to 600 recommended + %label{ for: 'enterprise_long_desc' } {{t('enterprise_long_desc')}}: + %textarea.chunky{ id: 'enterprise_long_desc', rows: 6, placeholder: "{{t('enterprise_long_desc_placeholder')}}", ng: { model: 'enterprise.long_description' } } + %small {{t('enterprise_long_desc_length', {num: enterprise.long_description.length})}} .small-12.large-4.columns .row .small-12.columns .field - %label{ for: 'enterprise_abn' } ABN: - %input.chunky{ id: 'enterprise_abn', placeholder: "eg. 99 123 456 789", ng: { model: 'enterprise.abn' } } + %label{ for: 'enterprise_abn' } {{t('enterprise_abn')}}: + %input.chunky{ id: 'enterprise_abn', placeholder: "{{t('enterprise_abn_placeholder')}}", ng: { model: 'enterprise.abn' } } .row .small-12.columns .field - %label{ for: 'enterprise_acn' } ACN: - %input.chunky{ id: 'enterprise_acn', placeholder: "eg. 123 456 789", ng: { model: 'enterprise.acn' } } + %label{ for: 'enterprise_acn' } {{t('enterprise_acn')}}: + %input.chunky{ id: 'enterprise_acn', placeholder: "{{t('enterprise_acn_placeholder')}}", ng: { model: 'enterprise.acn' } } .row .small-12.columns .field %label{ for: 'enterprise_charges_sales_tax' }= t(:charges_sales_tax) %input{ id: 'enterprise_charges_sales_tax_true', type: 'radio', name: 'charges_sales_tax', value: 'true', required: true, ng: { model: 'enterprise.charges_sales_tax' } } - %label{ for: 'enterprise_charges_sales_tax_true' } Yes + %label{ for: 'enterprise_charges_sales_tax_true' } {{t('yes')}} %input{ id: 'enterprise_charges_sales_tax_false', type: 'radio', name: 'charges_sales_tax', value: 'false', required: true, ng: { model: 'enterprise.charges_sales_tax' } } - %label{ for: 'enterprise_charges_sales_tax_false' } No + %label{ for: 'enterprise_charges_sales_tax_false' } {{t('no')}} %span.error.small-12.columns{ ng: { show: "about.charges_sales_tax.$error.required && submitted" } } - You need to make a selection. + {{t('enterprise_tax_required')}} .row.buttons.pad-top .small-12.columns - %input.button.primary.right{ type: "submit", value: "Continue" } + %input.button.primary.right{ type: "submit", value: "{{t('continue')}}" } diff --git a/app/assets/javascripts/templates/registration/contact.html.haml b/app/assets/javascripts/templates/registration/contact.html.haml index 916a614c0b..88c217e456 100644 --- a/app/assets/javascripts/templates/registration/contact.html.haml +++ b/app/assets/javascripts/templates/registration/contact.html.haml @@ -3,28 +3,28 @@ .row .small-12.columns %header - %h2 Greetings! + %h2 {{t('registration_greeting')}} %h5 - Who is responsible for managing {{ enterprise.name }}? + {{t('who_is_managing_enterprise', {enterprise: enterprise.name})}} %form{ name: 'contact', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "selectIfValid('type',contact)" } } .row.content .small-12.medium-12.large-7.columns .row .small-12.columns.field - %label{ for: 'enterprise_contact' } Primary Contact: + %label{ for: 'enterprise_contact' } {{t('enterprise_contact')}}: %input.chunky.small-12.columns{ id: 'enterprise_contact', name: 'contact', required: true, placeholder: "Contact Name", ng: { model: 'enterprise.contact' } } %span.error.small-12.columns{ ng: { show: "contact.contact.$error.required && submitted" } } - You need to enter a primary contact. + {{t('enterprise_contact_required')}} .row .small-12.columns.field - %label{ for: 'enterprise_email' } Email address: + %label{ for: 'enterprise_email' } {{t('enterprise_email')}}: %input.chunky.small-12.columns{ id: 'enterprise_email', name: 'email', type: 'email', required: true, placeholder: "eg. charlie@thefarm.com", ng: { model: 'enterprise.email' } } %span.error.small-12.columns{ ng: { show: "(contact.email.$error.email || contact.email.$error.required) && submitted" } } - You need to enter valid email address. + {{t('enterprise_email_required')}} .row .small-12.columns.field - %label{ for: 'enterprise_phone' } Phone number: + %label{ for: 'enterprise_phone' } {{t('enterprise_phone')}}: %input.chunky.small-12.columns{ id: 'enterprise_phone', name: 'phone', placeholder: "eg. (03) 1234 5678", ng: { model: 'enterprise.phone' } } .small-12.medium-12.large-5.hide-for-small-only / %h6 @@ -43,5 +43,5 @@ .row.buttons .small-12.columns - %input.button.secondary{ type: "button", value: "Back", ng: { click: "select('details')" } } - %input.button.primary.right{ type: "submit", value: "Continue" } + %input.button.secondary{ type: "button", value: "{{t('back')}}", ng: { click: "select('details')" } } + %input.button.primary.right{ type: "submit", value: "{{t('continue')}}" } diff --git a/app/assets/javascripts/templates/registration/details.html.haml b/app/assets/javascripts/templates/registration/details.html.haml index f1c0503f78..7543cc30ce 100644 --- a/app/assets/javascripts/templates/registration/details.html.haml +++ b/app/assets/javascripts/templates/registration/details.html.haml @@ -3,75 +3,62 @@ .row .small-12.columns %header - %h2 Let's Get Started - %h5{ bo: { if: "enterprise.type != 'own'" } } Woot! First we need to know a little bit about your enterprise: - %h5{ bo: { if: "enterprise.type == 'own'" } } Woot! First we need to know a little bit about your farm: + %h2 {{t('registration_detail_headline')}} + %h5{ bo: { if: "enterprise.type != 'own'" } } {{t('registration_detail_enterprise')}} + %h5{ bo: { if: "enterprise.type == 'own'" } } {{t('registration_detail_producer')}} %form{ name: 'details', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "selectIfValid('contact',details)" } } .row .small-12.medium-9.large-12.columns.end .field - %label{ for: 'enterprise_name', bo: { if: "enterprise.type != 'own'" } } Enterprise Name: - %label{ for: 'enterprise_name', bo: { if: "enterprise.type == 'own'" } } Farm Name: - %input.chunky{ id: 'enterprise_name', name: 'name', placeholder: "e.g. Charlie's Awesome Farm", required: true, ng: { model: 'enterprise.name' } } + %label{ for: 'enterprise_name', bo: { if: "enterprise.type != 'own'" } } {{t('registration_detail_name_enterprise')}} + %label{ for: 'enterprise_name', bo: { if: "enterprise.type == 'own'" } } {{t('registration_detail_name_producer')}} + %input.chunky{ id: 'enterprise_name', name: 'name', placeholder: "{{t('registration_detail_name_placeholder')}}", required: true, ng: { model: 'enterprise.name' } } %span.error{ ng: { show: "details.name.$error.required && submitted" } } - Please choose a unique name for your enterprise + {{t('registration_detail_name_error')}} .row .small-12.medium-9.large-6.columns .field - %label{ for: 'enterprise_address' } Address line 1: - %input.chunky{ id: 'enterprise_address', name: 'address1', required: true, placeholder: "e.g. 123 Cranberry Drive", required: true, ng: { model: 'enterprise.address.address1' } } + %label{ for: 'enterprise_address' } {{t('registration_detail_address1')}} + %input.chunky{ id: 'enterprise_address', name: 'address1', required: true, placeholder: "{{t('registration_detail_address1_placeholder')}}", required: true, ng: { model: 'enterprise.address.address1' } } %span.error{ ng: { show: "details.address1.$error.required && submitted" } } - Please enter an address + {{t('registration_detail_address1_error')}} .field - %label{ for: 'enterprise_address2' } Address line 2: + %label{ for: 'enterprise_address2' } {{t('registration_detail_address2')}} %input.chunky{ id: 'enterprise_address2', name: 'address2', required: false, placeholder: "", required: false, ng: { model: 'enterprise.address.address2' } } .small-12.medium-9.large-6.columns.end .row .small-12.medium-8.large-8.columns .field - %label{ for: 'enterprise_city' } Suburb: - %input.chunky{ id: 'enterprise_city', name: 'city', required: true, placeholder: "e.g. Northcote", ng: { model: 'enterprise.address.city' } } + %label{ for: 'enterprise_city' } {{t('registration_detail_suburb')}} + %input.chunky{ id: 'enterprise_city', name: 'city', required: true, placeholder: "{{t('registration_detail_suburb_placeholder')}}", ng: { model: 'enterprise.address.city' } } %span.error{ ng: { show: "details.city.$error.required && submitted" } } - Please enter a suburb + {{t('registration_detail_suburb_error')}} .small-12.medium-4.large-4.columns .field - %label{ for: 'enterprise_zipcode' } Postcode: - %input.chunky{ id: 'enterprise_zipcode', name: 'zipcode', required: true, placeholder: "e.g. 3070", ng: { model: 'enterprise.address.zipcode' } } + %label{ for: 'enterprise_zipcode' } {{t('registration_detail_postcode')}} + %input.chunky{ id: 'enterprise_zipcode', name: 'zipcode', required: true, placeholder: "{{t('registration_detail_postcode_placeholder')}}", ng: { model: 'enterprise.address.zipcode' } } %span.error{ ng: { show: "details.zipcode.$error.required && submitted" } } - Postcode required + {{t('registration_detail_postcode_error')}} .row .small-12.medium-4.large-4.columns .field - %label{ for: 'enterprise_state' } State: + %label{ for: 'enterprise_state' } {{t('registration_detail_state')}} %select.chunky{ id: 'enterprise_state', name: 'state', ng: { model: 'enterprise.address.state_id', options: 's.id as s.abbr for s in enterprise.country.states', show: 'countryHasStates()', required: 'countryHasStates()' } } %span.error{ ng: { show: "details.state.$error.required && submitted" } } - State required + {{t('registration_detail_state_error')}} .small-12.medium-8.large-8.columns .field - %label{ for: 'enterprise_country' } Country: + %label{ for: 'enterprise_country' } {{t('registration_detail_country')}} %select.chunky{ id: 'enterprise_country', name: 'country', required: true, ng: { model: 'enterprise.country', options: 'c as c.name for c in countries' } } %span.error{ ng: { show: "details.country.$error.required && submitted" } } - Please select a country - / .small-12.medium-12.large-5.hide-for-small-only - / %h6 - / Location display - / %i.ofn-i_013-help.has-tip{ 'data-tooltip' => true, title: "Choose how you want to display your enterprise's address on the Open Food Network. By default, full location is shown everywhere including street name and number."} - / .row - / .small-12.columns - / %label.indent-checkbox - / %input{ type: 'checkbox', id: 'enterpise_suburb_only', ng: { model: 'enterprise.suburb_only' } } - / Hide my street name and street number from the public (ie. only show the suburb) - / .small-12.columns - / %label.indent-checkbox - / %input{ type: 'checkbox', id: 'enterprise_on_map', ng: { model: 'enterprise.on_map' } } - / Blur my location on the map (show an approximate, not exact pin) + {{t('registration_detail_country_error')}} .row.buttons .small-12.columns %hr - %input.button.primary.right{ type: "submit", value: "Continue" } + %input.button.primary.right{ type: "submit", value: "{{t('continue')}}" } diff --git a/app/assets/javascripts/templates/registration/finished.html.haml b/app/assets/javascripts/templates/registration/finished.html.haml index 46cca9daf5..92136147e1 100644 --- a/app/assets/javascripts/templates/registration/finished.html.haml +++ b/app/assets/javascripts/templates/registration/finished.html.haml @@ -2,23 +2,16 @@ .row .small-12.columns.pad-top %header - %h2 Finished! + %h2 {{t('registration_finished_headline')}} .panel.callout %p - Thanks for filling out the details for - %span{ ng: { class: "{brick: !enterprise.is_primary_producer, turquoise: enterprise.is_primary_producer}" } } - {{ enterprise.name }} - %p You can change or update your enterprise at any stage by logging into Open Food Network and going to Admin. + {{t('registration_finished_thanks', {enterprise: enterprise.name})}} + %p {{t('registration_finished_login')}} .row .small-12.columns.text-center %h4 - Activate - %span{ ng: { class: "{brick: !enterprise.is_primary_producer, turquoise: enterprise.is_primary_producer}" } } - {{ enterprise.name }} + {{t('registration_finished_activate', {enterprise: enterprise.name})}} - %p - We've sent a confirmation email to - %strong {{ enterprise.email }} if it hasn't been activated before. - %br Please follow the instructions there to make your enterprise visible on the Open Food Network. + %p{ "ng-bind-html" => "t('registration_finished_activate_instruction_html', {email: enterprise.email})"} - %a.button.primary{ type: "button", href: "/" } Open Food Network home > + %a.button.primary{ type: "button", href: "/" } {{t('registration_finished_action')}} > diff --git a/app/assets/javascripts/templates/registration/images.html.haml b/app/assets/javascripts/templates/registration/images.html.haml index 5b2ac39b5a..45d9cf2015 100644 --- a/app/assets/javascripts/templates/registration/images.html.haml +++ b/app/assets/javascripts/templates/registration/images.html.haml @@ -3,8 +3,8 @@ .row .small-12.columns %header - %h2 Thanks! - %h5 Let's upload some pretty pictures so your profile looks great! :) + %h2 {{t('registration_images_headline')}} + %h5 {{t('registration_images_description')}} %form{ name: 'images', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "select('social')" } } .row{ ng: { repeat: 'image_step in imageSteps', show: "imageStep == image_step" } } @@ -18,5 +18,5 @@ .row.buttons.pad-top{ ng: { if: "imageStep == 'promo'" } } .small-12.columns - %input.button.secondary{ type: "button", value: "Back", ng: { click: "imageSelect('logo')" } } - %input.button.primary.right{ type: "submit", value: "Continue" } + %input.button.secondary{ type: "button", value: "{{t('back')}}", ng: { click: "imageSelect('logo')" } } + %input.button.primary.right{ type: "submit", value: "{{t('continue')}}" } diff --git a/app/assets/javascripts/templates/registration/images/logo.html.haml b/app/assets/javascripts/templates/registration/images/logo.html.haml index 7dd08c90dc..9c0b02ca87 100644 --- a/app/assets/javascripts/templates/registration/images/logo.html.haml +++ b/app/assets/javascripts/templates/registration/images/logo.html.haml @@ -4,42 +4,42 @@ .row .small-12.columns.center %h4 - Step 1. Select Logo Image + {{t('select_logo')}} .row .small-12.columns.center %span.small - Tip: Square images will work best, preferably at least 300×300px + {{t('logo_tip')}} .row.pad-top .small-12.columns .image-select.small-12.columns - %label.small-12.columns.button{ for: 'image-select' } Choose a logo image + %label.small-12.columns.button{ for: 'image-select' } {{t('logo_label')}} %input#image-select{ type: 'file', hidden: true, 'nv-file-select' => true, uploader: "imageUploader", options: '{ alias: imageStep }' } .row.show-for-large-up .large-12.columns %span#or.large-12.columns - OR + {{t('action_or')}} .row.show-for-large-up .large-12.columns #image-over{ 'nv-file-over' => true, uploader: "imageUploader" } - Drag and drop your logo here + {{t('logo_drag')}} .small-12.medium-12.large-6.columns .row .small-12.columns.center .row .small-12.columns.center %h4 - Step 2. Review Your Logo + {{t('review_logo')}} .row .small-12.columns.center %span.small - Tip: for best results, your logo should fill the available space + {{t('review_logo_tip')}} .row.pad-top .small-12.columns.center #image-placeholder.logo %img{ ng: { show: "imageSrc() && !imageUploader.isUploading", src: '{{ imageSrc() }}' } } .message{ ng: { hide: "imageSrc() || imageUploader.isUploading" } } - Your logo will appear here for review once uploaded + {{t('logo_placeholder')}} .loading{ ng: { hide: "!imageUploader.isUploading" } } %img.spinner{ src: "/assets/spinning-circles.svg" } %br/ - Uploading... + {{t('uploading')}} diff --git a/app/assets/javascripts/templates/registration/images/promo.html.haml b/app/assets/javascripts/templates/registration/images/promo.html.haml index 6c3327c942..61a382ecaa 100644 --- a/app/assets/javascripts/templates/registration/images/promo.html.haml +++ b/app/assets/javascripts/templates/registration/images/promo.html.haml @@ -2,42 +2,42 @@ .row .small-12.columns.center %h4 - Step 3. Select Promo Image + {{t('select_promo_image')}} .row .small-12.medium-12.large-5.columns.center .row .small-12.columns.center %span.small - Tip: Shown as a banner, preferred size is 1200×260px + {{t('promo_image_tip')}} .row.pad-top .small-12.columns .image-select.small-12.columns - %label.small-12.columns.button{ for: 'image-select' } Choose a promo image + %label.small-12.columns.button{ for: 'image-select' } {{t('promo_image_label')}} %input#image-select{ type: 'file', hidden: true, 'nv-file-select' => true, uploader: "imageUploader", options: '{ alias: imageStep }' } .large-2.columns %span#or.horizontal.large-12.columns - OR + {{t('action_or')}} .large-5.columns #image-over{ 'nv-file-over' => true, uploader: "imageUploader" } - Drag and drop your promo here + {{t('promo_image_drag')}} .small-12.medium-12.large-12.columns.pad-top .row .small-12.columns.center %h4 - Step 4. Review Your Promo Banner + {{t('review_promo_image')}} .row .small-12.columns.center .row .small-12.columns.center %span.small - Tip: for best results, your promo image should fill the available space + {{t('review_promo_image_tip')}} .row.pad-top .small-12.columns.center #image-placeholder.promo %img{ ng: { show: "imageSrc() && !imageUploader.isUploading", src: '{{ imageSrc() }}' } } .message{ ng: { hide: "imageSrc() || imageUploader.isUploading" } } - Your logo will appear here for review once uploaded + {{t('promo_image_placeholder')}} .loading{ ng: { hide: "!imageUploader.isUploading" } } %img.spinner{ src: "/assets/spinning-circles.svg" } %br/ - Uploading... + {{t('uploading')}} diff --git a/app/assets/javascripts/templates/registration/introduction.html.haml b/app/assets/javascripts/templates/registration/introduction.html.haml index 48553de09a..6288c7aa4f 100644 --- a/app/assets/javascripts/templates/registration/introduction.html.haml +++ b/app/assets/javascripts/templates/registration/introduction.html.haml @@ -1,46 +1,41 @@ .row .small-12.columns %header - %h2 Hi there! + %h2 {{t('registration_greeting')}} %h4 %small %i.ofn-i_040-hub - You can now create a profile for your Producer or Hub + {{t('registration_intro')}} .hide-for-large-up %hr - %input.button.small.primary{ type: "button", value: "Let's get started!", ng: { click: "select('details')" } } + %input.button.small.primary{ type: "button", value: "{{t('registration_action')}}", ng: { click: "select('details')" } } %hr .row{ 'data-equalizer' => true } .small-12.medium-12.large-6.columns.pad-top{ 'data-equalizer-watch' => true } - %h5 You'll need: + %h5 {{t('registration_checklist')}}: %ul.check-list %li - 5-10 minutes + {{t('registration_time')}} %li - Enterprise address + {{t('registration_enterprise_address')}} %li - Primary contact details + {{t('registration_contact_details')}} %li - Your logo image + {{t('registration_logo')}} %li - Landscape image for your profile + {{t('registration_promo_image')}} %li - 'About Us' text + {{t('registration_about_us')}} .small-9.medium-8.large-5.columns.pad-top.end{ 'data-equalizer-watch' => true} %h5 - What do I get? - %p - Your profile helps people - %strong find - and - %strong contact - you on the Open Food Network. - %p Use this space to tell the story of your enterprise, to help drive connections to your social and online presence. - %p It's also the first step towards trading on the Open Food Network, or opening an online store. + {{t('registration_outcome_headline')}} + %p{ "ng-bind-html" => "t('registration_outcome1_html')" } + %p {{t('registration_outcome2')}} + %p {{t('registration_outcome3')}} .row.show-for-large-up .small-12.columns %hr - %input.button.primary.right{ type: "button", value: "Let's get started!", ng: { click: "select('details')" } } + %input.button.primary.right{ type: "button", value: "{{t('registration_action')}}", ng: { click: "select('details')" } } diff --git a/app/assets/javascripts/templates/registration/limit_reached.html.haml b/app/assets/javascripts/templates/registration/limit_reached.html.haml index 778d980289..776332b94c 100644 --- a/app/assets/javascripts/templates/registration/limit_reached.html.haml +++ b/app/assets/javascripts/templates/registration/limit_reached.html.haml @@ -1,16 +1,16 @@ .row .small-12.columns %header - %h2 Oh no! - %h4 You have reached the limit! + %h2 {{t('limit_reached_headline')}} + %h4 {{t('limit_reached_message')}} .row .small-12.medium-3.large-2.columns.text-right.hide-for-small-only %img{:src => "/assets/potatoes.png"} .small-12.medium-9.large-10.columns %p - You have reached the limit for the number of enterprises you are allowed to own on the + {{t('limit_reached_text')}} %strong Open Food Network. .row .small-12.columns %hr - %input.button.primary{ type: "button", value: "Return to the homepage", ng: { click: "close()" } } + %input.button.primary{ type: "button", value: "{{t('limit_reached_action')}}", ng: { click: "close()" } } diff --git a/app/assets/javascripts/templates/registration/social.html.haml b/app/assets/javascripts/templates/registration/social.html.haml index 4f448734f1..5225256eee 100644 --- a/app/assets/javascripts/templates/registration/social.html.haml +++ b/app/assets/javascripts/templates/registration/social.html.haml @@ -4,12 +4,9 @@ .row .small-12.columns %header - %h2 Final step! + %h2 {{t('enterprise_final_step')}} %h5 - How can people find - %span{ ng: { class: "{brick: !enterprise.is_primary_producer, turquoise: enterprise.is_primary_producer}" } } - {{ enterprise.name }} - online? + {{t('enterprise_social_text', {enterprise: enterprise.name})}} %form{ name: 'social', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "update('finished',social)" } } .row.content @@ -17,33 +14,33 @@ .row .small-12.columns .field - %label{ for: 'enterprise_website' } Website: - %input.chunky{ id: 'enterprise_website', placeholder: "eg. openfoodnetwork.org.au", ng: { model: 'enterprise.website' } } + %label{ for: 'enterprise_website' } {{t('website')}}: + %input.chunky{ id: 'enterprise_website', placeholder: "{{t('website_placeholder')}}", ng: { model: 'enterprise.website' } } .row .small-12.columns .field - %label{ for: 'enterprise_facebook' } Facebook: - %input.chunky{ id: 'enterprise_facebook', placeholder: "eg. www.facebook.com/PageNameHere", ng: { model: 'enterprise.facebook' } } + %label{ for: 'enterprise_facebook' } {{t('facebook')}}: + %input.chunky{ id: 'enterprise_facebook', placeholder: "{{t('facebook_placeholder')}}", ng: { model: 'enterprise.facebook' } } .row .small-12.columns .field - %label{ for: 'enterprise_linkedin' } LinkedIn: - %input.chunky{ id: 'enterprise_linkedin', placeholder: "eg. www.linkedin.com/YourNameHere", ng: { model: 'enterprise.linkedin' } } + %label{ for: 'enterprise_linkedin' } {{t('linkedin')}}: + %input.chunky{ id: 'enterprise_linkedin', placeholder: "{{t('linkedin_placeholder')}}", ng: { model: 'enterprise.linkedin' } } .small-12.large-5.columns .row .small-12.columns .field - %label{ for: 'enterprise_twitter' } Twitter: - %input.chunky{ id: 'enterprise_twitter', placeholder: "eg. @twitter_handle", ng: { model: 'enterprise.twitter' } } + %label{ for: 'enterprise_twitter' } {{t('twitter')}}: + %input.chunky{ id: 'enterprise_twitter', placeholder: "{{t('twitter_placeholder')}}", ng: { model: 'enterprise.twitter' } } .row .small-12.columns .field - %label{ for: 'enterprise_instagram' } Instagram: - %input.chunky{ id: 'enterprise_instagram', placeholder: "eg. @instagram_handle", ng: { model: 'enterprise.instagram' } } + %label{ for: 'enterprise_instagram' } {{t('instagram')}}: + %input.chunky{ id: 'enterprise_instagram', placeholder: "{{t('instagram_placeholder')}}", ng: { model: 'enterprise.instagram' } } .row.buttons .small-12.columns - %input.button.secondary{ type: "button", value: "Back", ng: { click: "select('images')" } } - %input.button.primary.right{ type: "submit", value: "Continue" } + %input.button.secondary{ type: "button", value: "{{t('back')}}", ng: { click: "select('images')" } } + %input.button.primary.right{ type: "submit", value: "{{t('continue')}}" } diff --git a/app/assets/javascripts/templates/registration/type.html.haml b/app/assets/javascripts/templates/registration/type.html.haml index 9593bfa89c..e1a5e09376 100644 --- a/app/assets/javascripts/templates/registration/type.html.haml +++ b/app/assets/javascripts/templates/registration/type.html.haml @@ -6,11 +6,9 @@ .small-12.columns %header %h2 - Last step to add - %span{ ng: { class: "{brick: !enterprise.is_primary_producer, turquoise: enterprise.is_primary_producer}" } } - {{ enterprise.name }}! + {{t('registration_type_headline', {enterprise: enterprise.name})}} %h4 - Are you a producer? + {{t('registration_type_question')}} %form{ name: 'type', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "create(type)" } } .row#enterprise-types{ 'data-equalizer' => true, bo: { if: "enterprise.type != 'own'" } } @@ -19,32 +17,32 @@ .small-12.medium-6.large-6.columns{ 'data-equalizer-watch' => true } %a.btnpanel#producer-panel{ href: "#", ng: { click: "enterprise.is_primary_producer = true", class: "{selected: enterprise.is_primary_producer}" } } %i.ofn-i_059-producer - %h4 Yes, I'm a producer + %h4 {{t('registration_type_producer')}} .small-12.medium-6.large-6.columns{ 'data-equalizer-watch' => true } %a.btnpanel#hub-panel{ href: "#", ng: { click: "enterprise.is_primary_producer = false", class: "{selected: enterprise.is_primary_producer == false}" } } %i.ofn-i_063-hub - %h4 No, I'm not a producer + %h4 {{t('registration_type_no_producer')}} .row .small-12.columns %input.chunky{ id: 'enterprise_is_primary_producer', name: 'is_primary_producer', hidden: true, required: true, ng: { model: 'enterprise.is_primary_producer' } } %span.error{ ng: { show: "type.is_primary_producer.$error.required && submitted" } } - Please choose one. Are you are producer? + {{t('registration_type_error')}} .row .small-12.columns .panel.callout .left %i.ofn-i_013-help   - %p Producers make yummy things to eat &/or drink. You're a producer if you grow it, raise it, brew it, bake it, ferment it, milk it or mould it. + %p {{t('registration_type_producer_help')}} .panel.callout .left %i.ofn-i_013-help   - %p If you’re not a producer, you’re probably someone who sells and distributes food. You might be a hub, coop, buying group, retailer, wholesaler or other. + %p {{t('registration_type_no_producer_help')}} .row.buttons .small-12.columns - %input.button.secondary{ type: "button", value: "Back", ng: { click: "select('contact')" } } - %input.button.primary.right{ type: "submit", value: "Create Profile" } + %input.button.secondary{ type: "button", value: "{{t('back')}}", ng: { click: "select('contact')" } } + %input.button.primary.right{ type: "submit", value: "{{t('create_profile')}}" } diff --git a/app/assets/javascripts/templates/registration_authentication.html.haml b/app/assets/javascripts/templates/registration_authentication.html.haml index c7bfbabeca..05e1d45154 100644 --- a/app/assets/javascripts/templates/registration_authentication.html.haml +++ b/app/assets/javascripts/templates/registration_authentication.html.haml @@ -1,7 +1,7 @@ .container .row.modal-centered - %h2 Welcome to the Open Food Network! - %h5 Start By Signing Up (or logging in): + %h2 {{t('welcome_to_ofn')}} + %h5 {{t('signup_or_login')}}: %div{"ng-controller" => "AuthenticationCtrl"} %tabset %ng-include{src: "'signup.html'"} @@ -9,9 +9,9 @@ %ng-include{src: "'forgot.html'"} %div{ ng: { show: "active('/signup')"} } %hr - Already have an account? + {{t('have_an_account')}} %a{ href: "", ng: { click: "select('/login')"}} - Log in now. + {{t('action_login')}} %a.close-reveal-modal{"ng-click" => "$close()"} %i.ofn-i_009-close diff --git a/app/assets/javascripts/templates/shop_variant.html.haml b/app/assets/javascripts/templates/shop_variant.html.haml index 04048f3cd0..1d6a090935 100644 --- a/app/assets/javascripts/templates/shop_variant.html.haml +++ b/app/assets/javascripts/templates/shop_variant.html.haml @@ -5,7 +5,7 @@ .bulk-buy.inline{"bo-if" => "variant.product.group_buy"} %i.ofn-i_056-bulk>< %em>< - \ Bulk + \ {{t('bulk')}} -# WITHOUT GROUP BUY .small-5.medium-3.large-3.columns.text-right{"bo-if" => "!variant.product.group_buy"} @@ -30,7 +30,7 @@ integer: true, min: 0, "ng-model" => "variant.line_item.quantity", - placeholder: "min", + placeholder: "{{t('shop_variant_quantity_min')}}", "ofn-disable-scroll" => true, max: "{{variant.on_demand && 9999 || variant.count_on_hand }}", name: "variants[{{variant.id}}]", id: "variants_{{variant.id}}"} @@ -40,7 +40,7 @@ integer: true, min: 0, "ng-model" => "variant.line_item.max_quantity", - placeholder: "max", + placeholder: "{{t('shop_variant_quantity_max')}}", "ofn-disable-scroll" => true, max: "{{variant.on_demand && 9999 || variant.count_on_hand }}", name: "variant_attributes[{{variant.id}}][max_quantity]"} diff --git a/app/assets/javascripts/templates/signup.html.haml b/app/assets/javascripts/templates/signup.html.haml index 28bec19b49..48f75e1a44 100644 --- a/app/assets/javascripts/templates/signup.html.haml +++ b/app/assets/javascripts/templates/signup.html.haml @@ -1,11 +1,11 @@ %tab#sign-up-content{"ng-controller" => "SignupCtrl", - heading: "Sign up", + heading: "{{t('label_signup')}}", active: "active(path)", select: "select(path)"} %form{"ng-submit" => "submit()"} .row .large-12.columns - %label{for: "email"} Your email + %label{for: "email"} {{t('signup_email')}} %input.title.input-text{name: "email", type: "email", id: "email", @@ -15,7 +15,7 @@ {{ errors.email.join(' ') }} .row .large-12.columns - %label{for: "password"} Choose a password + %label{for: "password"} {{t('choose_password')}} %input.title.input-text{name: "password", type: "password", id: "password", @@ -26,7 +26,7 @@ {{ errors.password.join(' ') }} .row .large-12.columns - %label{for: "password_confirmation"} Confirm password + %label{for: "password_confirmation"} {{t('confirm_password')}} %input.title.input-text{name: "password_confirmation", type: "password", id: "password_confirmation", @@ -38,4 +38,4 @@ %input.button.primary{name: "commit", tabindex: "3", type: "submit", - value: "Sign up now"} + value: "{{t('action_signup')}}"} diff --git a/app/views/layouts/_i18n_translations.html.haml b/app/views/layouts/_i18n_translations.html.haml new file mode 100644 index 0000000000..376c162d60 --- /dev/null +++ b/app/views/layouts/_i18n_translations.html.haml @@ -0,0 +1,5 @@ +- # TODO: load json from separate file that can be cached +%script + window.I18n = + = I18n.backend.send(:translations)[I18n.locale].with_indifferent_access.to_json.html_safe + diff --git a/app/views/layouts/darkswarm.html.haml b/app/views/layouts/darkswarm.html.haml index 88075a3171..b97efc0ed0 100644 --- a/app/views/layouts/darkswarm.html.haml +++ b/app/views/layouts/darkswarm.html.haml @@ -11,6 +11,7 @@ %link{href: "https://fonts.googleapis.com/css?family=Roboto:400,300italic,400italic,300,700,700italic|Oswald:300,400,700", rel: "stylesheet", type: "text/css"} = yield :scripts + = render "layouts/i18n_translations" %script{src: "//maps.googleapis.com/maps/api/js?libraries=places,geometry&sensor=false"} = split_stylesheet_link_tag "darkswarm/all" = javascript_include_tag "darkswarm/all" diff --git a/app/views/layouts/registration.html.haml b/app/views/layouts/registration.html.haml index 4709393fd0..320c80d35e 100644 --- a/app/views/layouts/registration.html.haml +++ b/app/views/layouts/registration.html.haml @@ -11,6 +11,7 @@ %link{href: "https://fonts.googleapis.com/css?family=Roboto:400,300italic,400italic,300,700,700italic|Oswald:300,400,700", rel: "stylesheet", type: "text/css"} = yield :scripts + = render "layouts/i18n_translations" %script{src: "//maps.googleapis.com/maps/api/js?libraries=places&sensor=false"} = stylesheet_link_tag "darkswarm/all" = javascript_include_tag "darkswarm/all" diff --git a/config/locales/en.yml b/config/locales/en.yml index a44f0317a9..d15ed32443 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -453,3 +453,181 @@ See the %{link} to find out more about %{sitename}'s features and to start using products_max_quantity: Max quantity products_distributor: Distributor products_distributor_info: When you select a distributor for your order, their address and pickup times will be displayed here. + + # keys used in javascript + password: Password + remember_me: Remember Me + are_you_sure: "Are you sure?" + orders_open: Orders open + closing: "Closing " + going_back_to_home_page: "Taking you back to the home page" + creating: Creating + updating: Updating + failed_to_create_enterprise: "Failed to create your enterprise." + failed_to_create_enterprise_unknown: "Failed to create your enterprise.\nPlease ensure all fields are completely filled out." + order_not_saved_yet: "Your order hasn't been saved yet. Give us a few seconds to finish!" + filter_by: "Filter by" + hide_filters: "Hide filters" + one_filter_applied: "1 filter applied" + x_filters_applied: " filters applied" + submitting_order: "Submitting your order: please wait" + confirm_hub_change: "Are you sure? This will change your selected hub and remove any items in your shopping cart." + confirm_oc_change: "Are you sure? This will change your selected order cycle and remove any items in your shopping cart." + location_placeholder: "Type in a location..." + error_required: "can't be blank" + error_number: "must be number" + error_email: "must be email address" + item_handling_fees: "Item Handling Fees (included in item totals)" + january: "January" + february: "February" + march: "March" + april: "April" + may: "May" + june: "June" + july: "July" + august: "August" + september: "September" + october: "October" + november: "November" + december: "December" + email_not_found: "Email address not found" + email_required: "You must provide an email address" + logging_in: "Hold on a moment, we're logging you in" + signup_email: "Your email" + choose_password: "Choose a password" + confirm_password: "Confirm password" + action_signup: "Sign up now" + welcome_to_ofn: "Welcome to the Open Food Network!" + signup_or_login: "Start By Signing Up (or logging in)" + have_an_account: "Already have an account?" + action_login: "Log in now." + forgot_password: "Forgot Password?" + password_reset_sent: "An email with instructions on resetting your password has been sent!" + reset_password: "Reset password" + registration_greeting: "Greetings!" + who_is_managing_enterprise: "Who is responsible for managing %{enterprise}?" + enterprise_contact: "Primary Contact" + enterprise_contact_required: "You need to enter a primary contact." + enterprise_email: "Email address" + enterprise_email_required: "You need to enter valid email address." + enterprise_phone: "Phone number" + back: "Back" + continue: "Continue" + limit_reached_headline: "Oh no!" + limit_reached_message: "You have reached the limit!" + limit_reached_text: "You have reached the limit for the number of enterprises you are allowed to own on the" + limit_reached_action: "Return to the homepage" + select_promo_image: "Step 3. Select Promo Image" + promo_image_tip: "Tip: Shown as a banner, preferred size is 1200×260px" + promo_image_label: "Choose a promo image" + action_or: "OR" + promo_image_drag: "Drag and drop your promo here" + review_promo_image: "Step 4. Review Your Promo Banner" + review_promo_image_tip: "Tip: for best results, your promo image should fill the available space" + promo_image_placeholder: "Your logo will appear here for review once uploaded" + uploading: "Uploading..." + select_logo: "Step 1. Select Logo Image" + logo_tip: "Tip: Square images will work best, preferably at least 300×300px" + logo_label: "Choose a logo image" + logo_drag: "Drag and drop your logo here" + review_logo: "Step 2. Review Your Logo" + review_logo_tip: "Tip: for best results, your logo should fill the available space" + logo_placeholder: "Your logo will appear here for review once uploaded" + enterprise_about_headline: "Nice one!" + enterprise_about_message: "Now let's flesh out the details about" + enterprise_success: "Success! %{enterprise} added to the Open Food Network " + enterprise_registration_exit_message: "If you exit this wizard at any stage, you need to click the confirmation link in the email you have received. This will take you to your admin interface where you can continue setting up your profile." + enterprise_description: "Short Description" + enterprise_description_placeholder: "A short sentence describing your enterprise" + enterprise_long_desc: "Long Description" + enterprise_long_desc_placeholder: "This is your opportunity to tell the story of your enterprise - what makes you different and wonderful? We'd suggest keeping your description to under 600 characters or 150 words." + enterprise_long_desc_length: "%{num} characters / up to 600 recommended" + enterprise_abn: "ABN" + enterprise_abn_placeholder: "eg. 99 123 456 789" + enterprise_acn: "ACN" + enterprise_acn_placeholder: "eg. 123 456 789" + yes: "Yes" + no: "No" + enterprise_tax_required: "You need to make a selection." + enterprise_final_step: "Final step!" + enterprise_social_text: "How can people find %{enterprise} online?" + website: "Website" + website_placeholder: "eg. openfoodnetwork.org.au" + facebook: "Facebook" + facebook_placeholder: "eg. www.facebook.com/PageNameHere" + linkedin: "LinkedIn" + linkedin_placeholder: "eg. www.linkedin.com/YourNameHere" + twitter: "Twitter" + twitter_placeholder: "eg. @twitter_handle" + instagram: "Instagram" + instagram_placeholder: "eg. @instagram_handle" + registration_greeting: "Hi there!" + registration_intro: "You can now create a profile for your Producer or Hub" + registration_action: "Let's get started!" + registration_checklist: "You'll need" + registration_time: "5-10 minutes" + registration_enterprise_address: "Enterprise address" + registration_contact_details: "Primary contact details" + registration_logo: "Your logo image" + registration_promo_image: "Landscape image for your profile" + registration_about_us: "'About Us' text" + registration_outcome_headline: "What do I get?" + registration_outcome1_html: "Your profile helps people find and contact you on the Open Food Network." + registration_outcome2: "Use this space to tell the story of your enterprise, to help drive connections to your social and online presence. " + registration_outcome3: "It's also the first step towards trading on the Open Food Network, or opening an online store." + registration_finished_headline: "Finished!" + registration_finished_thanks: "Thanks for filling out the details for %{enterprise}." + registration_finished_login: "You can change or update your enterprise at any stage by logging into Open Food Network and going to Admin." + registration_finished_activate: "Activate %{enterprise}." + registration_finished_activate_instruction_html: "We've sent a confirmation email to %{email} if it hasn't been activated before.
+Please follow the instructions there to make your enterprise visible on the Open Food Network." + registration_finished_action: "Open Food Network home" + registration_type_headline: "Last step to add %{enterprise}" + registration_type_question: "Are you a producer?" + registration_type_producer: "Yes, I'm a producer" + registration_type_no_producer: "No, I'm not a producer" + registration_type_error: "Please choose one. Are you are producer?" + registration_type_producer_help: "Producers make yummy things to eat &/or drink. You're a producer if you grow it, raise it, brew it, bake it, ferment it, milk it or mould it." + registration_type_no_producer_help: "If you’re not a producer, you’re probably someone who sells and distributes food. You might be a hub, coop, buying group, retailer, wholesaler or other." + create_profile: "Create Profile" + registration_images_headline: "Thanks!" + registration_images_description: "Let's upload some pretty pictures so your profile looks great! :)" + registration_detail_headline: "Let's Get Started" + registration_detail_enterprise: "Woot! First we need to know a little bit about your enterprise:" + registration_detail_producer: "Woot! First we need to know a little bit about your farm:" + registration_detail_name_enterprise: "Enterprise Name:" + registration_detail_name_producer: "Farm Name:" + registration_detail_name_placeholder: "e.g. Charlie's Awesome Farm" + registration_detail_name_error: "Please choose a unique name for your enterprise" + registration_detail_address1: "Address line 1:" + registration_detail_address1_placeholder: "e.g. 123 Cranberry Drive" + registration_detail_address1_error: "Please enter an address" + registration_detail_address2: "Address line 2:" + registration_detail_suburb: "Suburb:" + registration_detail_suburb_placeholder: "e.g. Northcote" + registration_detail_suburb_error: "Please enter a suburb" + registration_detail_postcode: "Postcode:" + registration_detail_postcode_placeholder: "e.g. 3070" + registration_detail_postcode_error: "Postcode required" + registration_detail_state: "State:" + registration_detail_state_error: "State required" + registration_detail_country: "Country:" + registration_detail_country_error: "Please select a country" + registration_detail_: "" + fees: "Fees" + item_cost: "Item cost" + bulk: "Bulk" + shop_variant_quantity_min: "min" + shop_variant_quantity_max: "max" + contact: "Contact" + follow: "Follow" + shop_for_products_html: "Shop for %{enterprise} products at:" + change_shop: "Change shop to:" + shop_at: "Shop now at:" + price_breakdown: "Full price breakdown" + admin_fee: "Admin fee" + sales_fee: "Sales fee" + packing_fee: "Packing fee" + transport_fee: "Transport fee" + fundraising_fee: "Fundraising fee" + price_graph: "Price graph" From 6b1e66ed265a27381c001dde7cb705530cb12a18 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 1 Oct 2015 13:53:10 +1000 Subject: [PATCH 15/30] Renamed no.yml to nor.yml due to error caused by using "no" --- config/locales/{no.yml => nor.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename config/locales/{no.yml => nor.yml} (99%) diff --git a/config/locales/no.yml b/config/locales/nor.yml similarity index 99% rename from config/locales/no.yml rename to config/locales/nor.yml index 56af830111..88093c4b29 100644 --- a/config/locales/no.yml +++ b/config/locales/nor.yml @@ -1,7 +1,7 @@ # Sample localization file for English. Add more files in this directory for other locales. # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. -no: +nor: devise: failure: invalid: | From 0eed8b45787c841ba70fd737056decd6164b5639 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 1 Oct 2015 14:16:59 +1000 Subject: [PATCH 16/30] better testing of existence of I18n --- app/assets/javascripts/darkswarm/i18n.js.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/darkswarm/i18n.js.coffee b/app/assets/javascripts/darkswarm/i18n.js.coffee index 857437a51d..15ee584400 100644 --- a/app/assets/javascripts/darkswarm/i18n.js.coffee +++ b/app/assets/javascripts/darkswarm/i18n.js.coffee @@ -1,12 +1,13 @@ # Declares the translation function t. # You can use t('login') in Javascript. window.t = (key, options = {}) -> - if I18n == undefined + unless 'I18n' of window console.log 'The I18n object is undefined. Cannot translate text.' return key + return key unless key of I18n text = I18n[key] - return key if text == undefined - text = text.split("%{#{name}}").join(value) for name, value of options + for name, value of options + text = text.split("%{#{name}}").join(value) text # Provides the translation function t on all scopes. From 31e7ca9fa265384d1f0cbfc51cdd89fe2369018e Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 1 Oct 2015 15:54:46 +1000 Subject: [PATCH 17/30] locale data as js asset --- .../darkswarm/{i18n.js.coffee => i18n.js.coffee.erb} | 4 ++++ app/views/layouts/_i18n_translations.html.haml | 5 ----- app/views/layouts/darkswarm.html.haml | 1 - app/views/layouts/registration.html.haml | 1 - 4 files changed, 4 insertions(+), 7 deletions(-) rename app/assets/javascripts/darkswarm/{i18n.js.coffee => i18n.js.coffee.erb} (66%) delete mode 100644 app/views/layouts/_i18n_translations.html.haml diff --git a/app/assets/javascripts/darkswarm/i18n.js.coffee b/app/assets/javascripts/darkswarm/i18n.js.coffee.erb similarity index 66% rename from app/assets/javascripts/darkswarm/i18n.js.coffee rename to app/assets/javascripts/darkswarm/i18n.js.coffee.erb index 15ee584400..4286fa2304 100644 --- a/app/assets/javascripts/darkswarm/i18n.js.coffee +++ b/app/assets/javascripts/darkswarm/i18n.js.coffee.erb @@ -1,3 +1,7 @@ +# Defines a global I18n object containing the language of the current locale +<%- I18n.backend.send(:init_translations) unless I18n.backend.initialized? %> +window.I18n = <%= I18n.backend.send(:translations)[I18n.locale].with_indifferent_access.to_json.html_safe %> + # Declares the translation function t. # You can use t('login') in Javascript. window.t = (key, options = {}) -> diff --git a/app/views/layouts/_i18n_translations.html.haml b/app/views/layouts/_i18n_translations.html.haml deleted file mode 100644 index 376c162d60..0000000000 --- a/app/views/layouts/_i18n_translations.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -- # TODO: load json from separate file that can be cached -%script - window.I18n = - = I18n.backend.send(:translations)[I18n.locale].with_indifferent_access.to_json.html_safe - diff --git a/app/views/layouts/darkswarm.html.haml b/app/views/layouts/darkswarm.html.haml index b97efc0ed0..88075a3171 100644 --- a/app/views/layouts/darkswarm.html.haml +++ b/app/views/layouts/darkswarm.html.haml @@ -11,7 +11,6 @@ %link{href: "https://fonts.googleapis.com/css?family=Roboto:400,300italic,400italic,300,700,700italic|Oswald:300,400,700", rel: "stylesheet", type: "text/css"} = yield :scripts - = render "layouts/i18n_translations" %script{src: "//maps.googleapis.com/maps/api/js?libraries=places,geometry&sensor=false"} = split_stylesheet_link_tag "darkswarm/all" = javascript_include_tag "darkswarm/all" diff --git a/app/views/layouts/registration.html.haml b/app/views/layouts/registration.html.haml index 320c80d35e..4709393fd0 100644 --- a/app/views/layouts/registration.html.haml +++ b/app/views/layouts/registration.html.haml @@ -11,7 +11,6 @@ %link{href: "https://fonts.googleapis.com/css?family=Roboto:400,300italic,400italic,300,700,700italic|Oswald:300,400,700", rel: "stylesheet", type: "text/css"} = yield :scripts - = render "layouts/i18n_translations" %script{src: "//maps.googleapis.com/maps/api/js?libraries=places&sensor=false"} = stylesheet_link_tag "darkswarm/all" = javascript_include_tag "darkswarm/all" From bd737ef7274fb4edce850577801afe94c1c57c6d Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 1 Oct 2015 16:38:47 +1000 Subject: [PATCH 18/30] I18n object file for karma --- app/assets/javascripts/darkswarm/i18n.js.erb | 3 +++ .../{i18n.js.coffee.erb => i18n.translate.js.coffee} | 4 ---- config/ng-test.conf.js | 1 + lib/tasks/karma.rake | 12 +++++++++++- 4 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 app/assets/javascripts/darkswarm/i18n.js.erb rename app/assets/javascripts/darkswarm/{i18n.js.coffee.erb => i18n.translate.js.coffee} (66%) diff --git a/app/assets/javascripts/darkswarm/i18n.js.erb b/app/assets/javascripts/darkswarm/i18n.js.erb new file mode 100644 index 0000000000..7016fa77f1 --- /dev/null +++ b/app/assets/javascripts/darkswarm/i18n.js.erb @@ -0,0 +1,3 @@ +<%# Defines a global I18n object containing the language of the current locale %> +<%- I18n.backend.send(:init_translations) unless I18n.backend.initialized? %> +window.I18n = <%= I18n.backend.send(:translations)[I18n.locale].with_indifferent_access.to_json.html_safe %> diff --git a/app/assets/javascripts/darkswarm/i18n.js.coffee.erb b/app/assets/javascripts/darkswarm/i18n.translate.js.coffee similarity index 66% rename from app/assets/javascripts/darkswarm/i18n.js.coffee.erb rename to app/assets/javascripts/darkswarm/i18n.translate.js.coffee index 4286fa2304..15ee584400 100644 --- a/app/assets/javascripts/darkswarm/i18n.js.coffee.erb +++ b/app/assets/javascripts/darkswarm/i18n.translate.js.coffee @@ -1,7 +1,3 @@ -# Defines a global I18n object containing the language of the current locale -<%- I18n.backend.send(:init_translations) unless I18n.backend.initialized? %> -window.I18n = <%= I18n.backend.send(:translations)[I18n.locale].with_indifferent_access.to_json.html_safe %> - # Declares the translation function t. # You can use t('login') in Javascript. window.t = (key, options = {}) -> diff --git a/config/ng-test.conf.js b/config/ng-test.conf.js index 56df589f0c..0cc4fc385e 100644 --- a/config/ng-test.conf.js +++ b/config/ng-test.conf.js @@ -25,6 +25,7 @@ module.exports = function(config) { '**/.#*', 'app/assets/javascripts/darkswarm/all.js.coffee', 'app/assets/javascripts/darkswarm/overrides.js.coffee', + 'app/assets/javascripts/darkswarm/i18n.js.erb', 'app/assets/javascripts/admin/util.js.erb' ], diff --git a/lib/tasks/karma.rake b/lib/tasks/karma.rake index 4ebd4ae278..848a5b6238 100644 --- a/lib/tasks/karma.rake +++ b/lib/tasks/karma.rake @@ -10,8 +10,10 @@ namespace :karma do private def with_tmp_config(command, args = nil) + + I18n.backend.send(:init_translations) unless I18n.backend.initialized? Tempfile.open('karma_unit.js', Rails.root.join('tmp') ) do |f| - f.write unit_js(application_spec_files) + f.write unit_js(application_spec_files << i18n_file) f.flush trap('SIGINT') { puts "Killing Karma"; exit } exec "karma #{command} #{f.path} #{args}" @@ -29,4 +31,12 @@ namespace :karma do unit_js = File.open('config/ng-test.conf.js', 'r').read unit_js.gsub "APPLICATION_SPEC", "\"#{files.join("\",\n\"")}\"" end + + def i18n_file + f = Tempfile.open('i18n.js', Rails.root.join('tmp') ) + f.write 'window.I18n = ' + f.write I18n.backend.send(:translations)[I18n.locale].with_indifferent_access.to_json.html_safe + f.flush + f.path + end end From 5aa3ebde9c58d343e2df2df0de35a30126c8b560 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 7 Oct 2015 14:05:50 +1100 Subject: [PATCH 19/30] Set the locale to "en" in test environment. --- config/environments/test.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/environments/test.rb b/config/environments/test.rb index 67131b6489..228bd1736d 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -33,6 +33,9 @@ Openfoodnetwork::Application.configure do # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test + # Tests assume English text on the site. + config.i18n.default_locale = "en" + # Use SQL instead of Active Record's schema dumper when creating the test database. # This is necessary if your schema can't be completely dumped by the schema dumper, # like if you have constraints or database-specific column types From 91fae79be4697f9a6486ace2da0c3103950b9d67 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 7 Oct 2015 14:06:34 +1100 Subject: [PATCH 20/30] Update tests for new label "Login" --- spec/features/admin/cms_spec.rb | 2 +- spec/features/consumer/shopping/checkout_auth_spec.rb | 4 ++-- spec/support/request/authentication_workflow.rb | 2 +- spec/support/request/ui_component_helper.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/features/admin/cms_spec.rb b/spec/features/admin/cms_spec.rb index e3dfcf19b9..2d4056b792 100644 --- a/spec/features/admin/cms_spec.rb +++ b/spec/features/admin/cms_spec.rb @@ -21,7 +21,7 @@ feature %q{ scenario "anonymous user can't access CMS admin", js: true do visit cms_admin_path page.should_not have_content "ComfortableMexicanSofa" - page.should have_content "Log in" + page.should have_content "Login" end scenario "non-admin user can't access CMS admin", js: true do diff --git a/spec/features/consumer/shopping/checkout_auth_spec.rb b/spec/features/consumer/shopping/checkout_auth_spec.rb index b9b2a15e33..a19776f7a9 100644 --- a/spec/features/consumer/shopping/checkout_auth_spec.rb +++ b/spec/features/consumer/shopping/checkout_auth_spec.rb @@ -25,7 +25,7 @@ feature "As a consumer I want to check out my cart", js: true do quick_login_as user visit checkout_path within "section[role='main']" do - page.should_not have_content "Log in" + page.should_not have_content "Login" page.should have_checkout_details end end @@ -45,7 +45,7 @@ feature "As a consumer I want to check out my cart", js: true do page.should have_login_modal fill_in "Email", with: user.email fill_in "Password", with: user.password - within(".login-modal") { click_button 'Log in' } + within(".login-modal") { click_button 'Login' } toggle_details page.should have_field 'First Name', with: 'Foo' diff --git a/spec/support/request/authentication_workflow.rb b/spec/support/request/authentication_workflow.rb index e71c0dd21a..79b6d81452 100644 --- a/spec/support/request/authentication_workflow.rb +++ b/spec/support/request/authentication_workflow.rb @@ -70,7 +70,7 @@ module AuthenticationWorkflow visit spree.login_path fill_in 'email', :with => 'someone@ofn.org' fill_in 'password', :with => 'passw0rd' - click_button 'Log in' + click_button 'Login' end end diff --git a/spec/support/request/ui_component_helper.rb b/spec/support/request/ui_component_helper.rb index e4b4e5a050..0b478a76ce 100644 --- a/spec/support/request/ui_component_helper.rb +++ b/spec/support/request/ui_component_helper.rb @@ -9,7 +9,7 @@ module UIComponentHelper end def click_login_button - click_button "Log in" + click_button "Login" end def click_signup_button From 8b40d094ee4eb877d5d7d69df4c99d83a29d523c Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 7 Oct 2015 15:47:51 +1100 Subject: [PATCH 21/30] new translate filter and updated specs for js translations --- .../darkswarm/filters/translate.js.coffee | 7 +++++++ .../enterprise_registration_service.js.coffee | 2 +- .../templates/price_breakdown.html.haml | 16 ++++++++-------- config/locales/en.yml | 1 + spec/features/consumer/registration_spec.rb | 8 ++++---- 5 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 app/assets/javascripts/darkswarm/filters/translate.js.coffee diff --git a/app/assets/javascripts/darkswarm/filters/translate.js.coffee b/app/assets/javascripts/darkswarm/filters/translate.js.coffee new file mode 100644 index 0000000000..d2fef7889a --- /dev/null +++ b/app/assets/javascripts/darkswarm/filters/translate.js.coffee @@ -0,0 +1,7 @@ +Darkswarm.filter "translate", -> + (key) -> + t(key) + +Darkswarm.filter "t", -> + (key) -> + t(key) diff --git a/app/assets/javascripts/darkswarm/services/enterprise_registration_service.js.coffee b/app/assets/javascripts/darkswarm/services/enterprise_registration_service.js.coffee index c4055bb93c..102da60f19 100644 --- a/app/assets/javascripts/darkswarm/services/enterprise_registration_service.js.coffee +++ b/app/assets/javascripts/darkswarm/services/enterprise_registration_service.js.coffee @@ -47,7 +47,7 @@ Darkswarm.factory "EnterpriseRegistrationService", ($http, RegistrationService, RegistrationService.select(step) ).error((data) -> Loading.clear() - alert(t('failed_to_create_enterprise_unknown')) + alert(t('failed_to_update_enterprise_unknown')) ) prepare: => diff --git a/app/assets/javascripts/templates/price_breakdown.html.haml b/app/assets/javascripts/templates/price_breakdown.html.haml index 8bb6bb5caf..993c20bc9b 100644 --- a/app/assets/javascripts/templates/price_breakdown.html.haml +++ b/app/assets/javascripts/templates/price_breakdown.html.haml @@ -4,35 +4,35 @@ .collapsed{"ng-show" => "!expanded"} %price-percentage{percentage: 'variant.basePricePercentage'} %a{"ng-click" => "expanded = !expanded"} - {{t('price_breakdown')}} + %span{"bo-text" => "'price_breakdown' | t"} %i.ofn-i_005-caret-down .expanded{"ng-show" => "expanded"} %ul %li.cost .right {{ variant.price | localizeCurrency }} - {{t('item_cost')}} + %span{"bo-text" => "'item_cost' | t"} %li.admin-fee{"bo-if" => "variant.fees.admin"} .right {{ variant.fees.admin | localizeCurrency }} - {{t('admin_fee')}} + %span{"bo-text" => "'admin_fee' | t"} %li.sales-fee{"bo-if" => "variant.fees.sales"} .right {{ variant.fees.sales | localizeCurrency }} - {{t('sales_fee')}} + %span{"bo-text" => "'sales_fee' | t"} %li.packing-fee{"bo-if" => "variant.fees.packing"} .right {{ variant.fees.packing | localizeCurrency }} - {{t('packing_fee')}} + %span{"bo-text" => "'packing_fee' | t"} %li.transport-fee{"bo-if" => "variant.fees.transport"} .right {{ variant.fees.transport | localizeCurrency }} - {{t('transport_fee')}} + %span{"bo-text" => "'transport_fee' | t"} %li.fundraising-fee{"bo-if" => "variant.fees.fundraising"} .right {{ variant.fees.fundraising | localizeCurrency }} - {{t('fundraising_fee')}} + %span{"bo-text" => "'fundraising_fee' | t"} %li.total %strong .right = {{ variant.price_with_fees | localizeCurrency }}   %a{"ng-click" => "expanded = !expanded"} - {{t('price_graph')}} + %span{"bo-text" => "'price_graph' | t"} %i.ofn-i_006-caret-up diff --git a/config/locales/en.yml b/config/locales/en.yml index d15ed32443..377451cba9 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -465,6 +465,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using updating: Updating failed_to_create_enterprise: "Failed to create your enterprise." failed_to_create_enterprise_unknown: "Failed to create your enterprise.\nPlease ensure all fields are completely filled out." + failed_to_update_enterprise_unknown: "Failed to update your enterprise.\nPlease ensure all fields are completely filled out." order_not_saved_yet: "Your order hasn't been saved yet. Give us a few seconds to finish!" filter_by: "Filter by" hide_filters: "Hide filters" diff --git a/spec/features/consumer/registration_spec.rb b/spec/features/consumer/registration_spec.rb index 27b748cce5..5084f4c05b 100644 --- a/spec/features/consumer/registration_spec.rb +++ b/spec/features/consumer/registration_spec.rb @@ -11,7 +11,7 @@ feature "Registration", js: true do expect(URI.parse(current_url).path).to eq registration_auth_path - page.has_selector? "dd", text: "Log in" + page.has_selector? "dd", text: "Login" switch_to_login_tab # Enter Login details @@ -102,8 +102,8 @@ feature "Registration", js: true do # Link appears to be unresponsive for a while, so keep clicking it until it works using_wait_time 0.5 do 10.times do - click_link "Log in" - break if page.has_selector? "dd.active", text: "Log in" + click_link "Login" + break if page.has_selector? "dd.active", text: "Login" end end end @@ -112,7 +112,7 @@ feature "Registration", js: true do # Buttons appear to be unresponsive for a while, so keep clicking them until content appears using_wait_time 1 do 3.times do - click_button "Log in" + click_button "Login" break if page.has_selector? "div#loading", text: "Hold on a moment, we're logging you in" end end From d62775a785e60129fe7efdf738c4ddd3418c5877 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 7 Oct 2015 18:05:59 +1100 Subject: [PATCH 22/30] update specs and fix labels yes and no --- .../javascripts/templates/registration/about.html.haml | 4 ++-- config/locales/en.yml | 5 +---- spec/features/consumer/registration_spec.rb | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/templates/registration/about.html.haml b/app/assets/javascripts/templates/registration/about.html.haml index 4742d5deb1..230154af78 100644 --- a/app/assets/javascripts/templates/registration/about.html.haml +++ b/app/assets/javascripts/templates/registration/about.html.haml @@ -45,9 +45,9 @@ .field %label{ for: 'enterprise_charges_sales_tax' }= t(:charges_sales_tax) %input{ id: 'enterprise_charges_sales_tax_true', type: 'radio', name: 'charges_sales_tax', value: 'true', required: true, ng: { model: 'enterprise.charges_sales_tax' } } - %label{ for: 'enterprise_charges_sales_tax_true' } {{t('yes')}} + %label{ for: 'enterprise_charges_sales_tax_true' } {{t('say_yes')}} %input{ id: 'enterprise_charges_sales_tax_false', type: 'radio', name: 'charges_sales_tax', value: 'false', required: true, ng: { model: 'enterprise.charges_sales_tax' } } - %label{ for: 'enterprise_charges_sales_tax_false' } {{t('no')}} + %label{ for: 'enterprise_charges_sales_tax_false' } {{t('say_no')}} %span.error.small-12.columns{ ng: { show: "about.charges_sales_tax.$error.required && submitted" } } {{t('enterprise_tax_required')}} diff --git a/config/locales/en.yml b/config/locales/en.yml index 377451cba9..80ed0c01a0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -547,8 +547,6 @@ See the %{link} to find out more about %{sitename}'s features and to start using enterprise_abn_placeholder: "eg. 99 123 456 789" enterprise_acn: "ACN" enterprise_acn_placeholder: "eg. 123 456 789" - yes: "Yes" - no: "No" enterprise_tax_required: "You need to make a selection." enterprise_final_step: "Final step!" enterprise_social_text: "How can people find %{enterprise} online?" @@ -583,7 +581,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using registration_finished_activate_instruction_html: "We've sent a confirmation email to %{email} if it hasn't been activated before.
Please follow the instructions there to make your enterprise visible on the Open Food Network." registration_finished_action: "Open Food Network home" - registration_type_headline: "Last step to add %{enterprise}" + registration_type_headline: "Last step to add %{enterprise}!" registration_type_question: "Are you a producer?" registration_type_producer: "Yes, I'm a producer" registration_type_no_producer: "No, I'm not a producer" @@ -614,7 +612,6 @@ Please follow the instructions there to make your enterprise visible on the Open registration_detail_state_error: "State required" registration_detail_country: "Country:" registration_detail_country_error: "Please select a country" - registration_detail_: "" fees: "Fees" item_cost: "Item cost" bulk: "Bulk" diff --git a/spec/features/consumer/registration_spec.rb b/spec/features/consumer/registration_spec.rb index 5084f4c05b..d36cd48f7d 100644 --- a/spec/features/consumer/registration_spec.rb +++ b/spec/features/consumer/registration_spec.rb @@ -102,7 +102,7 @@ feature "Registration", js: true do # Link appears to be unresponsive for a while, so keep clicking it until it works using_wait_time 0.5 do 10.times do - click_link "Login" + find("a", text: "Login").click() break if page.has_selector? "dd.active", text: "Login" end end From 56fd91f82b9a69c540ebb506c2e8b84280d214ca Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 7 Oct 2015 19:10:44 +1100 Subject: [PATCH 23/30] CI server has to empty the cache if language files changed --- script/ci/run_tests.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/script/ci/run_tests.sh b/script/ci/run_tests.sh index efae0805a6..34d2472236 100755 --- a/script/ci/run_tests.sh +++ b/script/ci/run_tests.sh @@ -17,5 +17,8 @@ echo "--- Loading test database" bundle exec rake db:drop db:create db:schema:load bundle exec rake parallel:drop parallel:create parallel:load_schema +echo "--- Emptying cache" +rm tmp/cache/ -rf + echo "--- Running tests" bundle exec rake parallel:spec From 9115e1175eecd673821546bdee0e6d5aa0e94b77 Mon Sep 17 00:00:00 2001 From: Maikel Date: Thu, 8 Oct 2015 15:24:48 +1100 Subject: [PATCH 24/30] Travis config for parallel execution on five nodes This Travis configuration runs rspec on five build machines in parallel. Currently, that takes 15 to 20 minutes. --- .travis.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0a0a55517f..fb9f4edf7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,14 +2,24 @@ language: ruby bundler_args: --without development rvm: - "1.9.3" -services: postgresql -before_install: + +# The test cases are roughly split according to their test times. +# It would be better to use https://github.com/ArturT/knapsack. +env: + - TEST_CASES="./spec/models" + - TEST_CASES="./spec/controllers ./spec/views" + - TEST_CASES="./spec/requests ./spec/helpers ./spec/mailers" + - TEST_CASES="./spec/features/admin" + - TEST_CASES="./spec/features/consumer" + #- TEST_CASES="./spec/routing" + before_script: - cp config/database.travis.yml config/database.yml - - psql -c 'create database open_food_network_test;' -U postgres - cp config/application.yml.example config/application.yml + - RAILS_ENV=test bundle exec rake db:create db:schema:load + script: - - RAILS_ENV=test bundle exec rake db:migrate --trace - - bundle exec rake spec + - "bundle exec rspec $TEST_CASES" + notifications: email: false From d2470685cd7503b1037898c2e238895faa358a7e Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 8 Oct 2015 15:32:32 +1100 Subject: [PATCH 25/30] clearing tmp cache with rake --- script/ci/run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/ci/run_tests.sh b/script/ci/run_tests.sh index 34d2472236..46c4d31ad8 100755 --- a/script/ci/run_tests.sh +++ b/script/ci/run_tests.sh @@ -18,7 +18,7 @@ bundle exec rake db:drop db:create db:schema:load bundle exec rake parallel:drop parallel:create parallel:load_schema echo "--- Emptying cache" -rm tmp/cache/ -rf +bundle exec rake tmp:clear echo "--- Running tests" bundle exec rake parallel:spec From e9d1cf6eb53476ff92e74d3de2ed84448a62d2d0 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 8 Oct 2015 18:09:11 +1100 Subject: [PATCH 26/30] using translate filter instead of root scope function --- .../darkswarm/i18n.translate.js.coffee | 10 ++--- .../javascripts/templates/forgot.html.haml | 8 ++-- .../javascripts/templates/login.html.haml | 10 ++--- .../templates/partials/contact.html.haml | 2 +- .../partials/enterprise_details.html.haml | 2 +- .../templates/partials/follow.html.haml | 2 +- .../templates/partials/hub_details.html.haml | 8 ++-- .../templates/price_percentage.html.haml | 4 +- .../templates/product_modal.html.haml | 2 +- .../templates/registration/about.html.haml | 30 ++++++------- .../templates/registration/contact.html.haml | 16 +++---- .../templates/registration/details.html.haml | 44 +++++++++---------- .../templates/registration/finished.html.haml | 6 +-- .../templates/registration/images.html.haml | 8 ++-- .../registration/images/logo.html.haml | 18 ++++---- .../registration/images/promo.html.haml | 18 ++++---- .../registration/introduction.html.haml | 28 ++++++------ .../registration/limit_reached.html.haml | 8 ++-- .../templates/registration/social.html.haml | 26 +++++------ .../templates/registration/type.html.haml | 16 +++---- .../registration_authentication.html.haml | 8 ++-- .../templates/shop_variant.html.haml | 6 +-- .../javascripts/templates/signup.html.haml | 10 ++--- 23 files changed, 143 insertions(+), 147 deletions(-) diff --git a/app/assets/javascripts/darkswarm/i18n.translate.js.coffee b/app/assets/javascripts/darkswarm/i18n.translate.js.coffee index 15ee584400..c455b6d9e1 100644 --- a/app/assets/javascripts/darkswarm/i18n.translate.js.coffee +++ b/app/assets/javascripts/darkswarm/i18n.translate.js.coffee @@ -1,6 +1,6 @@ # Declares the translation function t. -# You can use t('login') in Javascript. -window.t = (key, options = {}) -> +# You can use translate('login') or t('login') in Javascript. +window.translate = (key, options = {}) -> unless 'I18n' of window console.log 'The I18n object is undefined. Cannot translate text.' return key @@ -9,8 +9,4 @@ window.t = (key, options = {}) -> for name, value of options text = text.split("%{#{name}}").join(value) text - -# Provides the translation function t on all scopes. -# You can write {{t('login')}} in all templates. -window.Darkswarm.run ($rootScope) -> - $rootScope.t = t +window.t = window.translate diff --git a/app/assets/javascripts/templates/forgot.html.haml b/app/assets/javascripts/templates/forgot.html.haml index ebe5c36abd..c1990d778a 100644 --- a/app/assets/javascripts/templates/forgot.html.haml +++ b/app/assets/javascripts/templates/forgot.html.haml @@ -1,5 +1,5 @@ %tab#forgot{"ng-controller" => "ForgotCtrl", - heading: "{{t('forgot_password')}}", + heading: "{{'forgot_password' | t}}", active: "active(path)", select: "select(path)"} @@ -8,7 +8,7 @@ .row .large-12.columns .alert-box.success.radius{"ng-show" => "sent"} - {{t('password_reset_sent')}} + {{'password_reset_sent' | t}} %div{"ng-show" => "!sent"} .alert-box.alert{"ng-show" => "errors != null"} @@ -16,7 +16,7 @@ .row .large-12.columns - %label{for: "email"} {{t('signup_email')}} + %label{for: "email"} {{'signup_email' | t}} %input.title.input-text{name: "email", type: "email", id: "email", @@ -27,4 +27,4 @@ %input.button.primary{name: "commit", tabindex: "3", type: "submit", - value: "{{t('reset_password')}}"} + value: "{{'reset_password' | t}}"} diff --git a/app/assets/javascripts/templates/login.html.haml b/app/assets/javascripts/templates/login.html.haml index f002a393a1..44d2e08ced 100644 --- a/app/assets/javascripts/templates/login.html.haml +++ b/app/assets/javascripts/templates/login.html.haml @@ -1,5 +1,5 @@ %tab#login-content{"ng-controller" => "LoginCtrl", - heading: "{{t('label_login')}}", + heading: "{{'label_login' | t}}", active: "active(path)", select: "select(path)"} %form{"ng-submit" => "submit()"} @@ -9,7 +9,7 @@ {{ errors }} .row .large-12.columns - %label{for: "email"} {{t('email')}} + %label{for: "email"} {{'email' | t}} %input.title.input-text{name: "email", type: "email", id: "email", @@ -17,7 +17,7 @@ "ng-model" => "spree_user.email"} .row .large-12.columns - %label{for: "password"} {{t('password')}} + %label{for: "password"} {{'password' | t}} %input.title.input-text{name: "password", type: "password", id: "password", @@ -31,10 +31,10 @@ id: "remember_me", value: "1", "ng-model" => "spree_user.remember_me"} - %label{for: "remember_me"} {{t('remember_me')}} + %label{for: "remember_me"} {{'remember_me' | t}} .row .large-12.columns %input.button.primary{name: "commit", tabindex: "3", type: "submit", - value: "{{t('label_login')}}"} + value: "{{'label_login' | t}}"} diff --git a/app/assets/javascripts/templates/partials/contact.html.haml b/app/assets/javascripts/templates/partials/contact.html.haml index da8fdaa8ac..bdde30b8bb 100644 --- a/app/assets/javascripts/templates/partials/contact.html.haml +++ b/app/assets/javascripts/templates/partials/contact.html.haml @@ -1,6 +1,6 @@ %div.contact-container{bindonce: true} %div.modal-centered{"bo-if" => "enterprise.email || enterprise.website || enterprise.phone"} - %p.modal-header {{t('contact')}} + %p.modal-header {{'contact' | t}} %p{"bo-if" => "enterprise.phone", "bo-text" => "enterprise.phone"} %p.word-wrap{"ng-if" => "enterprise.email"} diff --git a/app/assets/javascripts/templates/partials/enterprise_details.html.haml b/app/assets/javascripts/templates/partials/enterprise_details.html.haml index 2d896baf3c..fc0a638c8d 100644 --- a/app/assets/javascripts/templates/partials/enterprise_details.html.haml +++ b/app/assets/javascripts/templates/partials/enterprise_details.html.haml @@ -3,7 +3,7 @@ / TODO: Rob add logic for taxons and properties too: / %div{"ng-if" => "enterprise.long_description.length > 0 || enterprise.logo"} %div - %p.modal-header {{t('label_about')}} + %p.modal-header {{'label_about' | t}} / TODO: Rob - add in taxons and properties and property pop-overs -# TODO: Add producer taxons and properties here diff --git a/app/assets/javascripts/templates/partials/follow.html.haml b/app/assets/javascripts/templates/partials/follow.html.haml index c4081cd94f..c04567a357 100644 --- a/app/assets/javascripts/templates/partials/follow.html.haml +++ b/app/assets/javascripts/templates/partials/follow.html.haml @@ -1,5 +1,5 @@ %div.modal-centered{bindonce: true, "bo-if" => "enterprise.twitter || enterprise.facebook || enterprise.linkedin || enterprise.instagram"} - %p.modal-header {{t('follow')}} + %p.modal-header {{'follow' | t}} .follow-icons %span{"bo-if" => "enterprise.twitter"} %a{"bo-href-i" => "http://twitter.com/{{enterprise.twitter}}", target: "_blank"} diff --git a/app/assets/javascripts/templates/partials/hub_details.html.haml b/app/assets/javascripts/templates/partials/hub_details.html.haml index c7282abe80..fa75f72253 100644 --- a/app/assets/javascripts/templates/partials/hub_details.html.haml +++ b/app/assets/javascripts/templates/partials/hub_details.html.haml @@ -2,16 +2,16 @@ .cta-container.small-12.columns .row .small-4.columns - %label{"active-table-hub-link" => "enterprise", change: "{{t('change_shop')}}", shop: "{{t('shop_at')}}"} + %label{"active-table-hub-link" => "enterprise", change: "{{'change_shop' | t}}", shop: "{{'shop_at' | t}}"} .small-8.columns.right %label.right{"bo-if" => "enterprise.pickup || enterprise.delivery"} - {{t('hubs_delivery_options')}}: + {{'hubs_delivery_options' | t}}: %span{"bo-if" => "enterprise.pickup"} %i.ofn-i_038-takeaway - {{t('hubs_pickup')}} + {{'hubs_pickup' | t}} %span{"bo-if" => "enterprise.delivery"} %i.ofn-i_039-delivery - {{t('hubs_delivery')}} + {{'hubs_delivery' | t}} .row .columns.small-12 %a.cta-hub{"bo-href" => "enterprise.path", diff --git a/app/assets/javascripts/templates/price_percentage.html.haml b/app/assets/javascripts/templates/price_percentage.html.haml index bb3ce9d01f..7892ebc0ab 100644 --- a/app/assets/javascripts/templates/price_percentage.html.haml +++ b/app/assets/javascripts/templates/price_percentage.html.haml @@ -1,5 +1,5 @@ .progress - .right {{t('fees')}} + .right {{'fees' | t}} .meter - {{t('item_cost')}} + {{'item_cost' | t}} diff --git a/app/assets/javascripts/templates/product_modal.html.haml b/app/assets/javascripts/templates/product_modal.html.haml index 294e8738eb..e13f6df60d 100644 --- a/app/assets/javascripts/templates/product_modal.html.haml +++ b/app/assets/javascripts/templates/product_modal.html.haml @@ -3,7 +3,7 @@ .columns.small-12.large-6.product-header %h3{"bo-text" => "product.name"} %span - %em {{t('products_from')}} + %em {{'products_from' | t}} %span{"bo-text" => "enterprise.name"} %br diff --git a/app/assets/javascripts/templates/registration/about.html.haml b/app/assets/javascripts/templates/registration/about.html.haml index 230154af78..7a0592799c 100644 --- a/app/assets/javascripts/templates/registration/about.html.haml +++ b/app/assets/javascripts/templates/registration/about.html.haml @@ -3,9 +3,9 @@ .row .small-12.columns %header - %h2 {{t('enterprise_about_headline')}} + %h2 {{'enterprise_about_headline' | t}} %h5 - {{t('enterprise_about_message')}} + {{'enterprise_about_message' | t}} %span{ ng: { class: "{brick: !enterprise.is_primary_producer, turquoise: enterprise.is_primary_producer}" } } {{ enterprise.name }} @@ -14,44 +14,44 @@ .small-12.columns .alert-box.info{ "ofn-inline-alert" => true, ng: { show: "visible" } } %h6 {{t('enterprise_success', {enterprise: enterprise.name})}} - %span {{t('enterprise_registration_exit_message')}} + %span {{'enterprise_registration_exit_message' | t}} %a.close{ ng: { click: "close()" } } × .small-12.large-8.columns .row .small-12.columns .field - %label{ for: 'enterprise_description' } {{t('enterprise_description')}}: - %input.chunky{ id: 'enterprise_description', placeholder: "{{t('enterprise_description_placeholder')}}", ng: { model: 'enterprise.description' } } + %label{ for: 'enterprise_description' } {{'enterprise_description' | t}}: + %input.chunky{ id: 'enterprise_description', placeholder: "{{'enterprise_description_placeholder' | t}}", ng: { model: 'enterprise.description' } } .row .small-12.columns .field - %label{ for: 'enterprise_long_desc' } {{t('enterprise_long_desc')}}: - %textarea.chunky{ id: 'enterprise_long_desc', rows: 6, placeholder: "{{t('enterprise_long_desc_placeholder')}}", ng: { model: 'enterprise.long_description' } } + %label{ for: 'enterprise_long_desc' } {{'enterprise_long_desc' | t}}: + %textarea.chunky{ id: 'enterprise_long_desc', rows: 6, placeholder: "{{'enterprise_long_desc_placeholder' | t}}", ng: { model: 'enterprise.long_description' } } %small {{t('enterprise_long_desc_length', {num: enterprise.long_description.length})}} .small-12.large-4.columns .row .small-12.columns .field - %label{ for: 'enterprise_abn' } {{t('enterprise_abn')}}: - %input.chunky{ id: 'enterprise_abn', placeholder: "{{t('enterprise_abn_placeholder')}}", ng: { model: 'enterprise.abn' } } + %label{ for: 'enterprise_abn' } {{'enterprise_abn' | t}}: + %input.chunky{ id: 'enterprise_abn', placeholder: "{{'enterprise_abn_placeholder' | t}}", ng: { model: 'enterprise.abn' } } .row .small-12.columns .field - %label{ for: 'enterprise_acn' } {{t('enterprise_acn')}}: - %input.chunky{ id: 'enterprise_acn', placeholder: "{{t('enterprise_acn_placeholder')}}", ng: { model: 'enterprise.acn' } } + %label{ for: 'enterprise_acn' } {{'enterprise_acn' | t}}: + %input.chunky{ id: 'enterprise_acn', placeholder: "{{'enterprise_acn_placeholder' | t}}", ng: { model: 'enterprise.acn' } } .row .small-12.columns .field %label{ for: 'enterprise_charges_sales_tax' }= t(:charges_sales_tax) %input{ id: 'enterprise_charges_sales_tax_true', type: 'radio', name: 'charges_sales_tax', value: 'true', required: true, ng: { model: 'enterprise.charges_sales_tax' } } - %label{ for: 'enterprise_charges_sales_tax_true' } {{t('say_yes')}} + %label{ for: 'enterprise_charges_sales_tax_true' } {{'say_yes' | t}} %input{ id: 'enterprise_charges_sales_tax_false', type: 'radio', name: 'charges_sales_tax', value: 'false', required: true, ng: { model: 'enterprise.charges_sales_tax' } } - %label{ for: 'enterprise_charges_sales_tax_false' } {{t('say_no')}} + %label{ for: 'enterprise_charges_sales_tax_false' } {{'say_no' | t}} %span.error.small-12.columns{ ng: { show: "about.charges_sales_tax.$error.required && submitted" } } - {{t('enterprise_tax_required')}} + {{'enterprise_tax_required' | t}} .row.buttons.pad-top .small-12.columns - %input.button.primary.right{ type: "submit", value: "{{t('continue')}}" } + %input.button.primary.right{ type: "submit", value: "{{'continue' | t}}" } diff --git a/app/assets/javascripts/templates/registration/contact.html.haml b/app/assets/javascripts/templates/registration/contact.html.haml index 88c217e456..1621b95a01 100644 --- a/app/assets/javascripts/templates/registration/contact.html.haml +++ b/app/assets/javascripts/templates/registration/contact.html.haml @@ -3,7 +3,7 @@ .row .small-12.columns %header - %h2 {{t('registration_greeting')}} + %h2 {{'registration_greeting' | t}} %h5 {{t('who_is_managing_enterprise', {enterprise: enterprise.name})}} @@ -12,19 +12,19 @@ .small-12.medium-12.large-7.columns .row .small-12.columns.field - %label{ for: 'enterprise_contact' } {{t('enterprise_contact')}}: + %label{ for: 'enterprise_contact' } {{'enterprise_contact' | t}}: %input.chunky.small-12.columns{ id: 'enterprise_contact', name: 'contact', required: true, placeholder: "Contact Name", ng: { model: 'enterprise.contact' } } %span.error.small-12.columns{ ng: { show: "contact.contact.$error.required && submitted" } } - {{t('enterprise_contact_required')}} + {{'enterprise_contact_required' | t}} .row .small-12.columns.field - %label{ for: 'enterprise_email' } {{t('enterprise_email')}}: + %label{ for: 'enterprise_email' } {{'enterprise_email' | t}}: %input.chunky.small-12.columns{ id: 'enterprise_email', name: 'email', type: 'email', required: true, placeholder: "eg. charlie@thefarm.com", ng: { model: 'enterprise.email' } } %span.error.small-12.columns{ ng: { show: "(contact.email.$error.email || contact.email.$error.required) && submitted" } } - {{t('enterprise_email_required')}} + {{'enterprise_email_required' | t}} .row .small-12.columns.field - %label{ for: 'enterprise_phone' } {{t('enterprise_phone')}}: + %label{ for: 'enterprise_phone' } {{'enterprise_phone' | t}}: %input.chunky.small-12.columns{ id: 'enterprise_phone', name: 'phone', placeholder: "eg. (03) 1234 5678", ng: { model: 'enterprise.phone' } } .small-12.medium-12.large-5.hide-for-small-only / %h6 @@ -43,5 +43,5 @@ .row.buttons .small-12.columns - %input.button.secondary{ type: "button", value: "{{t('back')}}", ng: { click: "select('details')" } } - %input.button.primary.right{ type: "submit", value: "{{t('continue')}}" } + %input.button.secondary{ type: "button", value: "{{'back' | t}}", ng: { click: "select('details')" } } + %input.button.primary.right{ type: "submit", value: "{{'continue' | t}}" } diff --git a/app/assets/javascripts/templates/registration/details.html.haml b/app/assets/javascripts/templates/registration/details.html.haml index 7543cc30ce..f03a48ec59 100644 --- a/app/assets/javascripts/templates/registration/details.html.haml +++ b/app/assets/javascripts/templates/registration/details.html.haml @@ -3,62 +3,62 @@ .row .small-12.columns %header - %h2 {{t('registration_detail_headline')}} - %h5{ bo: { if: "enterprise.type != 'own'" } } {{t('registration_detail_enterprise')}} - %h5{ bo: { if: "enterprise.type == 'own'" } } {{t('registration_detail_producer')}} + %h2 {{'registration_detail_headline' | t}} + %h5{ bo: { if: "enterprise.type != 'own'" } } {{'registration_detail_enterprise' | t}} + %h5{ bo: { if: "enterprise.type == 'own'" } } {{'registration_detail_producer' | t}} %form{ name: 'details', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "selectIfValid('contact',details)" } } .row .small-12.medium-9.large-12.columns.end .field - %label{ for: 'enterprise_name', bo: { if: "enterprise.type != 'own'" } } {{t('registration_detail_name_enterprise')}} - %label{ for: 'enterprise_name', bo: { if: "enterprise.type == 'own'" } } {{t('registration_detail_name_producer')}} - %input.chunky{ id: 'enterprise_name', name: 'name', placeholder: "{{t('registration_detail_name_placeholder')}}", required: true, ng: { model: 'enterprise.name' } } + %label{ for: 'enterprise_name', bo: { if: "enterprise.type != 'own'" } } {{'registration_detail_name_enterprise' | t}} + %label{ for: 'enterprise_name', bo: { if: "enterprise.type == 'own'" } } {{'registration_detail_name_producer' | t}} + %input.chunky{ id: 'enterprise_name', name: 'name', placeholder: "{{'registration_detail_name_placeholder' | t}}", required: true, ng: { model: 'enterprise.name' } } %span.error{ ng: { show: "details.name.$error.required && submitted" } } - {{t('registration_detail_name_error')}} + {{'registration_detail_name_error' | t}} .row .small-12.medium-9.large-6.columns .field - %label{ for: 'enterprise_address' } {{t('registration_detail_address1')}} - %input.chunky{ id: 'enterprise_address', name: 'address1', required: true, placeholder: "{{t('registration_detail_address1_placeholder')}}", required: true, ng: { model: 'enterprise.address.address1' } } + %label{ for: 'enterprise_address' } {{'registration_detail_address1' | t}} + %input.chunky{ id: 'enterprise_address', name: 'address1', required: true, placeholder: "{{'registration_detail_address1_placeholder' | t}}", required: true, ng: { model: 'enterprise.address.address1' } } %span.error{ ng: { show: "details.address1.$error.required && submitted" } } - {{t('registration_detail_address1_error')}} + {{'registration_detail_address1_error' | t}} .field - %label{ for: 'enterprise_address2' } {{t('registration_detail_address2')}} + %label{ for: 'enterprise_address2' } {{'registration_detail_address2' | t}} %input.chunky{ id: 'enterprise_address2', name: 'address2', required: false, placeholder: "", required: false, ng: { model: 'enterprise.address.address2' } } .small-12.medium-9.large-6.columns.end .row .small-12.medium-8.large-8.columns .field - %label{ for: 'enterprise_city' } {{t('registration_detail_suburb')}} - %input.chunky{ id: 'enterprise_city', name: 'city', required: true, placeholder: "{{t('registration_detail_suburb_placeholder')}}", ng: { model: 'enterprise.address.city' } } + %label{ for: 'enterprise_city' } {{'registration_detail_suburb' | t}} + %input.chunky{ id: 'enterprise_city', name: 'city', required: true, placeholder: "{{'registration_detail_suburb_placeholder' | t}}", ng: { model: 'enterprise.address.city' } } %span.error{ ng: { show: "details.city.$error.required && submitted" } } - {{t('registration_detail_suburb_error')}} + {{'registration_detail_suburb_error' | t}} .small-12.medium-4.large-4.columns .field - %label{ for: 'enterprise_zipcode' } {{t('registration_detail_postcode')}} - %input.chunky{ id: 'enterprise_zipcode', name: 'zipcode', required: true, placeholder: "{{t('registration_detail_postcode_placeholder')}}", ng: { model: 'enterprise.address.zipcode' } } + %label{ for: 'enterprise_zipcode' } {{'registration_detail_postcode' | t}} + %input.chunky{ id: 'enterprise_zipcode', name: 'zipcode', required: true, placeholder: "{{'registration_detail_postcode_placeholder' | t}}", ng: { model: 'enterprise.address.zipcode' } } %span.error{ ng: { show: "details.zipcode.$error.required && submitted" } } - {{t('registration_detail_postcode_error')}} + {{'registration_detail_postcode_error' | t}} .row .small-12.medium-4.large-4.columns .field - %label{ for: 'enterprise_state' } {{t('registration_detail_state')}} + %label{ for: 'enterprise_state' } {{'registration_detail_state' | t}} %select.chunky{ id: 'enterprise_state', name: 'state', ng: { model: 'enterprise.address.state_id', options: 's.id as s.abbr for s in enterprise.country.states', show: 'countryHasStates()', required: 'countryHasStates()' } } %span.error{ ng: { show: "details.state.$error.required && submitted" } } - {{t('registration_detail_state_error')}} + {{'registration_detail_state_error' | t}} .small-12.medium-8.large-8.columns .field - %label{ for: 'enterprise_country' } {{t('registration_detail_country')}} + %label{ for: 'enterprise_country' } {{'registration_detail_country' | t}} %select.chunky{ id: 'enterprise_country', name: 'country', required: true, ng: { model: 'enterprise.country', options: 'c as c.name for c in countries' } } %span.error{ ng: { show: "details.country.$error.required && submitted" } } - {{t('registration_detail_country_error')}} + {{'registration_detail_country_error' | t}} .row.buttons .small-12.columns %hr - %input.button.primary.right{ type: "submit", value: "{{t('continue')}}" } + %input.button.primary.right{ type: "submit", value: "{{'continue' | t}}" } diff --git a/app/assets/javascripts/templates/registration/finished.html.haml b/app/assets/javascripts/templates/registration/finished.html.haml index 92136147e1..1bf86d3ed5 100644 --- a/app/assets/javascripts/templates/registration/finished.html.haml +++ b/app/assets/javascripts/templates/registration/finished.html.haml @@ -2,11 +2,11 @@ .row .small-12.columns.pad-top %header - %h2 {{t('registration_finished_headline')}} + %h2 {{'registration_finished_headline' | t}} .panel.callout %p {{t('registration_finished_thanks', {enterprise: enterprise.name})}} - %p {{t('registration_finished_login')}} + %p {{'registration_finished_login' | t}} .row .small-12.columns.text-center %h4 @@ -14,4 +14,4 @@ %p{ "ng-bind-html" => "t('registration_finished_activate_instruction_html', {email: enterprise.email})"} - %a.button.primary{ type: "button", href: "/" } {{t('registration_finished_action')}} > + %a.button.primary{ type: "button", href: "/" } {{'registration_finished_action' | t}} > diff --git a/app/assets/javascripts/templates/registration/images.html.haml b/app/assets/javascripts/templates/registration/images.html.haml index 45d9cf2015..60a1ca602b 100644 --- a/app/assets/javascripts/templates/registration/images.html.haml +++ b/app/assets/javascripts/templates/registration/images.html.haml @@ -3,8 +3,8 @@ .row .small-12.columns %header - %h2 {{t('registration_images_headline')}} - %h5 {{t('registration_images_description')}} + %h2 {{'registration_images_headline' | t}} + %h5 {{'registration_images_description' | t}} %form{ name: 'images', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "select('social')" } } .row{ ng: { repeat: 'image_step in imageSteps', show: "imageStep == image_step" } } @@ -18,5 +18,5 @@ .row.buttons.pad-top{ ng: { if: "imageStep == 'promo'" } } .small-12.columns - %input.button.secondary{ type: "button", value: "{{t('back')}}", ng: { click: "imageSelect('logo')" } } - %input.button.primary.right{ type: "submit", value: "{{t('continue')}}" } + %input.button.secondary{ type: "button", value: "{{'back' | t}}", ng: { click: "imageSelect('logo')" } } + %input.button.primary.right{ type: "submit", value: "{{'continue' | t}}" } diff --git a/app/assets/javascripts/templates/registration/images/logo.html.haml b/app/assets/javascripts/templates/registration/images/logo.html.haml index 9c0b02ca87..842cbcbe11 100644 --- a/app/assets/javascripts/templates/registration/images/logo.html.haml +++ b/app/assets/javascripts/templates/registration/images/logo.html.haml @@ -4,42 +4,42 @@ .row .small-12.columns.center %h4 - {{t('select_logo')}} + {{'select_logo' | t}} .row .small-12.columns.center %span.small - {{t('logo_tip')}} + {{'logo_tip' | t}} .row.pad-top .small-12.columns .image-select.small-12.columns - %label.small-12.columns.button{ for: 'image-select' } {{t('logo_label')}} + %label.small-12.columns.button{ for: 'image-select' } {{'logo_label' | t}} %input#image-select{ type: 'file', hidden: true, 'nv-file-select' => true, uploader: "imageUploader", options: '{ alias: imageStep }' } .row.show-for-large-up .large-12.columns %span#or.large-12.columns - {{t('action_or')}} + {{'action_or' | t}} .row.show-for-large-up .large-12.columns #image-over{ 'nv-file-over' => true, uploader: "imageUploader" } - {{t('logo_drag')}} + {{'logo_drag' | t}} .small-12.medium-12.large-6.columns .row .small-12.columns.center .row .small-12.columns.center %h4 - {{t('review_logo')}} + {{'review_logo' | t}} .row .small-12.columns.center %span.small - {{t('review_logo_tip')}} + {{'review_logo_tip' | t}} .row.pad-top .small-12.columns.center #image-placeholder.logo %img{ ng: { show: "imageSrc() && !imageUploader.isUploading", src: '{{ imageSrc() }}' } } .message{ ng: { hide: "imageSrc() || imageUploader.isUploading" } } - {{t('logo_placeholder')}} + {{'logo_placeholder' | t}} .loading{ ng: { hide: "!imageUploader.isUploading" } } %img.spinner{ src: "/assets/spinning-circles.svg" } %br/ - {{t('uploading')}} + {{'uploading' | t}} diff --git a/app/assets/javascripts/templates/registration/images/promo.html.haml b/app/assets/javascripts/templates/registration/images/promo.html.haml index 61a382ecaa..342db5c08d 100644 --- a/app/assets/javascripts/templates/registration/images/promo.html.haml +++ b/app/assets/javascripts/templates/registration/images/promo.html.haml @@ -2,42 +2,42 @@ .row .small-12.columns.center %h4 - {{t('select_promo_image')}} + {{'select_promo_image' | t}} .row .small-12.medium-12.large-5.columns.center .row .small-12.columns.center %span.small - {{t('promo_image_tip')}} + {{'promo_image_tip' | t}} .row.pad-top .small-12.columns .image-select.small-12.columns - %label.small-12.columns.button{ for: 'image-select' } {{t('promo_image_label')}} + %label.small-12.columns.button{ for: 'image-select' } {{'promo_image_label' | t}} %input#image-select{ type: 'file', hidden: true, 'nv-file-select' => true, uploader: "imageUploader", options: '{ alias: imageStep }' } .large-2.columns %span#or.horizontal.large-12.columns - {{t('action_or')}} + {{'action_or' | t}} .large-5.columns #image-over{ 'nv-file-over' => true, uploader: "imageUploader" } - {{t('promo_image_drag')}} + {{'promo_image_drag' | t}} .small-12.medium-12.large-12.columns.pad-top .row .small-12.columns.center %h4 - {{t('review_promo_image')}} + {{'review_promo_image' | t}} .row .small-12.columns.center .row .small-12.columns.center %span.small - {{t('review_promo_image_tip')}} + {{'review_promo_image_tip' | t}} .row.pad-top .small-12.columns.center #image-placeholder.promo %img{ ng: { show: "imageSrc() && !imageUploader.isUploading", src: '{{ imageSrc() }}' } } .message{ ng: { hide: "imageSrc() || imageUploader.isUploading" } } - {{t('promo_image_placeholder')}} + {{'promo_image_placeholder' | t}} .loading{ ng: { hide: "!imageUploader.isUploading" } } %img.spinner{ src: "/assets/spinning-circles.svg" } %br/ - {{t('uploading')}} + {{'uploading' | t}} diff --git a/app/assets/javascripts/templates/registration/introduction.html.haml b/app/assets/javascripts/templates/registration/introduction.html.haml index 6288c7aa4f..c0adb0c357 100644 --- a/app/assets/javascripts/templates/registration/introduction.html.haml +++ b/app/assets/javascripts/templates/registration/introduction.html.haml @@ -1,41 +1,41 @@ .row .small-12.columns %header - %h2 {{t('registration_greeting')}} + %h2 {{'registration_greeting' | t}} %h4 %small %i.ofn-i_040-hub - {{t('registration_intro')}} + {{'registration_intro' | t}} .hide-for-large-up %hr - %input.button.small.primary{ type: "button", value: "{{t('registration_action')}}", ng: { click: "select('details')" } } + %input.button.small.primary{ type: "button", value: "{{'registration_action' | t}}", ng: { click: "select('details')" } } %hr .row{ 'data-equalizer' => true } .small-12.medium-12.large-6.columns.pad-top{ 'data-equalizer-watch' => true } - %h5 {{t('registration_checklist')}}: + %h5 {{'registration_checklist' | t}}: %ul.check-list %li - {{t('registration_time')}} + {{'registration_time' | t}} %li - {{t('registration_enterprise_address')}} + {{'registration_enterprise_address' | t}} %li - {{t('registration_contact_details')}} + {{'registration_contact_details' | t}} %li - {{t('registration_logo')}} + {{'registration_logo' | t}} %li - {{t('registration_promo_image')}} + {{'registration_promo_image' | t}} %li - {{t('registration_about_us')}} + {{'registration_about_us' | t}} .small-9.medium-8.large-5.columns.pad-top.end{ 'data-equalizer-watch' => true} %h5 - {{t('registration_outcome_headline')}} + {{'registration_outcome_headline' | t}} %p{ "ng-bind-html" => "t('registration_outcome1_html')" } - %p {{t('registration_outcome2')}} - %p {{t('registration_outcome3')}} + %p {{'registration_outcome2' | t}} + %p {{'registration_outcome3' | t}} .row.show-for-large-up .small-12.columns %hr - %input.button.primary.right{ type: "button", value: "{{t('registration_action')}}", ng: { click: "select('details')" } } + %input.button.primary.right{ type: "button", value: "{{'registration_action' | t}}", ng: { click: "select('details')" } } diff --git a/app/assets/javascripts/templates/registration/limit_reached.html.haml b/app/assets/javascripts/templates/registration/limit_reached.html.haml index 776332b94c..09e9866fd9 100644 --- a/app/assets/javascripts/templates/registration/limit_reached.html.haml +++ b/app/assets/javascripts/templates/registration/limit_reached.html.haml @@ -1,16 +1,16 @@ .row .small-12.columns %header - %h2 {{t('limit_reached_headline')}} - %h4 {{t('limit_reached_message')}} + %h2 {{'limit_reached_headline' | t}} + %h4 {{'limit_reached_message' | t}} .row .small-12.medium-3.large-2.columns.text-right.hide-for-small-only %img{:src => "/assets/potatoes.png"} .small-12.medium-9.large-10.columns %p - {{t('limit_reached_text')}} + {{'limit_reached_text' | t}} %strong Open Food Network. .row .small-12.columns %hr - %input.button.primary{ type: "button", value: "{{t('limit_reached_action')}}", ng: { click: "close()" } } + %input.button.primary{ type: "button", value: "{{'limit_reached_action' | t}}", ng: { click: "close()" } } diff --git a/app/assets/javascripts/templates/registration/social.html.haml b/app/assets/javascripts/templates/registration/social.html.haml index 5225256eee..553c801b4e 100644 --- a/app/assets/javascripts/templates/registration/social.html.haml +++ b/app/assets/javascripts/templates/registration/social.html.haml @@ -4,7 +4,7 @@ .row .small-12.columns %header - %h2 {{t('enterprise_final_step')}} + %h2 {{'enterprise_final_step' | t}} %h5 {{t('enterprise_social_text', {enterprise: enterprise.name})}} @@ -14,33 +14,33 @@ .row .small-12.columns .field - %label{ for: 'enterprise_website' } {{t('website')}}: - %input.chunky{ id: 'enterprise_website', placeholder: "{{t('website_placeholder')}}", ng: { model: 'enterprise.website' } } + %label{ for: 'enterprise_website' } {{'website' | t}}: + %input.chunky{ id: 'enterprise_website', placeholder: "{{'website_placeholder' | t}}", ng: { model: 'enterprise.website' } } .row .small-12.columns .field - %label{ for: 'enterprise_facebook' } {{t('facebook')}}: - %input.chunky{ id: 'enterprise_facebook', placeholder: "{{t('facebook_placeholder')}}", ng: { model: 'enterprise.facebook' } } + %label{ for: 'enterprise_facebook' } {{'facebook' | t}}: + %input.chunky{ id: 'enterprise_facebook', placeholder: "{{'facebook_placeholder' | t}}", ng: { model: 'enterprise.facebook' } } .row .small-12.columns .field - %label{ for: 'enterprise_linkedin' } {{t('linkedin')}}: - %input.chunky{ id: 'enterprise_linkedin', placeholder: "{{t('linkedin_placeholder')}}", ng: { model: 'enterprise.linkedin' } } + %label{ for: 'enterprise_linkedin' } {{'linkedin' | t}}: + %input.chunky{ id: 'enterprise_linkedin', placeholder: "{{'linkedin_placeholder' | t}}", ng: { model: 'enterprise.linkedin' } } .small-12.large-5.columns .row .small-12.columns .field - %label{ for: 'enterprise_twitter' } {{t('twitter')}}: - %input.chunky{ id: 'enterprise_twitter', placeholder: "{{t('twitter_placeholder')}}", ng: { model: 'enterprise.twitter' } } + %label{ for: 'enterprise_twitter' } {{'twitter' | t}}: + %input.chunky{ id: 'enterprise_twitter', placeholder: "{{'twitter_placeholder' | t}}", ng: { model: 'enterprise.twitter' } } .row .small-12.columns .field - %label{ for: 'enterprise_instagram' } {{t('instagram')}}: - %input.chunky{ id: 'enterprise_instagram', placeholder: "{{t('instagram_placeholder')}}", ng: { model: 'enterprise.instagram' } } + %label{ for: 'enterprise_instagram' } {{'instagram' | t}}: + %input.chunky{ id: 'enterprise_instagram', placeholder: "{{'instagram_placeholder' | t}}", ng: { model: 'enterprise.instagram' } } .row.buttons .small-12.columns - %input.button.secondary{ type: "button", value: "{{t('back')}}", ng: { click: "select('images')" } } - %input.button.primary.right{ type: "submit", value: "{{t('continue')}}" } + %input.button.secondary{ type: "button", value: "{{'back' | t}}", ng: { click: "select('images')" } } + %input.button.primary.right{ type: "submit", value: "{{'continue' | t}}" } diff --git a/app/assets/javascripts/templates/registration/type.html.haml b/app/assets/javascripts/templates/registration/type.html.haml index e1a5e09376..f7b580e64c 100644 --- a/app/assets/javascripts/templates/registration/type.html.haml +++ b/app/assets/javascripts/templates/registration/type.html.haml @@ -8,7 +8,7 @@ %h2 {{t('registration_type_headline', {enterprise: enterprise.name})}} %h4 - {{t('registration_type_question')}} + {{'registration_type_question' | t}} %form{ name: 'type', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "create(type)" } } .row#enterprise-types{ 'data-equalizer' => true, bo: { if: "enterprise.type != 'own'" } } @@ -17,32 +17,32 @@ .small-12.medium-6.large-6.columns{ 'data-equalizer-watch' => true } %a.btnpanel#producer-panel{ href: "#", ng: { click: "enterprise.is_primary_producer = true", class: "{selected: enterprise.is_primary_producer}" } } %i.ofn-i_059-producer - %h4 {{t('registration_type_producer')}} + %h4 {{'registration_type_producer' | t}} .small-12.medium-6.large-6.columns{ 'data-equalizer-watch' => true } %a.btnpanel#hub-panel{ href: "#", ng: { click: "enterprise.is_primary_producer = false", class: "{selected: enterprise.is_primary_producer == false}" } } %i.ofn-i_063-hub - %h4 {{t('registration_type_no_producer')}} + %h4 {{'registration_type_no_producer' | t}} .row .small-12.columns %input.chunky{ id: 'enterprise_is_primary_producer', name: 'is_primary_producer', hidden: true, required: true, ng: { model: 'enterprise.is_primary_producer' } } %span.error{ ng: { show: "type.is_primary_producer.$error.required && submitted" } } - {{t('registration_type_error')}} + {{'registration_type_error' | t}} .row .small-12.columns .panel.callout .left %i.ofn-i_013-help   - %p {{t('registration_type_producer_help')}} + %p {{'registration_type_producer_help' | t}} .panel.callout .left %i.ofn-i_013-help   - %p {{t('registration_type_no_producer_help')}} + %p {{'registration_type_no_producer_help' | t}} .row.buttons .small-12.columns - %input.button.secondary{ type: "button", value: "{{t('back')}}", ng: { click: "select('contact')" } } - %input.button.primary.right{ type: "submit", value: "{{t('create_profile')}}" } + %input.button.secondary{ type: "button", value: "{{'back' | t}}", ng: { click: "select('contact')" } } + %input.button.primary.right{ type: "submit", value: "{{'create_profile' | t}}" } diff --git a/app/assets/javascripts/templates/registration_authentication.html.haml b/app/assets/javascripts/templates/registration_authentication.html.haml index 05e1d45154..f277c50abc 100644 --- a/app/assets/javascripts/templates/registration_authentication.html.haml +++ b/app/assets/javascripts/templates/registration_authentication.html.haml @@ -1,7 +1,7 @@ .container .row.modal-centered - %h2 {{t('welcome_to_ofn')}} - %h5 {{t('signup_or_login')}}: + %h2 {{'welcome_to_ofn' | t}} + %h5 {{'signup_or_login' | t}}: %div{"ng-controller" => "AuthenticationCtrl"} %tabset %ng-include{src: "'signup.html'"} @@ -9,9 +9,9 @@ %ng-include{src: "'forgot.html'"} %div{ ng: { show: "active('/signup')"} } %hr - {{t('have_an_account')}} + {{'have_an_account' | t}} %a{ href: "", ng: { click: "select('/login')"}} - {{t('action_login')}} + {{'action_login' | t}} %a.close-reveal-modal{"ng-click" => "$close()"} %i.ofn-i_009-close diff --git a/app/assets/javascripts/templates/shop_variant.html.haml b/app/assets/javascripts/templates/shop_variant.html.haml index 1d6a090935..00e4f70d7c 100644 --- a/app/assets/javascripts/templates/shop_variant.html.haml +++ b/app/assets/javascripts/templates/shop_variant.html.haml @@ -5,7 +5,7 @@ .bulk-buy.inline{"bo-if" => "variant.product.group_buy"} %i.ofn-i_056-bulk>< %em>< - \ {{t('bulk')}} + \ {{'bulk' | t}} -# WITHOUT GROUP BUY .small-5.medium-3.large-3.columns.text-right{"bo-if" => "!variant.product.group_buy"} @@ -30,7 +30,7 @@ integer: true, min: 0, "ng-model" => "variant.line_item.quantity", - placeholder: "{{t('shop_variant_quantity_min')}}", + placeholder: "{{'shop_variant_quantity_min' | t}}", "ofn-disable-scroll" => true, max: "{{variant.on_demand && 9999 || variant.count_on_hand }}", name: "variants[{{variant.id}}]", id: "variants_{{variant.id}}"} @@ -40,7 +40,7 @@ integer: true, min: 0, "ng-model" => "variant.line_item.max_quantity", - placeholder: "{{t('shop_variant_quantity_max')}}", + placeholder: "{{'shop_variant_quantity_max' | t}}", "ofn-disable-scroll" => true, max: "{{variant.on_demand && 9999 || variant.count_on_hand }}", name: "variant_attributes[{{variant.id}}][max_quantity]"} diff --git a/app/assets/javascripts/templates/signup.html.haml b/app/assets/javascripts/templates/signup.html.haml index 48f75e1a44..2e780aabb5 100644 --- a/app/assets/javascripts/templates/signup.html.haml +++ b/app/assets/javascripts/templates/signup.html.haml @@ -1,11 +1,11 @@ %tab#sign-up-content{"ng-controller" => "SignupCtrl", - heading: "{{t('label_signup')}}", + heading: "{{'label_signup' | t}}", active: "active(path)", select: "select(path)"} %form{"ng-submit" => "submit()"} .row .large-12.columns - %label{for: "email"} {{t('signup_email')}} + %label{for: "email"} {{'signup_email' | t}} %input.title.input-text{name: "email", type: "email", id: "email", @@ -15,7 +15,7 @@ {{ errors.email.join(' ') }} .row .large-12.columns - %label{for: "password"} {{t('choose_password')}} + %label{for: "password"} {{'choose_password' | t}} %input.title.input-text{name: "password", type: "password", id: "password", @@ -26,7 +26,7 @@ {{ errors.password.join(' ') }} .row .large-12.columns - %label{for: "password_confirmation"} {{t('confirm_password')}} + %label{for: "password_confirmation"} {{'confirm_password' | t}} %input.title.input-text{name: "password_confirmation", type: "password", id: "password_confirmation", @@ -38,4 +38,4 @@ %input.button.primary{name: "commit", tabindex: "3", type: "submit", - value: "{{t('action_signup')}}"} + value: "{{'action_signup' | t}}"} From 5f8004385749fae28249a61c25a8feac8d14cfde Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 9 Oct 2015 10:21:26 +1100 Subject: [PATCH 27/30] using translate filter instead of root scope function with parameters --- .../javascripts/darkswarm/filters/translate.js.coffee | 8 ++++---- .../javascripts/templates/registration/about.html.haml | 4 ++-- .../javascripts/templates/registration/contact.html.haml | 3 +-- .../javascripts/templates/registration/finished.html.haml | 6 ++---- .../javascripts/templates/registration/social.html.haml | 3 +-- .../javascripts/templates/registration/type.html.haml | 3 +-- 6 files changed, 11 insertions(+), 16 deletions(-) diff --git a/app/assets/javascripts/darkswarm/filters/translate.js.coffee b/app/assets/javascripts/darkswarm/filters/translate.js.coffee index d2fef7889a..55606da2cf 100644 --- a/app/assets/javascripts/darkswarm/filters/translate.js.coffee +++ b/app/assets/javascripts/darkswarm/filters/translate.js.coffee @@ -1,7 +1,7 @@ Darkswarm.filter "translate", -> - (key) -> - t(key) + (key, options) -> + t(key, options) Darkswarm.filter "t", -> - (key) -> - t(key) + (key, options) -> + t(key, options) diff --git a/app/assets/javascripts/templates/registration/about.html.haml b/app/assets/javascripts/templates/registration/about.html.haml index 7a0592799c..40d02e3d32 100644 --- a/app/assets/javascripts/templates/registration/about.html.haml +++ b/app/assets/javascripts/templates/registration/about.html.haml @@ -13,7 +13,7 @@ .row .small-12.columns .alert-box.info{ "ofn-inline-alert" => true, ng: { show: "visible" } } - %h6 {{t('enterprise_success', {enterprise: enterprise.name})}} + %h6{ "ng-bind" => "'enterprise_success' | t:{enterprise: enterprise.name}" } %span {{'enterprise_registration_exit_message' | t}} %a.close{ ng: { click: "close()" } } × @@ -28,7 +28,7 @@ .field %label{ for: 'enterprise_long_desc' } {{'enterprise_long_desc' | t}}: %textarea.chunky{ id: 'enterprise_long_desc', rows: 6, placeholder: "{{'enterprise_long_desc_placeholder' | t}}", ng: { model: 'enterprise.long_description' } } - %small {{t('enterprise_long_desc_length', {num: enterprise.long_description.length})}} + %small{ "ng-bind" => "'enterprise_long_desc_length' | t:{num: enterprise.long_description.length}" } .small-12.large-4.columns .row .small-12.columns diff --git a/app/assets/javascripts/templates/registration/contact.html.haml b/app/assets/javascripts/templates/registration/contact.html.haml index 1621b95a01..b2a2164910 100644 --- a/app/assets/javascripts/templates/registration/contact.html.haml +++ b/app/assets/javascripts/templates/registration/contact.html.haml @@ -4,8 +4,7 @@ .small-12.columns %header %h2 {{'registration_greeting' | t}} - %h5 - {{t('who_is_managing_enterprise', {enterprise: enterprise.name})}} + %h5{ "ng-bind" => "'who_is_managing_enterprise' | t:{enterprise: enterprise.name}" } %form{ name: 'contact', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "selectIfValid('type',contact)" } } .row.content diff --git a/app/assets/javascripts/templates/registration/finished.html.haml b/app/assets/javascripts/templates/registration/finished.html.haml index 1bf86d3ed5..5c7b3b6ad0 100644 --- a/app/assets/javascripts/templates/registration/finished.html.haml +++ b/app/assets/javascripts/templates/registration/finished.html.haml @@ -4,13 +4,11 @@ %header %h2 {{'registration_finished_headline' | t}} .panel.callout - %p - {{t('registration_finished_thanks', {enterprise: enterprise.name})}} + %p{ "ng-bind" => "'registration_finished_thanks' | t:{enterprise: enterprise.name}" } %p {{'registration_finished_login' | t}} .row .small-12.columns.text-center - %h4 - {{t('registration_finished_activate', {enterprise: enterprise.name})}} + %h4{ "ng-bind" => "'registration_finished_activate' | t:{enterprise: enterprise.name}" } %p{ "ng-bind-html" => "t('registration_finished_activate_instruction_html', {email: enterprise.email})"} diff --git a/app/assets/javascripts/templates/registration/social.html.haml b/app/assets/javascripts/templates/registration/social.html.haml index 553c801b4e..ac40ef9c56 100644 --- a/app/assets/javascripts/templates/registration/social.html.haml +++ b/app/assets/javascripts/templates/registration/social.html.haml @@ -5,8 +5,7 @@ .small-12.columns %header %h2 {{'enterprise_final_step' | t}} - %h5 - {{t('enterprise_social_text', {enterprise: enterprise.name})}} + %h5{ "ng-bind" => "'enterprise_social_text' | t:{enterprise: enterprise.name}" } %form{ name: 'social', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "update('finished',social)" } } .row.content diff --git a/app/assets/javascripts/templates/registration/type.html.haml b/app/assets/javascripts/templates/registration/type.html.haml index f7b580e64c..c63b40239e 100644 --- a/app/assets/javascripts/templates/registration/type.html.haml +++ b/app/assets/javascripts/templates/registration/type.html.haml @@ -5,8 +5,7 @@ .row .small-12.columns %header - %h2 - {{t('registration_type_headline', {enterprise: enterprise.name})}} + %h2{ "ng-bind" => "'registration_type_headline' | t:{enterprise: enterprise.name}" } %h4 {{'registration_type_question' | t}} From 7d379dbe4b04dfc338477bbebda705c9e64b37f8 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 9 Oct 2015 10:23:48 +1100 Subject: [PATCH 28/30] sort travis sets by run time --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fb9f4edf7a..7478892d85 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,11 +6,11 @@ rvm: # The test cases are roughly split according to their test times. # It would be better to use https://github.com/ArturT/knapsack. env: + - TEST_CASES="./spec/features/admin" + - TEST_CASES="./spec/features/consumer" - TEST_CASES="./spec/models" - TEST_CASES="./spec/controllers ./spec/views" - TEST_CASES="./spec/requests ./spec/helpers ./spec/mailers" - - TEST_CASES="./spec/features/admin" - - TEST_CASES="./spec/features/consumer" #- TEST_CASES="./spec/routing" before_script: From c169e4af921e772bdb3078df0ff33c12a286dc09 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 9 Oct 2015 10:43:55 +1100 Subject: [PATCH 29/30] rename locale nor to nb --- config/locales/{nor.yml => nb.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename config/locales/{nor.yml => nb.yml} (99%) diff --git a/config/locales/nor.yml b/config/locales/nb.yml similarity index 99% rename from config/locales/nor.yml rename to config/locales/nb.yml index 88093c4b29..8f3220f6f8 100644 --- a/config/locales/nor.yml +++ b/config/locales/nb.yml @@ -1,7 +1,7 @@ # Sample localization file for English. Add more files in this directory for other locales. # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. -nor: +nb: devise: failure: invalid: | From 1751a9590973fe09b5af31c803022197de092cc9 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 9 Oct 2015 11:23:40 +1100 Subject: [PATCH 30/30] place I18n init at right place in karma task --- lib/tasks/karma.rake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/tasks/karma.rake b/lib/tasks/karma.rake index 848a5b6238..ec994d37fc 100644 --- a/lib/tasks/karma.rake +++ b/lib/tasks/karma.rake @@ -10,8 +10,6 @@ namespace :karma do private def with_tmp_config(command, args = nil) - - I18n.backend.send(:init_translations) unless I18n.backend.initialized? Tempfile.open('karma_unit.js', Rails.root.join('tmp') ) do |f| f.write unit_js(application_spec_files << i18n_file) f.flush @@ -33,6 +31,7 @@ namespace :karma do end def i18n_file + I18n.backend.send(:init_translations) unless I18n.backend.initialized? f = Tempfile.open('i18n.js', Rails.root.join('tmp') ) f.write 'window.I18n = ' f.write I18n.backend.send(:translations)[I18n.locale].with_indifferent_access.to_json.html_safe