diff --git a/.github/ISSUE_TEMPLATE/story-template.md b/.github/ISSUE_TEMPLATE/story-template.md index 48a1c33493..f3bfa62f54 100644 --- a/.github/ISSUE_TEMPLATE/story-template.md +++ b/.github/ISSUE_TEMPLATE/story-template.md @@ -7,12 +7,12 @@ assignees: '' --- -**## Description** +## Description -**## Acceptance Criteria** +## Acceptance Criteria diff --git a/Gemfile b/Gemfile index 93aa430690..5fa4a1fa6d 100644 --- a/Gemfile +++ b/Gemfile @@ -23,7 +23,7 @@ gem 'spree_auth_devise', github: 'openfoodfoundation/spree_auth_devise', branch: # - Change type of password from string to password to hide it in the form gem 'spree_paypal_express', github: "openfoodfoundation/better_spree_paypal_express", branch: "spree-upgrade-intermediate" #gem 'spree_paypal_express', github: "spree-contrib/better_spree_paypal_express", branch: "1-3-stable" -gem 'stripe', '~> 4.5.0' +gem 'stripe', '~> 4.9.0' # We need at least this version to have Digicert's root certificate # which is needed for Pin Payments (and possibly others). gem 'activemerchant', '~> 1.78' diff --git a/Gemfile.lock b/Gemfile.lock index 87b0c1f49d..906b6ed765 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -239,7 +239,7 @@ GEM execjs coffee-script-source (1.10.0) colorize (0.8.1) - combine_pdf (1.0.15) + combine_pdf (1.0.16) ruby-rc4 (>= 0.1.5) compass (1.0.3) chunky_png (~> 1.2) @@ -559,7 +559,7 @@ GEM multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) - oj (3.7.8) + oj (3.7.9) orm_adapter (0.5.0) paper_trail (5.2.3) activerecord (>= 3.0, < 6.0) @@ -724,7 +724,7 @@ GEM tilt (~> 1.1, != 1.3.0) state_machine (1.2.0) stringex (1.3.3) - stripe (4.5.0) + stripe (4.9.0) faraday (~> 0.13) net-http-persistent (~> 3.0) therubyracer (0.12.0) @@ -863,7 +863,7 @@ DEPENDENCIES spree_paypal_express! spring (= 1.7.2) spring-commands-rspec - stripe (~> 4.5.0) + stripe (~> 4.9.0) therubyracer (= 0.12.0) timecop truncate_html diff --git a/app/assets/javascripts/templates/registration_authentication.html.haml b/app/assets/javascripts/templates/registration_authentication.html.haml index f277c50abc..b5a525c3f2 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_ofn' | t}} - %h5 {{'signup_or_login' | t}}: + %h2 {{'js.registration.welcome_to_ofn' | t}} + %h5 {{'js.registration.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 - {{'have_an_account' | t}} + {{'js.registration.have_an_account' | t}} %a{ href: "", ng: { click: "select('/login')"}} - {{'action_login' | t}} + {{'js.registration.action_login' | t}} %a.close-reveal-modal{"ng-click" => "$close()"} %i.ofn-i_009-close diff --git a/app/models/concerns/stock_settings_override_validation.rb b/app/models/concerns/stock_settings_override_validation.rb index b9e3624aec..b548a8b64b 100644 --- a/app/models/concerns/stock_settings_override_validation.rb +++ b/app/models/concerns/stock_settings_override_validation.rb @@ -1,3 +1,21 @@ +# Validates the combination of on_demand and count_on_hand values. +# +# `on_demand` can have three values: true, false or nil +# `count_on_hand` can either be: nil or a number +# +# This means that a variant override can be in six different stock states +# but only three of them are valid. +# +# | on_demand | count_on_hand | stock_overridden? | use_producer_stock_settings? | valid? | +# |-----------|---------------|-------------------|------------------------------|--------| +# | 1 | nil | false | false | true | +# | 0 | x | true | false | true | +# | nil | nil | false | true | true | +# | 1 | x | ? | ? | false | +# | 0 | nil | ? | ? | false | +# | nil | x | ? | ? | false | +# +# This module has one method for each invalid case. module StockSettingsOverrideValidation extend ActiveSupport::Concern diff --git a/app/models/variant_override.rb b/app/models/variant_override.rb index dd3b22a5e0..355a46d1db 100644 --- a/app/models/variant_override.rb +++ b/app/models/variant_override.rb @@ -57,9 +57,15 @@ class VariantOverride < ActiveRecord::Base end def stock_overridden? + # If count_on_hand is present, it means on_demand is false + # See StockSettingsOverrideValidation for details count_on_hand.present? end + def use_producer_stock_settings? + on_demand.nil? + end + def decrement_stock!(quantity) if stock_overridden? decrement! :count_on_hand, quantity diff --git a/app/overrides/add_change_distributor_form_to_checkout_address.rb b/app/overrides/add_change_distributor_form_to_checkout_address.rb deleted file mode 100644 index 19b91d2b1f..0000000000 --- a/app/overrides/add_change_distributor_form_to_checkout_address.rb +++ /dev/null @@ -1,6 +0,0 @@ -# Disabled until this form takes order cycles into account -# Deface::Override.new(:virtual_path => "spree/checkout/edit", -# :insert_after => "[data-hook='checkout_summary_box']", -# :partial => "spree/checkout/other_available_distributors", -# :name => "add_change_distributor_form_to_checkout_address", -# :original => '60b9b1a39079f4efa85ff0425108edf671349d4f') diff --git a/app/overrides/add_distributor_details_js_to_product.rb b/app/overrides/add_distributor_details_js_to_product.rb deleted file mode 100644 index 607735b992..0000000000 --- a/app/overrides/add_distributor_details_js_to_product.rb +++ /dev/null @@ -1,5 +0,0 @@ -Deface::Override.new(:virtual_path => "spree/products/show", - :insert_after => "[data-hook='product_show']", - :text => "<%= javascript_include_tag main_app.distributors_enterprises_path(:format => :js) %>", - :name => "add_distributor_details_js_to_product", - :original => 'b05ac497efeeebd4464f29891fd2c4a0f60c24d9') diff --git a/app/overrides/add_distributor_details_to_product.rb b/app/overrides/add_distributor_details_to_product.rb deleted file mode 100644 index dbe657bf96..0000000000 --- a/app/overrides/add_distributor_details_to_product.rb +++ /dev/null @@ -1,5 +0,0 @@ -Deface::Override.new(:virtual_path => "spree/products/show", - :insert_before => "[data-hook='cart_form']", - :partial => "spree/products/distributor_details", - :name => "add_distributor_details_to_product", - :original => '789e3f5f6f36a8cd4115d7342752a37735659298') diff --git a/app/overrides/add_distributor_to_add_to_cart_form.rb b/app/overrides/add_distributor_to_add_to_cart_form.rb deleted file mode 100644 index ad47700473..0000000000 --- a/app/overrides/add_distributor_to_add_to_cart_form.rb +++ /dev/null @@ -1,5 +0,0 @@ -Deface::Override.new(:virtual_path => "spree/products/_cart_form", - :replace => "[data-hook='product_price'] .add-to-cart", - :partial => "spree/products/add_to_cart", - :name => "add_distributor_to_add_to_cart_form", - :original => '294014222132c795048fc6c7866971a332672c87') diff --git a/app/overrides/add_source_to_product.rb b/app/overrides/add_source_to_product.rb deleted file mode 100644 index ded798e840..0000000000 --- a/app/overrides/add_source_to_product.rb +++ /dev/null @@ -1,5 +0,0 @@ -Deface::Override.new(:virtual_path => "spree/products/show", - :insert_bottom => "[data-hook='product_left_part_wrap']", - :partial => "spree/products/source", - :name => "add_source_to_product", - :original => 'bce3ba4847b3eac8ae061774a664ac4951d3d9db') diff --git a/app/overrides/replace_checkout_payment_button.rb b/app/overrides/replace_checkout_payment_button.rb deleted file mode 100644 index 60a198817c..0000000000 --- a/app/overrides/replace_checkout_payment_button.rb +++ /dev/null @@ -1,5 +0,0 @@ -Deface::Override.new(:virtual_path => "spree/checkout/_payment", - :replace => "code[erb-loud]:contains('submit_tag t(:save_and_continue)')", - :text => "<%= submit_tag I18n.t(:process_my_order), :class => 'continue button primary' %>", - :name => "replace_checkout_payment_button", - :original => 'ce2043a01931b3bc16b045302ebb0e0bb9150b67') diff --git a/app/overrides/replace_shipping_address_form_with_distributor_details.rb b/app/overrides/replace_shipping_address_form_with_distributor_details.rb deleted file mode 100644 index c408dc8ed4..0000000000 --- a/app/overrides/replace_shipping_address_form_with_distributor_details.rb +++ /dev/null @@ -1,5 +0,0 @@ -Deface::Override.new(:virtual_path => "spree/checkout/_address", - :replace => "[data-hook='shipping_fieldset_wrapper']", - :partial => "spree/checkout/distributor", - :name => "replace_shipping_address_form_with_distributor_details", - :original => '53e219f90a2e1ba702a767261d0c2afe100ac751') diff --git a/app/overrides/spree/checkout/_delivery/shipping_instructions_to_delivery_instructions.html.haml.deface b/app/overrides/spree/checkout/_delivery/shipping_instructions_to_delivery_instructions.html.haml.deface deleted file mode 100644 index badf49339c..0000000000 --- a/app/overrides/spree/checkout/_delivery/shipping_instructions_to_delivery_instructions.html.haml.deface +++ /dev/null @@ -1,5 +0,0 @@ -/ replace_contents '#shipping_method p#minstrs' - -= form.label :special_instructions, t(:delivery_instructions) -%br/ -= form.text_area :special_instructions, :cols => 40, :rows => 7 diff --git a/app/overrides/spree/checkout/_delivery/shipping_method_to_delivery_method.html.haml.deface b/app/overrides/spree/checkout/_delivery/shipping_method_to_delivery_method.html.haml.deface deleted file mode 100644 index 817a27b0ca..0000000000 --- a/app/overrides/spree/checkout/_delivery/shipping_method_to_delivery_method.html.haml.deface +++ /dev/null @@ -1,2 +0,0 @@ -/ replace_contents '#shipping_method legend' -= t(:delivery_method) diff --git a/app/overrides/spree/checkout/edit/add_new_save_checkout_button.html.erb.deface b/app/overrides/spree/checkout/edit/add_new_save_checkout_button.html.erb.deface deleted file mode 100644 index f70c064f72..0000000000 --- a/app/overrides/spree/checkout/edit/add_new_save_checkout_button.html.erb.deface +++ /dev/null @@ -1,16 +0,0 @@ - - -<% # Add a new 'Save and Continue/Process My Order' button under Order Summary on the checkout pages %> - -
diff --git a/app/overrides/spree/products/_cart_form/only_show_current_distribution_variants.html.haml.deface b/app/overrides/spree/products/_cart_form/only_show_current_distribution_variants.html.haml.deface deleted file mode 100644 index adfe5af84f..0000000000 --- a/app/overrides/spree/products/_cart_form/only_show_current_distribution_variants.html.haml.deface +++ /dev/null @@ -1,16 +0,0 @@ -/ replace_contents '#product-variants' - -%h6.product-section-title= t(:variants) -%ul - - has_checked = false - - @product.variants.active(current_currency).each_with_index do |v,index| - - next if v.option_values.empty? || (!v.in_stock && !Spree::Config[:show_zero_stock_products]) - - next if current_order_cycle.present? && !current_order_cycle.has_variant?(v) # All copied from spree apart from this line - - checked = !has_checked && (v.in_stock || Spree::Config[:allow_backorders]) - - has_checked = true if checked - %li - = radio_button_tag "products[#{@product.id}]", v.id, checked, :disabled => !v.in_stock && !Spree::Config[:allow_backorders], 'data-price' => v.price_in(current_currency).display_price - %label{:for => ['products', @product.id, v.id].join('_')} - %span.variant-description= variant_options v - - if variant_price v - %span.price.diff= variant_price v diff --git a/app/overrides/spree/products/_taxons/hide_taxon_crumbs.html.haml.deface b/app/overrides/spree/products/_taxons/hide_taxon_crumbs.html.haml.deface deleted file mode 100644 index 524433516c..0000000000 --- a/app/overrides/spree/products/_taxons/hide_taxon_crumbs.html.haml.deface +++ /dev/null @@ -1 +0,0 @@ -/ remove '#taxon-crumbs' diff --git a/app/views/registration/steps/_about.html.haml b/app/views/registration/steps/_about.html.haml index 529fdebea3..5ec5dbb2c7 100644 --- a/app/views/registration/steps/_about.html.haml +++ b/app/views/registration/steps/_about.html.haml @@ -4,9 +4,9 @@ .row .small-12.columns %header - %h2 {{'enterprise_about_headline' | t}} + %h2= t(".headline") %h5 - {{'enterprise_about_message' | t}} + = t(".message") %span{ ng: { class: "{brick: !enterprise.is_primary_producer, turquoise: enterprise.is_primary_producer}" } } {{ enterprise.name }} @@ -14,33 +14,33 @@ .row .small-12.columns .alert-box.info{ "ofn-inline-alert" => true, ng: { show: "visible" } } - %h6{ "ng-bind" => "'enterprise_success' | t:{enterprise: enterprise.name}" } - %span {{'enterprise_registration_exit_message' | t}} + %h6{ "ng-bind" => "'registration.steps.about.success' | t:{enterprise: enterprise.name}" } + %span= t(".registration_exit_message") %a.close{ ng: { click: "close()" } } × .small-12.large-8.columns .row .small-12.columns .field - %label{ for: 'enterprise_description' } {{'enterprise_description' | t}}: - %input.chunky{ id: 'enterprise_description', placeholder: "{{'enterprise_description_placeholder' | t}}", ng: { model: 'enterprise.description' } } + %label{ for: 'enterprise_description' }= t(".enterprise_description") + %input.chunky{ id: 'enterprise_description', placeholder: "{{'registration.steps.about.enterprise_description_placeholder' | t}}", ng: { model: 'enterprise.description' } } .row .small-12.columns .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{ "ng-bind" => "'enterprise_long_desc_length' | t:{num: enterprise.long_description.length}" } + %label{ for: 'enterprise_long_desc' }= t(".enterprise_long_desc") + %textarea.chunky{ id: 'enterprise_long_desc', rows: 6, placeholder: "{{'registration.steps.about.enterprise_long_desc_placeholder' | t}}", ng: { model: 'enterprise.long_description' } } + %small{ "ng-bind" => "'registration.steps.about.enterprise_long_desc_length' | t:{num: enterprise.long_description.length}" } .small-12.large-4.columns .row .small-12.columns .field - %label{ for: 'enterprise_abn' } {{'enterprise_abn' | t}}: - %input.chunky{ id: 'enterprise_abn', placeholder: "{{'enterprise_abn_placeholder' | t}}", ng: { model: 'enterprise.abn' } } + %label{ for: 'enterprise_abn' }= t(".enterprise_abn")+":" + %input.chunky{ id: 'enterprise_abn', placeholder: "{{'registration.steps.about.enterprise_abn_placeholder' | t}}", ng: { model: 'enterprise.abn' } } .row .small-12.columns .field - %label{ for: 'enterprise_acn' } {{'enterprise_acn' | t}}: - %input.chunky{ id: 'enterprise_acn', placeholder: "{{'enterprise_acn_placeholder' | t}}", ng: { model: 'enterprise.acn' } } + %label{ for: 'enterprise_acn' }= t(".enterprise_acn")+":" + %input.chunky{ id: 'enterprise_acn', placeholder: "{{'registration.steps.about.enterprise_acn_placeholder' | t}}", ng: { model: 'enterprise.acn' } } .row .small-12.columns .field @@ -50,7 +50,7 @@ %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' } {{'say_no' | t}} %span.error.small-12.columns{ ng: { show: "about.charges_sales_tax.$error.required && submitted" } } - {{'enterprise_tax_required' | t}} + = t(".enterprise_tax_required") .row.buttons.pad-top .small-12.columns diff --git a/app/views/registration/steps/_contact.html.haml b/app/views/registration/steps/_contact.html.haml index 746503282d..eed9c25c73 100644 --- a/app/views/registration/steps/_contact.html.haml +++ b/app/views/registration/steps/_contact.html.haml @@ -4,26 +4,26 @@ .row .small-12.columns %header - %h2 {{'registration_greeting' | t}} - %h5{ "ng-bind" => "'who_is_managing_enterprise' | t:{enterprise: enterprise.name}" } + %h2= t('registration.steps.introduction.registration_greeting') + %h5{ "ng-bind" => "'registration.steps.contact.who_is_managing_enterprise' | t:{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' } {{'enterprise.registration.modal.steps.contact.contact_field' | t}}: - %input.chunky.small-12.columns{ id: 'enterprise_contact', name: 'contact_name', required: true, placeholder: "{{'enterprise.registration.modal.steps.contact.contact_field_placeholder' | t}}", ng: { model: 'enterprise.contact_name' } } + %label{ for: 'enterprise_contact' }= t(".contact_field") + %input.chunky.small-12.columns{ id: 'enterprise_contact', name: 'contact_name', required: true, placeholder: "{{'registration.steps.contact.contact_field_placeholder' | t}}", ng: { model: 'enterprise.contact_name' } } %span.error.small-12.columns{ ng: { show: "contact.contact_name.$error.required && submitted" } } - {{'enterprise.registration.modal.steps.contact.contact_field_required' | t}} + = t(".contact_field_required") .row .small-12.columns.field - %label{ for: 'enterprise_email_address' } {{'admin.enterprises.form.contact.email_address' | t}}: + %label{ for: 'enterprise_email_address' }= t("admin.enterprises.form.contact.email_address")+":" %input.chunky.small-12.columns{ id: 'enterprise_email_address', name: 'email_address', type: 'email', placeholder: t('admin.enterprises.form.contact.email_address_placeholder'), ng: { model: 'enterprise.email_address' } } .row .small-12.columns.field - %label{ for: 'enterprise_phone' } {{'enterprise.registration.modal.steps.contact.phone_field' | t}}: - %input.chunky.small-12.columns{ id: 'enterprise_phone', name: 'phone', placeholder: "{{'enterprise.registration.modal.steps.contact.phone_field_placeholder' | t}}", ng: { model: 'enterprise.phone' } } + %label{ for: 'enterprise_phone' }= t(".phone_field")+":" + %input.chunky.small-12.columns{ id: 'enterprise_phone', name: 'phone', placeholder: "{{'registration.steps.contact.phone_field_placeholder' | t}}", ng: { model: 'enterprise.phone' } } .small-12.medium-12.large-5.hide-for-small-only .row.buttons diff --git a/app/views/registration/steps/_details.html.haml b/app/views/registration/steps/_details.html.haml index 4fce6a4319..6639919830 100644 --- a/app/views/registration/steps/_details.html.haml +++ b/app/views/registration/steps/_details.html.haml @@ -4,60 +4,59 @@ .row .small-12.columns %header - %h2 {{'enterprise.registration.modal.steps.details.headline' | t}} - %h5{ ng: { if: "::enterprise.type != 'own'" } } {{'enterprise.registration.modal.steps.details.enterprise' | t}} - %h5{ ng: { if: "::enterprise.type == 'own'" } } {{'enterprise.registration.modal.steps.details.producer' | t}} + %h2= t('.headline') + %h5{ ng: { if: "::enterprise.type != 'own'" } }= t(".enterprise") + %h5{ ng: { if: "::enterprise.type == 'own'" } }= t(".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', ng: { if: "::enterprise.type != 'own'" } } {{'enterprise.registration.modal.steps.details.enterprise_name_field' | t}} - %label{ for: 'enterprise_name', ng: { if: "::enterprise.type == 'own'" } } {{'enterprise.registration.modal.steps.details.producer_name_field' | t}} - %input.chunky{ id: 'enterprise_name', name: 'name', placeholder: "{{'enterprise.registration.modal.steps.details.producer_name_field_placeholder' | t}}", required: true, ng: { model: 'enterprise.name' } } + %label{ for: 'enterprise_name', ng: { if: "::enterprise.type != 'own'" } }= t(".enterprise_name_field") + %label{ for: 'enterprise_name', ng: { if: "::enterprise.type == 'own'" } }= t(".producer_name_field") + %input.chunky{ id: 'enterprise_name', name: 'name', placeholder: "{{'registration.steps.details.producer_name_field_placeholder' | t}}", required: true, ng: { model: 'enterprise.name' } } %span.error{ ng: { show: "details.name.$error.required && submitted" } } - {{'enterprise.registration.modal.steps.details.producer_name_field_error' | t}} + = t(".producer_name_field_error") .row .small-12.medium-9.large-6.columns .field - %label{ for: 'enterprise_address' } {{'enterprise.registration.modal.steps.details.address1_field' | t}} - %input.chunky{ id: 'enterprise_address', name: 'address1', required: true, placeholder: "{{'enterprise.registration.modal.steps.details.address1_field_placeholder' | t}}", required: true, ng: { model: 'enterprise.address.address1' } } + %label{ for: 'enterprise_address' }= t(".address1_field") + %input.chunky{ id: 'enterprise_address', name: 'address1', required: true, placeholder: "{{'registration.steps.details.address1_field_placeholder' | t}}", required: true, ng: { model: 'enterprise.address.address1' } } %span.error{ ng: { show: "details.address1.$error.required && submitted" } } - {{'enterprise.registration.modal.steps.details.address1_field_error' | t}} + = t(".address1_field_error") .field - %label{ for: 'enterprise_address2' } {{'enterprise.registration.modal.steps.details.address2_field' | t}} + %label{ for: 'enterprise_address2' }= t(".address2_field") %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' } {{'enterprise.registration.modal.steps.details.suburb_field' | t}} - %input.chunky{ id: 'enterprise_city', name: 'city', required: true, placeholder: "{{'enterprise.registration.modal.steps.details.suburb_field_placeholder' | t}}", ng: { model: 'enterprise.address.city' } } + %label{ for: 'enterprise_city' }= t('.suburb_field') + %input.chunky{ id: 'enterprise_city', name: 'city', required: true, placeholder: "{{'registration.steps.details.suburb_field_placeholder' | t}}", ng: { model: 'enterprise.address.city' } } %span.error{ ng: { show: "details.city.$error.required && submitted" } } - {{'enterprise.registration.modal.steps.details.suburb_field_error' | t}} + = t(".suburb_field_error") .small-12.medium-4.large-4.columns .field - %label{ for: 'enterprise_zipcode' } {{'enterprise.registration.modal.steps.details.postcode_field' | t}} - %input.chunky{ id: 'enterprise_zipcode', name: 'zipcode', required: true, placeholder: "{{'enterprise.registration.modal.steps.details.postcode_field_placeholder' | t}}", ng: { model: 'enterprise.address.zipcode' } } + %label{ for: 'enterprise_zipcode' }= t(".postcode_field") + %input.chunky{ id: 'enterprise_zipcode', name: 'zipcode', required: true, placeholder: "{{'registration.steps.details.postcode_field_placeholder' | t}}", ng: { model: 'enterprise.address.zipcode' } } %span.error{ ng: { show: "details.zipcode.$error.required && submitted" } } - {{'enterprise.registration.modal.steps.details.postcode_field_error' | t}} + = t(".postcode_field_error") .row .small-12.medium-4.large-4.columns .field - %label{ for: 'enterprise_state' } {{'enterprise.registration.modal.steps.details.state_field' | t}} + %label{ for: 'enterprise_state' }= t(".state_field") %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" } } - {{'enterprise.registration.modal.steps.details.state_field_error' | t}} + = t(".state_field_error") .small-12.medium-8.large-8.columns .field - %label{ for: 'enterprise_country' } {{'enterprise.registration.modal.steps.details.country_field' | t}} + %label{ for: 'enterprise_country' }= t(".country_field") %select.chunky{ id: 'enterprise_country', name: 'country', required: true, ng: { init: "setDefaultCountry(#{Spree::Config[:default_country_id]})", model: 'enterprise.country', options: 'c as c.name for c in countries' } } %span.error{ ng: { show: "details.country.$error.required && submitted" } } - {{'enterprise.registration.modal.steps.details.country_field_error' | t}} - + = t(".country_field_error") .row.buttons .small-12.columns diff --git a/app/views/registration/steps/_finished.html.haml b/app/views/registration/steps/_finished.html.haml index 96ed600147..d22384dbdb 100644 --- a/app/views/registration/steps/_finished.html.haml +++ b/app/views/registration/steps/_finished.html.haml @@ -3,10 +3,10 @@ .row .small-12.columns.pad-top %header - %h2 {{'registration_finished_headline' | t}} + %h2= t(".headline") .panel.callout - %p{ "ng-bind" => "'registration_finished_thanks' | t:{enterprise: enterprise.name}" } - %p {{'registration_finished_login' | t}} + %p{ "ng-bind" => "'registration.steps.finished.thanks' | t:{enterprise: enterprise.name}" } + %p= t(".login") .row .small-12.columns.text-center - %a.button.primary{ type: "button", href: "/" } {{'registration_finished_action' | t}} > + %a.button.primary{ type: "button", href: "/" }= "#{t(".action")} >" diff --git a/app/views/registration/steps/_introduction.html.haml b/app/views/registration/steps/_introduction.html.haml index f973ca055a..84bbb9840e 100644 --- a/app/views/registration/steps/_introduction.html.haml +++ b/app/views/registration/steps/_introduction.html.haml @@ -2,35 +2,35 @@ .row .small-12.columns %header - %h2 {{'registration_greeting' | t}} + %h2= t(".registration_greeting") %h4 %small %i.ofn-i_040-hub - {{'registration_intro' | t}} + = t(".registration_intro") .row{ 'data-equalizer' => true } .small-12.medium-12.large-6.columns.pad-top{ 'data-equalizer-watch' => true } - %h5 {{'registration_checklist' | t}}: + %h5= t(".registration_checklist")+":" %ul.check-list %li - {{'registration_time' | t}} + = t(".registration_time") %li - {{'registration_enterprise_address' | t}} + = t(".registration_enterprise_address") %li - {{'registration_contact_details' | t}} + = t(".registration_contact_details") %li - {{'registration_logo' | t}} + = t(".registration_logo") %li - {{'registration_promo_image' | t}} + = t(".registration_promo_image") %li - {{'registration_about_us' | t}} + = t(".registration_about_us") .small-9.medium-8.large-5.columns.pad-top.end{ 'data-equalizer-watch' => true} %h5 - {{'registration_outcome_headline' | t}} - %p{ "ng-bind-html" => "t('registration_outcome1_html')" } - %p {{'registration_outcome2' | t}} - %p {{'registration_outcome3' | t}} + = t(".registration_outcome_headline") + %p= t(".registration_outcome1_html") + %p= t(".registration_outcome2") + %p= t(".registration_outcome3") .row{'ng-init' => "tos_required=#{Spree::Config.enterprises_require_tos}" } %hr @@ -43,4 +43,4 @@ %label{for: "accept_terms"} #{t(:enterprise_tos_agree)} .small-12.medium-6.columns - %input.button.primary.left{ type: "button", value: "{{'registration_action' | t}}", ng: { click: "select('details')", disabled: "tos_required && !tos_accepted", model: "tos_accepted"} } + %input.button.primary.left{ type: "button", value: "{{'registration.steps.introduction.registration_action' | t}}", ng: { click: "select('details')", disabled: "tos_required && !tos_accepted", model: "tos_accepted"} } diff --git a/app/views/registration/steps/_limit_reached.html.haml b/app/views/registration/steps/_limit_reached.html.haml index 44f3b53f22..c8fa25a43c 100644 --- a/app/views/registration/steps/_limit_reached.html.haml +++ b/app/views/registration/steps/_limit_reached.html.haml @@ -2,16 +2,16 @@ .row .small-12.columns %header - %h2 {{'limit_reached_headline' | t}} - %h4 {{'limit_reached_message' | t}} + %h2= t(".headline") + %h4= t(".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 - {{'limit_reached_text' | t}} + = t(".text") %strong Open Food Network. .row .small-12.columns %hr - %input.button.primary{ type: "button", value: "{{'limit_reached_action' | t}}", ng: { click: "close()" } } + %input.button.primary{ type: "button", value: "{{'registration.steps.limit_reached.action' | t}}", ng: { click: "close()" } } diff --git a/app/views/registration/steps/_logo.html.haml b/app/views/registration/steps/_logo.html.haml index 3d1effdf93..677653b4bb 100644 --- a/app/views/registration/steps/_logo.html.haml +++ b/app/views/registration/steps/_logo.html.haml @@ -5,42 +5,42 @@ .row .small-12.columns.center %h4 - {{'select_logo' | t}} + = t(".select_logo") .row .small-12.columns.center %span.small - {{'logo_tip' | t}} + = t(".logo_tip") .row.pad-top .small-12.columns .image-select.small-12.columns - %label.small-12.columns.button{ for: 'image-select' } {{'logo_label' | t}} + %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 - {{'action_or' | t}} + = t("action_or") .row.show-for-large-up .large-12.columns #image-over{ 'nv-file-over' => true, uploader: "imageUploader" } - {{'logo_drag' | t}} + = t(".logo_drag") .small-12.medium-12.large-6.columns .row .small-12.columns.center .row .small-12.columns.center %h4 - {{'review_logo' | t}} + = t(".review_logo") .row .small-12.columns.center %span.small - {{'review_logo_tip' | t}} + = 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" } } - {{'logo_placeholder' | t}} + = t(".logo_placeholder") .loading{ ng: { hide: "!imageUploader.isUploading" } } %img.spinner{ src: "/assets/spinning-circles.svg" } %br/ - {{'uploading' | t}} + = t("registration.steps.images.uploading") diff --git a/app/views/registration/steps/_promo.html.haml b/app/views/registration/steps/_promo.html.haml index 0b224e1f64..91a8bc9a78 100644 --- a/app/views/registration/steps/_promo.html.haml +++ b/app/views/registration/steps/_promo.html.haml @@ -3,42 +3,42 @@ .row .small-12.columns.center %h4 - {{'select_promo_image' | t}} + = t(".select_promo_image") .row .small-12.medium-12.large-5.columns.center .row .small-12.columns.center %span.small - {{'promo_image_tip' | t}} + = t(".promo_image_tip") .row.pad-top .small-12.columns .image-select.small-12.columns - %label.small-12.columns.button{ for: 'image-select' } {{'promo_image_label' | t}} + %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 - {{'action_or' | t}} + = t("action_or") .large-5.columns #image-over{ 'nv-file-over' => true, uploader: "imageUploader" } - {{'promo_image_drag' | t}} + = t(".promo_image_drag") .small-12.medium-12.large-12.columns.pad-top .row .small-12.columns.center %h4 - {{'review_promo_image' | t}} + = t(".review_promo_image") .row .small-12.columns.center .row .small-12.columns.center %span.small - {{'review_promo_image_tip' | t}} + = 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" } } - {{'promo_image_placeholder' | t}} + = t(".promo_image_placeholder") .loading{ ng: { hide: "!imageUploader.isUploading" } } %img.spinner{ src: "/assets/spinning-circles.svg" } %br/ - {{'uploading' | t}} + = t("registration.steps.images.uploading") diff --git a/app/views/registration/steps/_social.html.haml b/app/views/registration/steps/_social.html.haml index edbdd94dd9..8552b927b7 100644 --- a/app/views/registration/steps/_social.html.haml +++ b/app/views/registration/steps/_social.html.haml @@ -5,8 +5,8 @@ .row .small-12.columns %header - %h2 {{'enterprise_final_step' | t}} - %h5{ "ng-bind" => "'enterprise_social_text' | t:{enterprise: enterprise.name}" } + %h2= t(".enterprise_final_step") + %h5{ "ng-bind" => "'registration.steps.social.enterprise_social_text' | t:{enterprise: enterprise.name}" } %form{ name: 'social', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "update('finished',social)" } } .row.content @@ -14,29 +14,29 @@ .row .small-12.columns .field - %label{ for: 'enterprise_website' } {{'website' | t}}: - %input.chunky{ id: 'enterprise_website', placeholder: "{{'website_placeholder' | t}}", ng: { model: 'enterprise.website' } } + %label{ for: 'enterprise_website' }= t(".website")+":" + %input.chunky{ id: 'enterprise_website', placeholder: "{{'registration.steps.social.website_placeholder' | t}}", ng: { model: 'enterprise.website' } } .row .small-12.columns .field - %label{ for: 'enterprise_facebook' } {{'facebook' | t}}: - %input.chunky{ id: 'enterprise_facebook', placeholder: "{{'facebook_placeholder' | t}}", ng: { model: 'enterprise.facebook' } } + %label{ for: 'enterprise_facebook' }= t(".facebook")+":" + %input.chunky{ id: 'enterprise_facebook', placeholder: "{{'registration.steps.social.facebook_placeholder' | t}}", ng: { model: 'enterprise.facebook' } } .row .small-12.columns .field - %label{ for: 'enterprise_linkedin' } {{'linkedin' | t}}: - %input.chunky{ id: 'enterprise_linkedin', placeholder: "{{'linkedin_placeholder' | t}}", ng: { model: 'enterprise.linkedin' } } + %label{ for: 'enterprise_linkedin' }= t(".linkedin")+":" + %input.chunky{ id: 'enterprise_linkedin', placeholder: "{{'registration.steps.social.linkedin_placeholder' | t}}", ng: { model: 'enterprise.linkedin' } } .small-12.large-5.columns .row .small-12.columns .field - %label{ for: 'enterprise_twitter' } {{'twitter' | t}}: - %input.chunky{ id: 'enterprise_twitter', placeholder: "{{'twitter_placeholder' | t}}", ng: { model: 'enterprise.twitter' } } + %label{ for: 'enterprise_twitter' }= t(".twitter")+":" + %input.chunky{ id: 'enterprise_twitter', placeholder: "{{'registration.steps.social.twitter_placeholder' | t}}", ng: { model: 'enterprise.twitter' } } .row .small-12.columns .field - %label{ for: 'enterprise_instagram' } {{'instagram' | t}}: - %input.chunky{ id: 'enterprise_instagram', placeholder: "{{'instagram_placeholder' | t}}", ng: { model: 'enterprise.instagram' } } + %label{ for: 'enterprise_instagram' }= t(".instagram")+":" + %input.chunky{ id: 'enterprise_instagram', placeholder: "{{'registration.steps.social.instagram_placeholder' | t}}", ng: { model: 'enterprise.instagram' } } .row.buttons .small-12.columns diff --git a/app/views/registration/steps/_steps.html.haml b/app/views/registration/steps/_steps.html.haml index 3538d5ff48..081cd97d98 100644 --- a/app/views/registration/steps/_steps.html.haml +++ b/app/views/registration/steps/_steps.html.haml @@ -1,5 +1,5 @@ %script{ type: "text/ng-template", id: "registration/steps.html" } .row#progress-bar .small-12.medium-2.columns.item{ ng: { repeat: 'step in steps', class: "{active: (currentStep() == step),'show-for-medium-up': (currentStep() != step)}" } } - {{ $index+1 + ". " + ('enterprise.registration.modal.steps.' + step + '.title' | t) }} + {{ $index+1 + ". " + ('registration.steps.' + step + '.title' | t) }} diff --git a/config/initializers/bugsnag.rb b/config/initializers/bugsnag.rb new file mode 100644 index 0000000000..89da91d9e0 --- /dev/null +++ b/config/initializers/bugsnag.rb @@ -0,0 +1,5 @@ +Bugsnag.configure do |config| + config.api_key = ENV['BUGSNAG_API_KEY'] + config.notify_release_stages = %w(production staging) + config.use_ssl = true +end diff --git a/config/locales/ca.yml b/config/locales/ca.yml index f340592af3..b47a8890bb 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -31,6 +31,16 @@ ca: on_demand_but_count_on_hand_set: "ha d'estar en blanc si és sota demanda" limited_stock_but_no_count_on_hand: "cal especificar-se perquè força existències limitades" activemodel: + attributes: + order_management/reports/enterprise_fee_summary/parameters: + start_at: "Començar" + end_at: "Acabar" + distributor_ids: "Grups" + producer_ids: "Productors" + order_cycle_ids: "Cicles de comanda" + enterprise_fee_ids: "Noms de les comissions" + shipping_method_ids: "Mètodes d'enviament" + payment_method_ids: "Mètodes de Pagament" errors: models: subscription_validator: @@ -74,6 +84,13 @@ ca: models: order_cycle: cloned_order_cycle_name: "CÒPIA DE %{order_cycle}" + validators: + date_time_string_validator: + not_string_error: "ha de ser una seqüència" + invalid_format_error: "ha de ser vàlid" + integer_array_validator: + not_array_error: "ha de ser una matriu" + invalid_element_error: "ha de contenir només nombres enters vàlids" enterprise_mailer: confirmation_instructions: subject: "Sisplau, confirma l'adreça electrònica d'%{enterprise}" @@ -318,7 +335,7 @@ ca: business_model_configuration: edit: business_model_configuration: "Model de sostenibilitat" - business_model_configuration_tip: "Configureu la tarifa què es cobrarà a les botigues cada mes per utilitzar la Xarxa Open Food." + business_model_configuration_tip: "Configureu la tarifa què es cobrarà a les botigues cada mes per utilitzar Open Food Network." bill_calculation_settings: "Configuració del càlcul de ticket" bill_calculation_settings_tip: "Ajusteu la quantitat que es facturarà a les organitzacions cada mes per utilitzar l'OFN." shop_trial_length: "Durada de la prova de la botiga (dies)" @@ -418,9 +435,9 @@ ca: user_guide: Guia de l'usuari enterprise_fees: index: - title: Tarifes de l'organització + title: Comissions de l'organització enterprise: Organització - fee_type: Tipus de tarifa + fee_type: Tipus de comissió name: Nom tax_category: Categoria d'impostos calculator: Calculadora @@ -634,8 +651,8 @@ ca: website_placeholder: 'p. ex.: www.hortajosepribes.com' enterprise_fees: name: Nom - fee_type: Tipus de tarifa - manage_fees: Gestioneu les tarifes de l'organització + fee_type: Tipus de comissió + manage_fees: Gestioneu les comissions de l'organització no_fees_yet: Encara no tens cap tipus de comissió de l'organització create_button: Crea'n una ara images: @@ -737,7 +754,7 @@ ca: title: Connectar amb Stripe part1: Stripe és un servei de processament de pagaments que permet que les botigues de l'OFN acceptin els pagaments amb targeta de crèdit de les consumidores. part2: Per utilitzar aquesta funció heu de connectar el vostre compte Stripe a l'OFN. Si feu clic a "Accepto", us redirigirem al lloc web de Stripe on podeu connectar un compte Stripe existent o bé crear-ne un si encara no en teniu cap. - part3: Això permetrà que Open Food Network accepti pagaments amb targeta de crèdit de consumidores en nom vostre. Tingueu en compte que haureu de mantenir el vostre propi compte de Stripe, pagar-ne les tarifes i mantenir el servei a les consumidores pel teu compte. + part3: Això permetrà que Open Food Network accepti pagaments amb targeta de crèdit de consumidores en nom vostre. Tingueu en compte que haureu de mantenir el vostre propi compte de Stripe, pagar-ne les comissions i mantenir el servei a les consumidores pel teu compte. i_agree: Accepto cancel: Cancel·lar tag_rules: @@ -775,7 +792,7 @@ ca: payment_methods_tip: Aquesta organització no té mètodes de pagament shipping_methods: Mètodes d'enviament shipping_methods_tip: 'Aquesta organització té mètodes d''enviament ' - enterprise_fees: Honoraris de l'organització + enterprise_fees: Comissions de l'organització enterprise_fees_tip: Aquesta organització no té comissions admin_index: name: Nom @@ -873,7 +890,7 @@ ca: incoming: Entrant supplier: Proveïdora receival_details: Detalls de recepció - fees: Tarifes + fees: Comissions outgoing: Sortint distributor: Distribuïdora products: Productes @@ -911,7 +928,7 @@ ca: customer_instructions: Instruccions de la consumidora customer_instructions_placeholder: Notes de recollida o de lliurament products: Productes - fees: Tarifes + fees: Comissions destroy_errors: orders_present: Una consumidora ha seleccionat aquest Cicle de Comanda i no es pot esborrar. Per evitar que les consumidores hi accedeixin, tanqueu-lo. schedule_present: Aquest cicle de comanda està vinculat a una programació i no es pot esborrar. Desenllaça o suprimeix primer la programació. @@ -996,6 +1013,9 @@ ca: description: Factures per a la importació a Xero packing: name: Informes d'embalatge + enterprise_fee_summary: + name: "Resum de les comissions de l'organització" + description: "Resum de les comissions de l'organització recollides" subscriptions: subscriptions: Subscripcions new: Nova subscripció @@ -1883,7 +1903,7 @@ ca: shipping_method_destroy_error: "Aquest mètode d'enviament no es pot esborrar perquè s'hi fa referència en una comanda: %{number}." accounts_and_billing_task_already_running_error: "Ja s'està executant una tasca, espera fins que hagi acabat" accounts_and_billing_start_task_notice: "Tasca en cua" - fees: "Tarifes" + fees: "Comissions" item_cost: "Cost de l'article" bulk: "A granel" shop_variant_quantity_min: "min" @@ -1955,7 +1975,7 @@ ca: process_my_order: "Processa la meva comanda" delivery_instructions: Instruccions de lliurament delivery_method: Mètode de lliurament - fee_type: "Tipus de tarifa" + fee_type: "Tipus de comissió" tax_category: "Categoria d'impostos" calculator: "Calculadora" calculator_values: "Valors de la calculadora" @@ -2000,7 +2020,6 @@ ca: spree_admin_enterprises_none_text: "Encara no tens cap organització" spree_admin_enterprises_tabs_hubs: "GRUPS" spree_admin_enterprises_producers_manage_products: "GESTIONA ELS PRODUCTES" - spree_admin_enterprises_any_active_products_text: "No tens cap producte actiu." spree_admin_enterprises_create_new_product: "CREA UN NOU PRODUCTE" spree_admin_single_enterprise_alert_mail_confirmation: "Si us plau confirma l'adreça de correu electrònic de" spree_admin_single_enterprise_alert_mail_sent: "Hem enviat un correu electrònic a" @@ -2127,7 +2146,7 @@ ca: report_header_sales_tax: "Impost sobre vendes (%{currency_symbol})" report_header_delivery_charge: "Càrrec de lliurament (%{currency_symbol})" report_header_tax_on_delivery: "Impost sobre el lliurament (%{currency_symbol})" - report_header_tax_on_fees: "Impost sobre les tarifes (%{currency_symbol})" + report_header_tax_on_fees: "Impost sobre les comissions (%{currency_symbol})" report_header_total_tax: "Impost total (%{currency_symbol})" report_header_enterprise: Organització report_header_customer: Consumidora @@ -2248,7 +2267,7 @@ ca: shipping: "Enviament" shipping_methods: "Mètodes d'enviament" payment_methods: "Mètodes de Pagament" - payment_method_fee: "Tarifa de transacció" + payment_method_fee: "Comissió de transacció" inventory_settings: "Configuració de l'inventari" tag_rules: "Regles d'etiqueta" shop_preferences: "Preferències de la botiga" @@ -2526,6 +2545,45 @@ ca: producers: signup: start_free_profile: "Comença amb un perfil gratuït i amplia'l quan estiguis preparada." + order_management: + reports: + enterprise_fee_summary: + date_end_before_start_error: "ha de ser després de l'inici" + parameter_not_allowed_error: "No esteu autoritzats a utilitzar un o més filtres seleccionats per a aquest informe." + fee_calculated_on_transfer_through_all: "Tots" + fee_calculated_on_transfer_through_entire_orders: "Comandes completades a través de" + tax_category_various: "Varis" + fee_type: + payment_method: "Transacció de pagament" + shipping_method: "Enviament" + fee_placements: + supplier: "Entrant" + distributor: "Sortint" + coordinator: "Coordinador" + tax_category_name: + shipping_instance_rate: "Tarifa de la plataforma" + formats: + csv: + header: + fee_type: "Tipus de comissió" + enterprise_name: "Propietària de l'organització" + fee_name: "Nom de la comissió" + customer_name: "Consumidora" + fee_placement: "Col·locació de comissions" + fee_calculated_on_transfer_through_name: "Càlcul de comissions a través de transferència" + tax_category_name: "Categoria d'impostos" + total_amount: "€€ SUM" + html: + header: + fee_type: "Tipus de comissió" + enterprise_name: "Propietària de l'organització" + fee_name: "Nom de la comissió" + customer_name: "Consumidora" + fee_placement: "Col·locació de comissions" + fee_calculated_on_transfer_through_name: "Càlcul de comissions a través de transferència" + tax_category_name: "Categoria d'impostos" + total_amount: "€€ SUM" + invalid_filter_parameters: "Els filtres que heu seleccionat per a aquest informe no són vàlids." spree: email: Correu electrònic account_updated: "Compte actualitzat!" @@ -2569,6 +2627,11 @@ ca: distributor: "Distribuïdora:" order_cycle: "Cicle de comanda:" overview: + products: + active_products: + zero: "No tens cap producte actiu." + one: "Teniu un producte actiu" + other: "Teniu %{count} productes actius" order_cycles: order_cycles: "Cicles de comanda" order_cycles_tip: "Els cicles de comanda determinen quan i on els teus productes estan disponibles per a les consumidores." @@ -2642,6 +2705,14 @@ ca: bulk_coop_allocation: 'Compra grupal - Assignació' bulk_coop_packing_sheets: 'Compra grupal - Fulls de preparació de cistelles' bulk_coop_customer_payments: 'Compra grupal - Pagaments de les consumidores' + enterprise_fee_summaries: + filters: + date_range: "Interval de dates" + report_format_csv: "Descarrega com a CSV" + generate_report: "Generar informe" + report: + none: "No productora" + select_and_search: "Seleccioneu els filtres i feu clic a GENERAR INFORME per accedir a les dades." users: index: listing_users: "Llistat d'usuàries" diff --git a/config/locales/en.yml b/config/locales/en.yml index 688f3cdc63..c8cfc72e01 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1872,24 +1872,60 @@ See the %{link} to find out more about %{sitename}'s features and to start using 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}?" update_and_recalculate_fees: "Update And Recalculate Fees" registration: steps: - images: - continue: "Continue" - back: "Back" - headline: "Thanks!" - description: "Let's upload some pretty pictures so your profile looks great! :)" + introduction: + registration_greeting: "Hi there!" + registration_intro: "You can now create a profile for your Producer or Hub" + 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_action: "Let's get started!" + details: + title: "Details" + headline: "Let's Get Started" + enterprise: "Woot! First need to know a little bit about your enterprise:" + producer: "Woot! First we need to know a little bit about your farm:" + enterprise_name_field: "Enterprise Name:" + producer_name_field: "Farm Name:" + producer_name_field_placeholder: "e.g. Charlie's Awesome Farm" + producer_name_field_error: "Please choose a unique name for your enterprise" + address1_field: "Address line 1:" + address1_field_placeholder: "e.g. 123 Cranberry Drive" + address1_field_error: "Please enter an address" + address2_field: "Address line 2:" + suburb_field: "Suburb:" + suburb_field_placeholder: "e.g. Northcote" + suburb_field_error: "Please enter a suburb" + postcode_field: "Postcode:" + postcode_field_placeholder: "e.g. 3070" + postcode_field_error: "Postcode required" + state_field: "State:" + state_field_error: "State required" + country_field: "Country:" + country_field_error: "Please select a country" + contact: + title: "Contact" + who_is_managing_enterprise: "Who is responsible for managing %{enterprise}?" + contact_field: "Primary Contact" + contact_field_placeholder: "Contact Name" + contact_field_required: "You need to enter a primary contact." + phone_field: "Phone number" + phone_field_placeholder: "eg. (03) 1234 5678" type: + title: "Type" headline: "Last step to add %{enterprise}!" question: "Are you a producer?" yes_producer: "Yes, I'm a producer" @@ -1898,161 +1934,75 @@ See the %{link} to find out more about %{sitename}'s features and to start using yes_producer_help: "Producers make yummy things to eat and/or drink. You're a producer if you grow it, raise it, brew it, bake it, ferment it, milk it or mould it." 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" - enterprise: - registration: - modal: - steps: - details: - title: 'Details' - headline: "Let's Get Started" - enterprise: "Woot! First we need to know a little bit about your enterprise:" - producer: "Woot! First we need to know a little bit about your farm:" - enterprise_name_field: "Enterprise Name:" - producer_name_field: "Farm Name:" - producer_name_field_placeholder: "e.g. Charlie's Awesome Farm" - producer_name_field_error: "Please choose a unique name for your enterprise" - address1_field: "Address line 1:" - address1_field_placeholder: "e.g. 123 Cranberry Drive" - address1_field_error: "Please enter an address" - address2_field: "Address line 2:" - suburb_field: "Suburb:" - suburb_field_placeholder: "e.g. Northcote" - suburb_field_error: "Please enter a suburb" - postcode_field: "Postcode:" - postcode_field_placeholder: "e.g. 3070" - postcode_field_error: "Postcode required" - state_field: "State:" - state_field_error: "State required" - country_field: "Country:" - country_field_error: "Please select a country" - contact: - title: 'Contact' - contact_field: 'Primary Contact' - contact_field_placeholder: 'Contact Name' - contact_field_required: "You need to enter a primary contact." - email_field: 'Email address' - email_field_placeholder: 'eg. charlie@thefarm.com' - phone_field: 'Phone number' - phone_field_placeholder: 'eg. (03) 1234 5678' - type: - title: 'Type' - about: - title: 'About' - images: - title: 'Images' - social: - title: 'Social' - # TODO: Remove these once the enterprise.registration.modal keys are translated - enterprise_contact: "Primary Contact" - enterprise_contact_placeholder: "Contact Name" - enterprise_contact_required: "You need to enter a primary contact." - enterprise_email_address: "Email address" - enterprise_email_placeholder: "eg. charlie@thefarm.com" - enterprise_phone: "Phone number" - enterprise_phone_placeholder: "eg. (03) 1234 5678" - # END + about: + title: "About" + headline: "Nice one!" + message: "Now let's flesh out the details about" + success: "Success! %{enterprise} added to the Open Food Network" + registration_exit_message: "If you exit this wizard at any stage, you can continue to create your profile by going to the admin interface." + 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" + enterprise_tax_required: "You need to make a selection." + images: + title: "Images" + headline: "Thanks!" + description: "Let's upload some pretty pictures so your profile looks great! :)" + uploading: "Uploading..." + continue: "Continue" + back: "Back" + logo: + 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" + promo: + 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" + 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" + social: + title: "Social" + 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" + limit_reached: + headline: "Oh no!" + message: "You have reached the limit!" + text: "You have reached the limit for the number of enterprises you are allowed to own on the" + action: "Return to the homepage" + finished: + headline: "Finished!" + thanks: "Thanks for filling out the details for %{enterprise}." + login: "You can change or update your enterprise at any stage by logging into Open Food Network and going to Admin." + action: "Open Food Network home" + 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 can continue to create your profile by going to the admin interface." - 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" - 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_action: "Open Food Network home" - registration_contact_name: 'Contact Name' + enterprise_limit: Enterprise Limit - # TODO: Remove these once the enterprise.registration.modal keys are translated - 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 and/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." - # END - - - # TODO: Remove these once the enterprise.registration.modal keys are translated - 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" - # END shipping_method_destroy_error: "That shipping method cannot be deleted as it is referenced by an order: %{number}." accounts_and_billing_task_already_running_error: "A task is already running, please wait until it has finished" accounts_and_billing_start_task_notice: "Task Queued" @@ -2734,6 +2684,12 @@ See the %{link} to find out more about %{sitename}'s features and to start using spree: users: order: "Order" + registration: + 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." + producers: signup: start_free_profile: "Start with a free profile, and expand when you're ready!" diff --git a/config/locales/es.yml b/config/locales/es.yml index 73bddfe067..fcd2d21ff7 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -31,6 +31,16 @@ es: on_demand_but_count_on_hand_set: "debe estar en blanco si está bajo demanda" limited_stock_but_no_count_on_hand: "se debe especificar porque se ha definido estoc limitado" activemodel: + attributes: + order_management/reports/enterprise_fee_summary/parameters: + start_at: "Inicio" + end_at: "Final" + distributor_ids: "Hubs" + producer_ids: "Productoras" + order_cycle_ids: "Ciclos de Pedido" + enterprise_fee_ids: "Nombres de las comisiones" + shipping_method_ids: "Métodos de envío" + payment_method_ids: "Métodos de Pago" errors: models: subscription_validator: @@ -74,6 +84,13 @@ es: models: order_cycle: cloned_order_cycle_name: "COPIA DE %{order_cycle}" + validators: + date_time_string_validator: + not_string_error: "debe ser una cadena" + invalid_format_error: "debe ser válido" + integer_array_validator: + not_array_error: "debe ser una matriz" + invalid_element_error: "debe contener solo enteros válidos" enterprise_mailer: confirmation_instructions: subject: "Confirma la dirección de correo electrónico de %{enterprise}" @@ -851,7 +868,7 @@ es: pickup_instructions_tip: Estas instrucciones se muestran a las consumidoras después de completar un pedido. pickup_time_placeholder: "Listo para ( Fecha / Hora)" receival_instructions_placeholder: "Instrucciones de recepción" - add_fee: 'Añadir tarifa' + add_fee: 'Añadir comisión' selected: 'seleccionado' add_exchange_form: add_supplier: 'Añadir proveedora' @@ -868,7 +885,7 @@ es: search_by_order_cycle_name: "Buscar por nombre del Ciclo de Pedido..." involving: "Involucrando" any_enterprise: "Cualquier organización" - any_schedule: "Cualquier horario" + any_schedule: "Cualquier programación" form: incoming: Entrante supplier: Proveedora @@ -882,19 +899,19 @@ es: delivery_details: Detalles de Recogida / Entrega debug_info: Información de Debug index: - schedule: Horario - schedules: Horarios - adding_a_new_schedule: Agregar un nuevo horario - updating_a_schedule: Actualización de un horario - new_schedule: Nuevo horario - create_schedule: Crear horario - update_schedule: Actualizar horario - delete_schedule: Eliminar horario - created_schedule: Horario creado - updated_schedule: Horario actualizado - deleted_schedule: Horario eliminado - schedule_name_placeholder: Nombre del horario - name_required_error: Por favor ingrese un nombre para este horario + schedule: Programación + schedules: Programación + adding_a_new_schedule: Agregar una nueva programación + updating_a_schedule: Actualización de una programación + new_schedule: Nueva programación + create_schedule: Crear programación + update_schedule: Actualizar programación + delete_schedule: Eliminar programación + created_schedule: Programación creada + updated_schedule: Programación actualizada + deleted_schedule: Programación eliminada + schedule_name_placeholder: Nombre de la programación + name_required_error: Por favor ingrese un nombre para esta programación no_order_cycles_error: Seleccione al menos un ciclo de pedido (arrastrar y soltar) name_and_timing_form: name: Nombre @@ -914,7 +931,7 @@ es: fees: Comisiones destroy_errors: orders_present: Ese ciclo de pedido ha sido seleccionado por un cliente y no puede ser eliminado. Para evitar que los clientes accedan a él, ciérrelo. - schedule_present: Ese ciclo de pedido está vinculado a un horario y no puede ser eliminado. Desvincula o elimina el calendario primero. + schedule_present: Ese ciclo de pedido está vinculado a una programación y no puede ser eliminado. Desvincula o elimina la programación primero. bulk_update: no_data: Hm, algo salió mal. No se encontraron datos de ciclo de pedido. date_warning: @@ -996,6 +1013,9 @@ es: description: Facturas para la importación en Xero packing: name: Informes de empaquetado + enterprise_fee_summary: + name: "Resumen de las comisiones de la organización" + description: "Resumen de las comisiones de la organización recolectadas" subscriptions: subscriptions: Suscripciones new: Nueva suscripción @@ -1014,10 +1034,10 @@ es: set_up_shipping_and_payment_methods_html: Configurar los métodos %{shipping_link} y %{payment_link} set_up_shipping_and_payment_methods_note_html: Tenga en cuenta que solo se pueden usar