diff --git a/app/assets/javascripts/templates/admin/info_dialog.html.haml b/app/assets/javascripts/templates/admin/info_dialog.html.haml index 2755715e46..3271e3ad85 100644 --- a/app/assets/javascripts/templates/admin/info_dialog.html.haml +++ b/app/assets/javascripts/templates/admin/info_dialog.html.haml @@ -6,4 +6,4 @@ {{ message }} .action-buttons.text-center %button{ ng: { click: "close()" } } - OK + = t(:ok) diff --git a/app/assets/javascripts/templates/admin/panels/exchange_supplied_products.html.haml b/app/assets/javascripts/templates/admin/panels/exchange_supplied_products.html.haml index 04e191fcf0..cc5900c0dd 100644 --- a/app/assets/javascripts/templates/admin/panels/exchange_supplied_products.html.haml +++ b/app/assets/javascripts/templates/admin/panels/exchange_supplied_products.html.haml @@ -7,7 +7,7 @@ 'ng-model' => 'exchange.select_all_variants', 'ng-change' => 'setExchangeVariants(exchange, suppliedVariants(exchange.enterprise_id), exchange.select_all_variants)', 'id' => 'order_cycle_incoming_exchange_{{ $index }}_select_all_variants' } - Select all + = t('admin.select_all') .exchange-products -# No need to scope product list based on permissions, because if an incoming exchange is visible, @@ -36,7 +36,7 @@ 'ofn-sync-distributions' => '{{ product.master_id }}', 'id' => 'order_cycle_incoming_exchange_{{ $parent.$index }}_variants_{{ product.master_id }}', 'ng-disabled' => '!order_cycle.editable_variants_for_incoming_exchanges.hasOwnProperty(exchange.enterprise_id) || order_cycle.editable_variants_for_incoming_exchanges[exchange.enterprise_id].indexOf(product.master_id) < 0' } - Obsolete master + = t('admin.obsolete_master') .exchange-product-variant{'ng-repeat' => 'variant in product.variants'} %label diff --git a/app/assets/javascripts/templates/admin/panels/exchange_tags.html.haml b/app/assets/javascripts/templates/admin/panels/exchange_tags.html.haml index 0963c480c0..6b2392010f 100644 --- a/app/assets/javascripts/templates/admin/panels/exchange_tags.html.haml +++ b/app/assets/javascripts/templates/admin/panels/exchange_tags.html.haml @@ -1,5 +1,6 @@ .row.exchange-tags .sixteen.columns.alpha.omega - %span.text-normal Tags + %span.text-normal + = t('admin.tags') %br %tags-with-translation.fullwidth{ object: 'object' } diff --git a/app/assets/javascripts/templates/admin/tag_rules/filter_order_cycles_input.html.haml b/app/assets/javascripts/templates/admin/tag_rules/filter_order_cycles_input.html.haml index fd8dac63c7..87eddb331e 100644 --- a/app/assets/javascripts/templates/admin/tag_rules/filter_order_cycles_input.html.haml +++ b/app/assets/javascripts/templates/admin/tag_rules/filter_order_cycles_input.html.haml @@ -7,4 +7,5 @@ id: "enterprise_tag_rules_attributes_{{tagGroup.startIndex + $index}}_preferred_matched_order_cycles_visibility", name: "enterprise[tag_rules_attributes][{{tagGroup.startIndex + $index}}][preferred_matched_order_cycles_visibility]", ng: { value: "'hidden'", if: "rule.is_default" } } - %span.text-normal{ ng: { if: "rule.is_default" } } not visible + %span.text-normal{ ng: { if: "rule.is_default" } } + =t(:not_visible) diff --git a/app/assets/javascripts/templates/admin/tag_rules/filter_payment_methods_input.html.haml b/app/assets/javascripts/templates/admin/tag_rules/filter_payment_methods_input.html.haml index 0dd533235d..8151feb677 100644 --- a/app/assets/javascripts/templates/admin/tag_rules/filter_payment_methods_input.html.haml +++ b/app/assets/javascripts/templates/admin/tag_rules/filter_payment_methods_input.html.haml @@ -7,4 +7,5 @@ id: "enterprise_tag_rules_attributes_{{tagGroup.startIndex + $index}}_preferred_matched_payment_methods_visibility", name: "enterprise[tag_rules_attributes][{{tagGroup.startIndex + $index}}][preferred_matched_payment_methods_visibility]", ng: { value: "'hidden'", if: "rule.is_default" } } - %span.text-normal{ ng: { if: "rule.is_default" } } not visible + %span.text-normal{ ng: { if: "rule.is_default" } } + = t(:not_visible) diff --git a/app/assets/javascripts/templates/admin/tag_rules/filter_products_input.html.haml b/app/assets/javascripts/templates/admin/tag_rules/filter_products_input.html.haml index da112c9db2..b30901791a 100644 --- a/app/assets/javascripts/templates/admin/tag_rules/filter_products_input.html.haml +++ b/app/assets/javascripts/templates/admin/tag_rules/filter_products_input.html.haml @@ -7,4 +7,5 @@ id: "enterprise_tag_rules_attributes_{{tagGroup.startIndex + $index}}_preferred_matched_variants_visibility", name: "enterprise[tag_rules_attributes][{{tagGroup.startIndex + $index}}][preferred_matched_variants_visibility]", ng: { value: "'hidden'", if: "rule.is_default" } } - %span.text-normal{ ng: { if: "rule.is_default" } } not visible + %span.text-normal{ ng: { if: "rule.is_default" } } + = t(:not_visible) diff --git a/app/assets/javascripts/templates/admin/tag_rules/filter_shipping_methods_input.html.haml b/app/assets/javascripts/templates/admin/tag_rules/filter_shipping_methods_input.html.haml index a46b9abd14..48cf29a732 100644 --- a/app/assets/javascripts/templates/admin/tag_rules/filter_shipping_methods_input.html.haml +++ b/app/assets/javascripts/templates/admin/tag_rules/filter_shipping_methods_input.html.haml @@ -7,4 +7,6 @@ id: "enterprise_tag_rules_attributes_{{tagGroup.startIndex + $index}}_preferred_matched_shipping_methods_visibility", name: "enterprise[tag_rules_attributes][{{tagGroup.startIndex + $index}}][preferred_matched_shipping_methods_visibility]", ng: { value: "'hidden'", if: "rule.is_default" } } - %span.text-normal{ ng: { if: "rule.is_default" } } not visible + %span.text-normal{ ng: { if: "rule.is_default" } } + = t(:not_visible) + diff --git a/app/assets/javascripts/templates/single_line_selectors.html.haml b/app/assets/javascripts/templates/single_line_selectors.html.haml index 0f5cdf0fa6..23beb084ce 100644 --- a/app/assets/javascripts/templates/single_line_selectors.html.haml +++ b/app/assets/javascripts/templates/single_line_selectors.html.haml @@ -5,7 +5,7 @@ %li.more %a.dropdown{ data: { dropdown: "{{ 'show-more-' + selectorName }}" }, ng: { class: "{active: selectedOverFlowSelectors().length > 0}" } } %span - + {{ overFlowSelectors().length }} more + + {{ overFlowSelectors().length }}= t(:more) %i.ofn-i_052-point-down .f-dropdown.text-right.content{ ng: { attr: { id: "{{ 'show-more-' + selectorName }}" } } } %ul diff --git a/app/views/admin/cache_settings/show.html.haml b/app/views/admin/cache_settings/show.html.haml index f2069f0e55..cecef216a3 100644 --- a/app/views/admin/cache_settings/show.html.haml +++ b/app/views/admin/cache_settings/show.html.haml @@ -13,6 +13,6 @@ %tr %td= result[:distributor].name %td= result[:order_cycle].name - %td= result[:status] ? 'OK' : 'Error' + %td= result[:status] ? t(:ok) : t('.error') %td %pre= result[:diff].to_s(:text) diff --git a/app/views/admin/enterprise_roles/_enterprise_role.html.haml b/app/views/admin/enterprise_roles/_enterprise_role.html.haml index 5e4986d599..0743e5be5a 100644 --- a/app/views/admin/enterprise_roles/_enterprise_role.html.haml +++ b/app/views/admin/enterprise_roles/_enterprise_role.html.haml @@ -1,5 +1,5 @@ %td {{ enterprise_role.user_email }} -%td manages +%td= t('admin.enterprise_roles.manages') %td {{ enterprise_role.enterprise_name }} %td.actions %a.delete-enterprise-role.icon-trash.no-text{'ng-click' => 'delete(enterprise_role)'} diff --git a/app/views/admin/order_cycles/_exchange_supplied_products_form.html.haml b/app/views/admin/order_cycles/_exchange_supplied_products_form.html.haml index 0fc5a7e760..22b563e107 100644 --- a/app/views/admin/order_cycles/_exchange_supplied_products_form.html.haml +++ b/app/views/admin/order_cycles/_exchange_supplied_products_form.html.haml @@ -3,7 +3,7 @@ .exchange-select-all-variants %label = check_box_tag 'order_cycle_incoming_exchange_{{ $parent.$index }}_select_all_variants', 1, 1, 'ng-model' => 'exchange.select_all_variants', 'ng-change' => 'setExchangeVariants(exchange, suppliedVariants(exchange.enterprise_id), exchange.select_all_variants)', 'id' => 'order_cycle_incoming_exchange_{{ $parent.$index }}_select_all_variants' - Select all + = t('admin.select_all') .exchange-products -# No need to scope product list based on permissions, because if an incoming exchange is visible, @@ -23,7 +23,7 @@ %label = check_box_tag 'order_cycle_incoming_exchange_{{ $parent.$index }}_variants_{{ product.master_id }}', 1, 1, 'ng-model' => 'exchange.variants[product.master_id]', 'ofn-sync-distributions' => '{{ product.master_id }}', 'id' => 'order_cycle_incoming_exchange_{{ $parent.$index }}_variants_{{ product.master_id }}', 'ng-disabled' => '!order_cycle.editable_variants_for_incoming_exchanges.hasOwnProperty(exchange.enterprise_id) || order_cycle.editable_variants_for_incoming_exchanges[exchange.enterprise_id].indexOf(product.master_id) < 0' - Obsolete master + = t('admin.obsolete_master') .exchange-product-variant{'ng-repeat' => 'variant in product.variants'} %label diff --git a/app/views/admin/order_cycles/_form.html.haml b/app/views/admin/order_cycles/_form.html.haml index f075c2cf33..7e58030f6d 100644 --- a/app/views/admin/order_cycles/_form.html.haml +++ b/app/views/admin/order_cycles/_form.html.haml @@ -37,7 +37,7 @@ %th{ ng: { if: 'enterprises[exchange.enterprise_id].managed || order_cycle.viewing_as_coordinator' } } = t('.tags') %th= t('.delivery_details') - %th Fees + %th= t('.fees') %th.actions %tbody.panel-ctrl{ object: 'exchange', 'ng-repeat' => 'exchange in order_cycle.outgoing_exchanges'} = render 'exchange_form', f: f, type: 'distributor' diff --git a/app/views/admin/variant_overrides/_controls.html.haml b/app/views/admin/variant_overrides/_controls.html.haml index 900f46e430..1f407a4b35 100644 --- a/app/views/admin/variant_overrides/_controls.html.haml +++ b/app/views/admin/variant_overrides/_controls.html.haml @@ -10,6 +10,6 @@ .four.columns.omega{ ng: { show: 'views.new.visible' } } %button.fullwidth{ type: 'button', ng: { click: "selectView('inventory')" } } %i.icon-chevron-left - Back to my inventory + = t('.back_to_my_inventory') .four.columns.omega{ng: { show: 'views.inventory.visible' } } %columns-dropdown{ action: "#{controller_name}_#{action_name}" } diff --git a/app/views/producer_mailer/order_cycle_report.text.haml b/app/views/producer_mailer/order_cycle_report.text.haml index b5b644bf01..1fd956a795 100644 --- a/app/views/producer_mailer/order_cycle_report.text.haml +++ b/app/views/producer_mailer/order_cycle_report.text.haml @@ -16,7 +16,7 @@ Orders summary #{line_items.first.variant.sku} - #{raw(line_items.first.product.supplier.name)} - #{raw(product_and_full_name)} (QTY: #{line_items.sum(&:quantity)}) @ #{line_items.first.single_money} = #{Spree::Money.new(line_items.sum(&:total), currency: line_items.first.currency)} \ \ -Total: #{@total} +#{t :total}: #{@total} \ = t :producer_mail_text_after diff --git a/app/views/spree/admin/orders/invoice.html.haml b/app/views/spree/admin/orders/invoice.html.haml index 627032fd39..7ae12f8e79 100644 --- a/app/views/spree/admin/orders/invoice.html.haml +++ b/app/views/spree/admin/orders/invoice.html.haml @@ -4,11 +4,11 @@ %tbody %tr{ valign: "top" } %td{ :align => "left", colspan: 3 } - %h6= "Issued on: #{Time.zone.now.strftime("%F")}" + %h6= "#{t('.issued_on')}: #{Time.zone.now.strftime("%F")}" %tr{ valign: "top" } %td{ :align => "left" } %h4 - = "TAX INVOICE: " + = "#{t('.tax_invoice')}: " = "#{@order.number}" %td{width: "10%" }   @@ -16,10 +16,10 @@ %h4= @order.order_cycle.andand.name %tr{ valign: "top" } %td{ :align => "left" } - %strong= "From: #{@order.distributor.name}" + %strong= "#{t('.from')}: #{@order.distributor.name}" - if @order.distributor.abn.present? %br - = "ABN: #{@order.distributor.abn}" + = "#{t(:abn)} #{@order.distributor.abn}" %br = @order.distributor.address.full_address %br @@ -27,10 +27,10 @@ %td{width: "10%" }   %td{ :align => "right" } - %strong= "To: #{@order.ship_address.full_name}" + %strong= "#{t('.to')}: #{@order.ship_address.full_name}" - if @order.customer.code.present? %br - = "Code: #{@order.customer.code}" + = "#{t('.code')}: #{@order.customer.code}" %br = @order.ship_address.full_address %br diff --git a/app/views/spree/admin/overview/_enterprises_header.html.haml b/app/views/spree/admin/overview/_enterprises_header.html.haml index 5b1979c4ce..d134d6f34f 100644 --- a/app/views/spree/admin/overview/_enterprises_header.html.haml +++ b/app/views/spree/admin/overview/_enterprises_header.html.haml @@ -6,5 +6,5 @@ %a.three.columns.omega.icon-plus.button.blue.white-bottom{ href: "#{main_app.new_admin_enterprise_path}" } = t "spree_admin_enterprises_create_new" - else - %a{ "ofn-with-tip" => "Enterprises are Producers and/or Hubs and are the basic unit of organisation within the Open Food Network." } + %a{ "ofn-with-tip" => t('.ofn_with_tip') } = t "admin_enterprise_groups_what_s_this" diff --git a/app/views/spree/admin/overview/_enterprises_hubs_tab.html.haml b/app/views/spree/admin/overview/_enterprises_hubs_tab.html.haml index 127da163d1..dbaff71cfa 100644 --- a/app/views/spree/admin/overview/_enterprises_hubs_tab.html.haml +++ b/app/views/spree/admin/overview/_enterprises_hubs_tab.html.haml @@ -22,7 +22,7 @@ - if payment_method_count > 0 %span.icon-ok-sign{ 'ofn-with-tip' => "#{pluralize payment_method_count, 'payment method'}" } - else - %span.icon-remove-sign{ 'ofn-with-tip' => "#{enterprise.name} has no payment methods" } + %span.icon-remove-sign{ 'ofn-with-tip' => t('.has_no_payment_methods', enterprise: enterprise.name) } - else   %span.symbol.three.columns.centered @@ -31,7 +31,7 @@ - if shipping_method_count > 0 %span.icon-ok-sign{ 'ofn-with-tip' => "#{pluralize shipping_method_count, 'shipping method'}" } - else - %span.icon-remove-sign{ 'ofn-with-tip' => "#{enterprise.name} has no shipping methods" } + %span.icon-remove-sign{ 'ofn-with-tip' => t('.has_no_shipping_methods', enterprise: enterprise.name) } - else   %span.symbol.three.columns.centered @@ -40,7 +40,7 @@ - if fee_count > 0 %span.icon-ok-sign{ 'ofn-with-tip' => "#{pluralize fee_count, 'fee'}" } - else - %span.icon-warning-sign{ 'ofn-with-tip' => "#{enterprise.name} has no enterprise fees" } + %span.icon-warning-sign{ 'ofn-with-tip' => t('.has_no_enterprise_fees', enterprise: enterprise.name) } - else   %span.two.columns.omega.right diff --git a/app/views/spree/admin/overview/_order_cycles.html.haml b/app/views/spree/admin/overview/_order_cycles.html.haml index 1a00bd5102..752a22febd 100644 --- a/app/views/spree/admin/overview/_order_cycles.html.haml +++ b/app/views/spree/admin/overview/_order_cycles.html.haml @@ -12,7 +12,7 @@ - if @order_cycle_count > 0 %div.seven.columns.alpha.list-item %span.six.columns.alpha - = "You have #{@order_cycle_count} active order cycle#{@order_cycle_count > 1 ? "s" : ""}." + = t('.you_have_active', num: @order_cycle_count, order_cycles: t('.order_cycle', count: @order_cycle_count)) %span.one.column.omega %span.icon-ok-sign %a.seven.columns.alpha.button.bottom.blue{ href: "#{main_app.admin_order_cycles_path}" } @@ -27,5 +27,5 @@ %a.seven.columns.alpha.button.bottom.orange{ href: "#{main_app.admin_order_cycles_path}" } = t "spree_admin_enterprises_producers_manage_order_cycles" %span.icon-arrow-right - MANAGE ORDER CYCLES + = t ".manage_order_cycles" %span.icon-arrow-right diff --git a/app/views/spree/admin/products/_distributors_form.html.haml b/app/views/spree/admin/products/_distributors_form.html.haml index d4b655dd59..5dc248d1e5 100644 --- a/app/views/spree/admin/products/_distributors_form.html.haml +++ b/app/views/spree/admin/products/_distributors_form.html.haml @@ -1,4 +1,4 @@ -%h2 Distributors +%h2= t(:distributors) = f.field_container :product_distributions do - f.object.build_product_distributions_for_user spree_current_user %table diff --git a/app/views/spree/admin/reports/bulk_coop.html.haml b/app/views/spree/admin/reports/bulk_coop.html.haml index 240f12cc81..71bd570658 100644 --- a/app/views/spree/admin/reports/bulk_coop.html.haml +++ b/app/views/spree/admin/reports/bulk_coop.html.haml @@ -3,9 +3,9 @@ .row .four.columns.alpha - = label_tag nil, "#{t(:distributor)}: " + = label_tag nil, t(:report_distributor) = f.collection_select(:distributor_id_eq, @distributors, :id, :name, {:include_blank => t(:all)}, {:class => "select2 fullwidth"}) - = label_tag nil, "#{t(:report_type)}: " + = label_tag nil, t(:report_type) %br = select_tag(:report_type, options_for_select([:bulk_coop_supplier_report, :bulk_coop_allocation, :bulk_coop_packing_sheets, :bulk_coop_customer_payments].map{ |e| [t(".#{e}"), e] }, @report_type)) %br diff --git a/config/locales/en.yml b/config/locales/en.yml index b848b72c37..e2b76d754d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -162,6 +162,8 @@ en: weight: Weight volume: Volume items: Items + select_all: Select all + obsolete_master: Obsolete master # General form elements quick_search: Quick Search @@ -264,6 +266,7 @@ en: order_cycle: Order Cycle status: Status diff: Diff + error: Error contents: edit: @@ -278,6 +281,8 @@ en: tax_category: Tax Category calculator: Calculator calculator_values: Calculator Values + enterprise_roles: + manages: manages enterprise_groups: index: @@ -325,7 +330,8 @@ en: inventory_powertip: This is your inventory of products. To add products to your inventory, select 'New Products' from the Viewing dropdown. hidden_powertip: These products have been hidden from your inventory and will not be available to add to your shop. You can click 'Add' to add a product to you inventory. new_powertip: These products are available to be added to your inventory. Click 'Add' to add a product to your inventory, or 'Hide' to hide it from view. You can always change your mind later! - + controls: + back_to_my_inventory: Back to my inventory orders: bulk_management: tip: "Use this page to alter product quantities across multiple orders. Products may also be removed from orders entirely, if required." @@ -347,7 +353,12 @@ en: max_fulfilled_units: "Max Fulfilled Units" order_error: "Some errors must be resolved before you can update orders.\nAny fields with red borders contain errors." variants_without_unit_value: "WARNING: Some variants do not have a unit value" - + invoice: + issued_on: Issued on + tax_invoice: TAX INVOICE + code: Code + from: From + to: To enterprise: select_outgoing_oc_products_from: Select outgoing OC products from @@ -603,7 +614,20 @@ en: title: Invoice Settings invoice_style2?: Use the alternative invoice model that includes total tax breakdown per rate and tax rate info per item (not yet suitable for countries displaying prices excluding tax) enable_receipt_printing?: Show options for printing receipts using thermal printers in order dropdown? - + overview: + enterprises_header: + ofn_with_tip: Enterprises are Producers and/or Hubs and are the basic unit of organisation within the Open Food Network. + enterprises_hubs_tabs: + has_no_payment_methods: "%{enterprise} has no payment methods" + has_no_shipping_methods: "%{enterprise} has no shipping methods" + has_no_enterprise_fees: "%{enterprise} has no enterprise fees" + order_cycles: + manage_order_cycles: MANAGE ORDER CYCLES + you_have_active: "You have %{num} active %{order_cycles}." + order_cycle: + zero: order cycle + one: order cycle + other: order cycles # Frontend views # # These keys are referenced relatively like `t('.message')` in @@ -1325,6 +1349,8 @@ Please follow the instructions there to make your enterprise visible on the Open credit: "Credit" Paid: "Paid" Ready: "Ready" + ok: OK + not_visible: not visible you_have_no_orders_yet: "You have no orders yet" running_balance: "Running balance" outstanding_balance: "Outstanding balance"