diff --git a/app/views/spree/admin/overview/_enterprises_footer.html.haml b/app/views/spree/admin/overview/_enterprises_footer.html.haml index c61add38f5..c704dfef64 100644 --- a/app/views/spree/admin/overview/_enterprises_footer.html.haml +++ b/app/views/spree/admin/overview/_enterprises_footer.html.haml @@ -1,3 +1,3 @@ %a.sixteen.columns.alpha.button.bottom.blue{ href: "#{main_app.admin_enterprises_path}" } - MANAGE MY ENTERPRISES + = t "spree_admin_overview_enterprises_footer" %span.icon-arrow-right diff --git a/app/views/spree/admin/overview/_enterprises_header.html.haml b/app/views/spree/admin/overview/_enterprises_header.html.haml index fcc7d269f2..6ed4ae8d65 100644 --- a/app/views/spree/admin/overview/_enterprises_header.html.haml +++ b/app/views/spree/admin/overview/_enterprises_header.html.haml @@ -1,8 +1,10 @@ %div.header.sixteen.columns.alpha{ :class => "#{@enterprises.count > 0 ? "" : "red"}"} - %h3.thirteen.columns.alpha My Enterprises + %h3.thirteen.columns.alpha + = t "spree_admin_overview_enterprises_header" - if @enterprises.any? - if spree_current_user.can_own_more_enterprises? %a.three.columns.omega.icon-plus.button.blue.white-bottom{ href: "#{main_app.new_admin_enterprise_path}" } - CREATE NEW + = t "spree_admin_enterprises_create_new" - else - %a.with-tip{ title: "Enterprises are Producers and/or Hubs and are the basic unit of organisation within the Open Food Network." } What's this? + %a.with-tip{ title: "Enterprises are Producers and/or Hubs and are the basic unit of organisation within the Open Food Network." } + = 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 cb177f9fb3..91deb6f1cc 100644 --- a/app/views/spree/admin/overview/_enterprises_hubs_tab.html.haml +++ b/app/views/spree/admin/overview/_enterprises_hubs_tab.html.haml @@ -1,12 +1,15 @@ %div.hubs_tab{ ng: { show: "activeTab == 'hubs'"} } %div.sixteen.columns.alpha.list-title - %span.five.columns.alpha Name + %span.five.columns.alpha + = t "spree_admin_enterprises_hubs_name" - if can? :admin, Spree::PaymentMethod %span.centered.three.columns Payment Methods - if can? :admin, Spree::ShippingMethod - %span.centered.three.columns Shipping Methods + %span.centered.three.columns + = t "spree_admin_enterprises_shipping_methods" - if can? :admin, EnterpriseFee - %span.centered.three.columns Enterprise Fees + %span.centered.three.columns + = t "spree_admin_enterprises_fees" %div.sixteen.columns.alpha.list - @enterprises.is_distributor.each do |enterprise| %a.sixteen.columns.alpha.list-item{ class: "#{cycle('odd','even')}", href: "#{main_app.edit_admin_enterprise_path(enterprise)}" } diff --git a/app/views/spree/admin/overview/_enterprises_none.html.haml b/app/views/spree/admin/overview/_enterprises_none.html.haml index c1428a6863..72cd90df1a 100644 --- a/app/views/spree/admin/overview/_enterprises_none.html.haml +++ b/app/views/spree/admin/overview/_enterprises_none.html.haml @@ -1,7 +1,8 @@ %div.sixteen.columns.alpha.list-item.red - %span.text.fifteen.columns.alpha You don't have any enterprises yet. + %span.text.fifteen.columns.alpha + = t "spree_admin_enterprises_none_text" %span.one.columns.omega %span.icon-remove-sign %a.sixteen.columns.alpha.button.bottom.red{ href: "#{main_app.new_admin_enterprise_path}" } - CREATE A NEW ENTERPRISE + = t "spree_admin_enterprises_none_create_a_new_enterprise" %span.icon-arrow-right diff --git a/app/views/spree/admin/overview/_enterprises_producers_tab.html.haml b/app/views/spree/admin/overview/_enterprises_producers_tab.html.haml index d5cad103b7..7ff6c8b911 100644 --- a/app/views/spree/admin/overview/_enterprises_producers_tab.html.haml +++ b/app/views/spree/admin/overview/_enterprises_producers_tab.html.haml @@ -1,11 +1,15 @@ %div.producers_tab{ ng: { show: "activeTab == 'producers'"} } %div.list-title.sixteen.columns.alpha - %span.five.columns.alpha Name + %span.five.columns.alpha + = t "spree_admin_enterprises_producers_name" - if can? :admin, Spree::Product - %span.centered.three.columns Total Products - %span.centered.three.columns Active Products + %span.centered.three.columns + = t "spree_admin_enterprises_producers_total_products" + %span.centered.three.columns + = t "spree_admin_enterprises_producers_active_products" - if can? :admin, OrderCycle - %span.centered.three.columns Products in OCs + %span.centered.three.columns + = t "spree_admin_enterprises_producers_order_cycles" %div.sixteen.columns.alpha.list - @enterprises.is_primary_producer.each do |enterprise| %a.sixteen.columns.alpha.list-item{ class: "#{cycle('odd','even')}", href: "#{main_app.edit_admin_enterprise_path(enterprise)}" } diff --git a/app/views/spree/admin/overview/_enterprises_tabs.html.haml b/app/views/spree/admin/overview/_enterprises_tabs.html.haml index f6e5413786..1124c90f30 100644 --- a/app/views/spree/admin/overview/_enterprises_tabs.html.haml +++ b/app/views/spree/admin/overview/_enterprises_tabs.html.haml @@ -1,3 +1,5 @@ %div.sixteen.columns.alpha.tabs - %div.dashboard_tab.eight.columns.alpha.blue{ ng: { class: "{selected: activeTab == 'hubs'}", click: "activeTab = 'hubs'" } } HUBS - %div.dashboard_tab.eight.columns.omega.blue{ ng: { class: "{selected: activeTab == 'producers'}", click: "activeTab = 'producers'" } } PRODUCERS + %div.dashboard_tab.eight.columns.alpha.blue{ ng: { class: "{selected: activeTab == 'hubs'}", click: "activeTab = 'hubs'" } } + = t "spree_admin_enterprises_tabs_hubs" + %div.dashboard_tab.eight.columns.omega.blue{ ng: { class: "{selected: activeTab == 'producers'}", click: "activeTab = 'producers'" } } + = t "spree_admin_enterprises_tabs_producers" diff --git a/app/views/spree/admin/overview/_order_cycles.html.haml b/app/views/spree/admin/overview/_order_cycles.html.haml index c1b7f90276..b39d8a706f 100644 --- a/app/views/spree/admin/overview/_order_cycles.html.haml +++ b/app/views/spree/admin/overview/_order_cycles.html.haml @@ -1,11 +1,13 @@ %div.dashboard_item.seven.columns.omega#order_cycles %div.header.seven.columns.alpha{ :class => "#{@order_cycle_count > 0 ? "" : "orange"}"} - %h3.four.columns.alpha Order Cycles + %h3.four.columns.alpha + = t "spree_admin_order_cycles" - if @order_cycle_count > 0 %a.three.columns.omega.icon-plus.button.blue{ href: "#{main_app.new_admin_order_cycle_path}" } - CREATE NEW + = t "spree_admin_enterprises_create_new" - else - %a.with-tip{ title: "Order cycles determine when and where your products are available to customers." } What's this? + %a.with-tip{ title: t(:spree_admin_order_cycles_tip) } + = t "admin_entreprise_groups_what_s_this" %div.seven.columns.alpha.list - if @order_cycle_count > 0 %div.seven.columns.alpha.list-item @@ -14,13 +16,14 @@ %span.one.column.omega %span.icon-ok-sign %a.seven.columns.alpha.button.bottom.blue{ href: "#{main_app.admin_order_cycles_path}" } - MANAGE ORDER CYCLES + = t "spree_admin_enterprises_producers_manage_order_cycles" %span.icon-arrow-right - else %div.seven.columns.alpha.list-item.orange - %span.six.columns.alpha You don't have any active order cycles. + %span.six.columns.alpha + = t "spree_admin_enterprises_producers_orders_cycle_text" %span.one.column.omega %span.icon-warning-sign %a.seven.columns.alpha.button.bottom.orange{ href: "#{main_app.admin_order_cycles_path}" } - MANAGE ORDER CYCLES + = t "spree_admin_enterprises_producers_manage_order_cycles" %span.icon-arrow-right \ No newline at end of file diff --git a/app/views/spree/admin/overview/_products.html.haml b/app/views/spree/admin/overview/_products.html.haml index 988e779398..0b62e945d0 100644 --- a/app/views/spree/admin/overview/_products.html.haml +++ b/app/views/spree/admin/overview/_products.html.haml @@ -1,11 +1,13 @@ %div.dashboard_item.seven.columns.alpha#products %div.header.seven.columns.alpha{ :class => "#{@product_count > 0 ? "" : "red"}"} - %h3.four.columns.alpha Products + %h3.four.columns.alpha + = t "products" - if @product_count > 0 %a.three.columns.omega.icon-plus.button.blue{ href: "#{new_admin_product_path}" } - CREATE NEW + = t "spree_admin_enterprises_create_new" - else - %a.with-tip{ title: "The products that you sell through the Open Food Network." } What's this? + %a.with-tip{ title: "The products that you sell through the Open Food Network." } + = t "admin_entreprise_groups_what_s_this" %div.seven.columns.alpha.list - if @product_count > 0 %div.seven.columns.alpha.list-item @@ -14,13 +16,14 @@ %span.one.column.omega %span.icon-ok-sign %a.seven.columns.alpha.button.bottom.blue{ href: "#{bulk_edit_admin_products_path}" } - MANAGE PRODUCTS + = t "spree_admin_enterprises_producers_manage_products" %span.icon-arrow-right - else %div.seven.columns.alpha.list-item.red - %span.six.columns.alpha You don't have any active products. + %span.six.columns.alpha + = t "spree_admin_enterprises_any_active_products_text" %span.one.column.omega %span.icon-remove-sign %a.seven.columns.alpha.button.bottom.red{ href: "#{new_admin_product_path}" } - CREATE A NEW PRODUCT + = t "spree_admin_enterprises_create_new_product" %span.icon-arrow-right \ No newline at end of file diff --git a/app/views/spree/admin/overview/multi_enterprise_dashboard.html.haml b/app/views/spree/admin/overview/multi_enterprise_dashboard.html.haml index 420196d3ce..6e1b43fce2 100644 --- a/app/views/spree/admin/overview/multi_enterprise_dashboard.html.haml +++ b/app/views/spree/admin/overview/multi_enterprise_dashboard.html.haml @@ -2,7 +2,8 @@ = render 'admin/shared/user_guide_link' -%h1{ :style => 'margin-bottom: 30px'} Dashboard +%h1{ :style => 'margin-bottom: 30px'} + = t "dashbord" - if @enterprises.unconfirmed.any? diff --git a/app/views/spree/admin/overview/single_enterprise_dashboard.html.haml b/app/views/spree/admin/overview/single_enterprise_dashboard.html.haml index 3998f736de..119c907678 100644 --- a/app/views/spree/admin/overview/single_enterprise_dashboard.html.haml +++ b/app/views/spree/admin/overview/single_enterprise_dashboard.html.haml @@ -19,7 +19,7 @@ } #package_button %button#toggle_type{ onClick: 'toggleType()' } - Change Package + = t "change_package" %i.icon-chevron-down @@ -29,17 +29,17 @@ - if @enterprise.confirmed_at.nil? .alert-box - Please confirm the email address for + = t "spree_admin_single_enterprise_alert_mail_confirmation" %strong= "#{@enterprise.name}." - We've sent an email to + t(:spree_admin_single_enterprise_alert_mail_sent) %strong= "#{@enterprise.email}." - = link_to('Resend', main_app.enterprise_confirmation_path(enterprise: { id: @enterprise.id, email: @enterprise.email } ), method: :post) + = link_to(t('resend'), main_app.enterprise_confirmation_path(enterprise: { id: @enterprise.id, email: @enterprise.email } ), method: :post) %a.close{ href: "#" } × - if !@enterprise.visible .alert-box - %strong Hint: - To allow people to find you, turn on your visibility under - %strong= "Manage #{@enterprise.name}." + %strong + = t "spree_admin_single_enterprise_hint" + %strong= "#{t('manage')} #{@enterprise.name}." %a.close{ href: "#" } × .row @@ -47,14 +47,15 @@ .header %h3 %span.icon-map-marker - Your profile live - %p on the Open Food Network map + = t "your_profil_live" + %p + = t "on_ofn_map" .list /-# Can we pass an anchor here to zoom to our enterprise? %a.button.bottom{href: main_app.map_path, target: '_blank'} - See + = t "see" = @enterprise.name - live + = t "live" %span.icon-arrow-right .two.columns   @@ -63,11 +64,12 @@ .header %h3 %span.icon-edit - Edit profile details - %p Change your profile description, images, etc. + = t "edit_profile_details" + %p + = t "edit_profile_details_etc" .list %a.button.bottom{href: main_app.edit_admin_enterprise_path(@enterprise)} - Manage + = t "manage" = @enterprise.name %span.icon-arrow-right @@ -77,10 +79,10 @@ .header %h3 %span.icon-th-large - Add & manage products + = t 'add_and_manage_products' .list %a.button.bottom{href: bulk_edit_admin_products_path} - Manage products + = t 'manage_products' %span.icon-arrow-right .two.columns @@ -91,8 +93,8 @@ .header %h3 %span.icon-shopping-cart - Add & manage order cycles + = t 'add_and_manage_order_cycles' .list %a.button.bottom{href: main_app.admin_order_cycles_path} - Manage order cycles + = t 'manage_order_cycles' %span.icon-arrow-right diff --git a/config/locales/en.yml b/config/locales/en.yml index 7e1274739c..1ccd46d5d7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -687,7 +687,6 @@ Please follow the instructions there to make your enterprise visible on the Open admin_entreprise_groups_web: "Web Resources" admin_entreprise_groups_web_twitter: "eg. @the_prof" admin_entreprise_groups_web_website_placeholder: "eg. www.truffles.com" -<<<<<<< HEAD admin_order_cycles: "Admin Order Cycles" open: "Open" close: "Close" @@ -734,5 +733,44 @@ Please follow the instructions there to make your enterprise visible on the Open price: "Price" on_hand: "On hand" save_changes: "Save changes" - update_action: "update()" + update_action: "update()" #FIXME admin_entreprise_groups_what_s_this: "What's this ?" + spree_admin_overview_enterprises_header: "My Enterprises" + spree_admin_overview_enterprises_footer: "MANAGE MY ENTERPRISES" + spree_admin_enterprises_hubs_name: "Name" + spree_admin_enterprises_create_new: "CREATE NEW" + spree_admin_enterprises_shipping_methods: "Shipping Methods" + spree_admin_enterprises_fees: "Enterprise Fees" + spree_admin_enterprises_none_create_a_new_enterprise: "CREATE A NEW ENTERPRISE" + spree_admin_enterprises_none_text: "You don't have any enterprises yet" + spree_admin_enterprises_producers_name: "Name" + spree_admin_enterprises_producers_total_products: "Total Products" + spree_admin_enterprises_producers_active_products: "Active Products" + spree_admin_enterprises_producers_order_cycles: "Products in OCs" + spree_admin_enterprises_producers_order_cycles_title: "" + spree_admin_enterprises_tabs_hubs: "HUBS" + spree_admin_enterprises_tabs_producers: "PRODUCERS" + spree_admin_enterprises_producers_manage_order_cycles: "MANAGE ORDER CYCLES" + spree_admin_enterprises_producers_manage_products: "MANAGE PRODUCTS" + spree_admin_enterprises_producers_orders_cycle_text: "You don't have any active order cycles." + spree_admin_enterprises_any_active_products_text: "You don't have any active products." + spree_admin_enterprises_create_new_product: "CREATE A NEW PRODUCT" + spree_admin_order_cycles: "Order Cycles" + spree_admin_order_cycles_tip: "Order cycles determine when and where your products are available to customers." + dashbord: "Dashboard" + spree_admin_single_enterprise_alert_mail_confirmation: "Please confirm the email address for" + spree_admin_single_enterprise_alert_mail_sent: "We've sent an email to" + change_package: "Change Package" + spree_admin_single_enterprise_hint: "Hint: To allow people to find you, turn on your visibility under" + your_profil_live: "Your profile live" + on_ofn_map: "on the Open Food Network map" + see: "See" + live: "live" + manage: "Manage" + resend: "Resend" + add_and_manage_products: "Add & manage products" + add_and_manage_order_cycles: "Add & manage order cycles" + manage_order_cycles: "Manage order cycles" + manage_products: "Manage products" + edit_profile_details: "Edit profile details" + edit_profile_details_etc: "Change your profile description, images, etc."