From 6d0dc438a7898153bb630c5f0c03b5b4173350b2 Mon Sep 17 00:00:00 2001 From: elf Pavlik Date: Mon, 21 Mar 2016 16:55:57 -0600 Subject: [PATCH] i18n fixes after @sstead feedback in #799 --- .../edit.html.haml | 4 ++-- app/views/admin/customers/index.html.haml | 2 +- .../enterprise_groups/_form_images.html.haml | 3 --- .../enterprise_groups/_form_users.html.haml | 6 ++---- app/views/admin/order_cycles/index.html.haml | 21 ++++++++++++------- .../admin/orders/bulk_management.html.haml | 2 +- .../spree/admin/reports/customers.html.haml | 9 ++++---- .../reports/order_cycle_management.html.haml | 2 +- .../reports/orders_and_fulfillment.html.haml | 2 +- .../reports/products_and_inventory.html.haml | 6 +++--- .../admin/shared/_hubs_sidebar.html.haml | 7 ++++--- config/locales/en.yml | 6 +++--- 12 files changed, 36 insertions(+), 34 deletions(-) diff --git a/app/views/admin/accounts_and_billing_settings/edit.html.haml b/app/views/admin/accounts_and_billing_settings/edit.html.haml index cd614b14f8..2121719e75 100644 --- a/app/views/admin/accounts_and_billing_settings/edit.html.haml +++ b/app/views/admin/accounts_and_billing_settings/edit.html.haml @@ -28,7 +28,7 @@ =t :update_invoice = f.check_box :auto_update_invoices = f.label :auto_update_invoices, - t(:auto_finalise_invoices) + t(:auto_update_invoices) .six.columns.omega %fieldset.no-border-bottom @@ -36,7 +36,7 @@ =t :finalise_invoice = f.check_box :auto_finalize_invoices = f.label :auto_finalize_invoices, - t(:auto_update_invoices) + t(:auto_finalise_invoices) .row .twelve.columns.alpha.omega.form-buttons{"data-hook" => "buttons"} diff --git a/app/views/admin/customers/index.html.haml b/app/views/admin/customers/index.html.haml index cf3ef25bb3..f68ad37da1 100644 --- a/app/views/admin/customers/index.html.haml +++ b/app/views/admin/customers/index.html.haml @@ -1,6 +1,6 @@ - content_for :page_title do %h1.page-title - =t :customers + =t :customers = admin_inject_shops diff --git a/app/views/admin/enterprise_groups/_form_images.html.haml b/app/views/admin/enterprise_groups/_form_images.html.haml index 2269367e96..ba40a4c849 100644 --- a/app/views/admin/enterprise_groups/_form_images.html.haml +++ b/app/views/admin/enterprise_groups/_form_images.html.haml @@ -15,9 +15,6 @@ .with-tip{'data-powertip' => t(:admin_entreprise_groups_data_powertip_promo_image_tip)} %a = t 'admin.whats_this' - = f.label :promo_image, 'ofn-with-tip' => 'This image is displayed at the top of the Group profile' - %div{'ofn-with-tip' => 'This image is displayed at the top of the Group profile'} - %a What's this? .omega.eight.columns = image_tag @object.promo_image.url if @object.promo_image.present? = f.file_field :promo_image diff --git a/app/views/admin/enterprise_groups/_form_users.html.haml b/app/views/admin/enterprise_groups/_form_users.html.haml index b09bde6852..6bd6eaa4a3 100644 --- a/app/views/admin/enterprise_groups/_form_users.html.haml +++ b/app/views/admin/enterprise_groups/_form_users.html.haml @@ -1,14 +1,12 @@ %fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='Users'" } } - %legend Users + %legend + = t(:users) .row .three.columns.alpha =f.label :owner_id, t(:admin_entreprise_groups_owner) .with-tip{'data-powertip' => t(:admin_entreprise_groups_data_powertip)} %a = t 'admin.whats_this' - =f.label :owner_id, 'Owner' - %div{'ofn-with-tip' => "The primary user responsible for this group."} - %a What's this? .eight.columns.omega - if spree_current_user.admin? = f.hidden_field :owner_id, diff --git a/app/views/admin/order_cycles/index.html.haml b/app/views/admin/order_cycles/index.html.haml index 10b9b1e345..824aa66ee8 100644 --- a/app/views/admin/order_cycles/index.html.haml +++ b/app/views/admin/order_cycles/index.html.haml @@ -28,14 +28,21 @@ %thead %tr - %th =t :name - %th =t :open - %th =t :close + %th + =t :name + %th + =t :open + %th + =t :close - unless order_cycles_simple_index - %th =t :supplier - %th =t :coordinator - %th =t :distributors - %th =t :products + %th + =t :supplier + %th + =t :coordinator + %th + =t :distributors + %th + =t :products %th.actions %th.actions %th.actions diff --git a/app/views/spree/admin/orders/bulk_management.html.haml b/app/views/spree/admin/orders/bulk_management.html.haml index 3a962defac..43983e87ea 100644 --- a/app/views/spree/admin/orders/bulk_management.html.haml +++ b/app/views/spree/admin/orders/bulk_management.html.haml @@ -4,7 +4,7 @@ - content_for :page_title do %h1.page-title = t "bom_page_title" - %a{ 'ofn-with-tip' => "#t('bom_tip')" } + %a{ 'ofn-with-tip' => t("bom_tip") } = t "admin.whats_this" = render :partial => 'spree/admin/shared/order_sub_menu' diff --git a/app/views/spree/admin/reports/customers.html.haml b/app/views/spree/admin/reports/customers.html.haml index 4b7004536c..70045662f9 100644 --- a/app/views/spree/admin/reports/customers.html.haml +++ b/app/views/spree/admin/reports/customers.html.haml @@ -2,24 +2,24 @@ %br .row .four.columns.alpha - = label_tag nil, t(:reports_customers_distributor) + = label_tag nil, t(:report_customers_distributor) = select_tag(:distributor_id, options_from_collection_for_select(@distributors, :id, :name, params[:distributor_id]), {:include_blank => true, :class => "select2 fullwidth"}) .four.columns - = label_tag nil, t(:reports_customers_supplier) + = label_tag nil, t(:report_customers_supplier) = select_tag(:supplier_id, options_from_collection_for_select(@suppliers, :id, :name, params[:supplier_id]), {:include_blank => true, :class => "select2 fullwidth"}) .six.columns - = label_tag nil, t(:reports_customers_cycle) + = label_tag nil, t(:report_customers_cycle) = select_tag(:order_cycle_id, options_for_select(report_order_cycle_options(@order_cycles), params[:order_cycle_id]), {:include_blank => true, :class => "select2 fullwidth"}) - = label_tag nil, t(:reports_customers_type) + = label_tag nil, t(:report_customers_type) = select_tag(:report_type, options_for_select(@report_types, @report_type)) %br @@ -44,4 +44,3 @@ - if @report.table.empty? %tr %td{:colspan => "2"}= t(:none) - diff --git a/app/views/spree/admin/reports/order_cycle_management.html.haml b/app/views/spree/admin/reports/order_cycle_management.html.haml index 09ac6f76bb..0b32eabe78 100644 --- a/app/views/spree/admin/reports/order_cycle_management.html.haml +++ b/app/views/spree/admin/reports/order_cycle_management.html.haml @@ -6,7 +6,7 @@ .omega.fourteen.columns= f.collection_select(:distributor_id_in, @distributors, :id, :name, {}, {class: "select2 fullwidth", multiple: true}) .row - .alpha.two.columns= label_tag nil, t(:reports_customers_cycle) + .alpha.two.columns= label_tag nil, t(:report_customers_cycle) .omega.fourteen.columns = f.select(:order_cycle_id_in, report_order_cycle_options(@order_cycles), {selected: params[:q][:order_cycle_id_in]}, {class: "select2 fullwidth", multiple: true}) diff --git a/app/views/spree/admin/reports/orders_and_fulfillment.html.haml b/app/views/spree/admin/reports/orders_and_fulfillment.html.haml index 15ad6458cd..5bda882108 100644 --- a/app/views/spree/admin/reports/orders_and_fulfillment.html.haml +++ b/app/views/spree/admin/reports/orders_and_fulfillment.html.haml @@ -10,7 +10,7 @@ .omega.fourteen.columns= select_tag(:supplier_id_in, options_from_collection_for_select(@suppliers, :id, :name, params[:supplier_id_in]), {class: "select2 fullwidth", multiple: true}) .row - .alpha.two.columns= label_tag nil, t(:reports_customers_cycle) + .alpha.two.columns= label_tag nil, t(:report_customers_cycle) .omega.fourteen.columns = f.select(:order_cycle_id_in, report_order_cycle_options(@order_cycles), {selected: params[:q][:order_cycle_id_in]}, {class: "select2 fullwidth", multiple: true}) diff --git a/app/views/spree/admin/reports/products_and_inventory.html.haml b/app/views/spree/admin/reports/products_and_inventory.html.haml index b1c11918ce..40c4fbfccf 100644 --- a/app/views/spree/admin/reports/products_and_inventory.html.haml +++ b/app/views/spree/admin/reports/products_and_inventory.html.haml @@ -7,14 +7,14 @@ options_from_collection_for_select(@distributors, :id, :name, params[:distributor_id]), {:include_blank => true, :class => "select2 fullwidth"}) - + .four.columns - = label_tag nil, t(:reports_customers_supplier) + = label_tag nil, t(:report_customers_supplier) = select_tag(:supplier_id, options_from_collection_for_select(@suppliers, :id, :name, params[:supplier_id]), {:include_blank => true, :class => "select2 fullwidth"}) - + .six.columns = label_tag nil, t(:report_order_cycle) = select_tag(:order_cycle_id, diff --git a/app/views/spree/admin/shared/_hubs_sidebar.html.haml b/app/views/spree/admin/shared/_hubs_sidebar.html.haml index 9bc54be829..75ef9bb32f 100644 --- a/app/views/spree/admin/shared/_hubs_sidebar.html.haml +++ b/app/views/spree/admin/shared/_hubs_sidebar.html.haml @@ -2,7 +2,8 @@ - hubs_color = 'red' if (controller.action_name == 'create' || controller.action_name == 'update') && @object.errors.full_messages.include?(t(:hub_sidebar_at_least)) .sidebar_item.omega.four.columns#hubs .four.columns.alpha.header{ class: "#{hubs_color}" } - %span.four.columns.alpha.centered t(:hub_sidebar_hubs) + %span.four.columns.alpha.centered + = t(:hub_sidebar_hubs) .four.columns.alpha.list{ class: "#{hubs_color}" } - if @hubs.count > 0 = hidden_field klass, :distributor_ids, :multiple => true, value: nil @@ -18,9 +19,9 @@ - else .four.columns.alpha.list-item %span.three.columns.alpha - t(:hub_sidebar_none_available) + = t(:hub_sidebar_none_available) %span.one.column.omega %span.icon-remove-sign %a.four.columns.alpha.button{ href: "#{main_app.admin_enterprises_path}", class: "#{hubs_color}" } - t(:hub_sidebar_manage) + = t(:hub_sidebar_manage) %span.icon-arrow-right diff --git a/config/locales/en.yml b/config/locales/en.yml index c4ea55c3c4..477c83cc5d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -906,9 +906,9 @@ Please follow the instructions there to make your enterprise visible on the Open hub_sidebar_red: "red" shop_trial_in_progress: "Your shopfront trial expires in #{remaining_trial_days(enterprise)}." #FIXME shop_trial_expired: "Good news! We have decided to extend shopfront trials until further notice (probably around March 2015)." #FIXME - reports_customers_distributor: "Distributor" - reports_customers_supplier: "Supplier" - reports_customers_cycle: "Order Cycle" + report_customers_distributor: "Distributor" + report_customers_supplier: "Supplier" + report_customers_cycle: "Order Cycle" report_customers_type: "Report Type" report_customers_csv: "Download as csv" report_customers_header: "orders header"