diff --git a/backend/app/views/spree/admin/adjustment_reasons/index.html.erb b/backend/app/views/spree/admin/adjustment_reasons/index.html.erb index 72a417438ed..0df2145270c 100644 --- a/backend/app/views/spree/admin/adjustment_reasons/index.html.erb +++ b/backend/app/views/spree/admin/adjustment_reasons/index.html.erb @@ -1,7 +1,7 @@ <%= render 'spree/admin/shared/settings_checkout_tabs' %> <% content_for :page_title do %> - <%= Spree::AdjustmentReason.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::AdjustmentReason) %> <% end %> <% content_for :page_actions do %> diff --git a/backend/app/views/spree/admin/customer_returns/edit.html.erb b/backend/app/views/spree/admin/customer_returns/edit.html.erb index 131c6ea0ba2..77e5ba7d4e2 100644 --- a/backend/app/views/spree/admin/customer_returns/edit.html.erb +++ b/backend/app/views/spree/admin/customer_returns/edit.html.erb @@ -54,7 +54,7 @@ <% end %>
- <%= Spree::Reimbursement.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::Reimbursement) %> <% if @customer_return.reimbursements.any? %> <%= render partial: 'reimbursements_table', locals: {reimbursements: @customer_return.reimbursements} %> <% else %> diff --git a/backend/app/views/spree/admin/customer_returns/index.html.erb b/backend/app/views/spree/admin/customer_returns/index.html.erb index 10a37d005e0..52aa8f0be9c 100644 --- a/backend/app/views/spree/admin/customer_returns/index.html.erb +++ b/backend/app/views/spree/admin/customer_returns/index.html.erb @@ -10,7 +10,7 @@ <% end %> <% content_for :page_title do %> - <%= Spree::CustomerReturn.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::CustomerReturn) %> <% end %> <% if @customer_returns.any? %> diff --git a/backend/app/views/spree/admin/log_entries/index.html.erb b/backend/app/views/spree/admin/log_entries/index.html.erb index e7e175d8a25..7789e0d1673 100644 --- a/backend/app/views/spree/admin/log_entries/index.html.erb +++ b/backend/app/views/spree/admin/log_entries/index.html.erb @@ -4,7 +4,7 @@ <%= Spree::Payment.model_name.human %> - <%= Spree::LogEntry.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::LogEntry) %> <% end %> <% content_for :page_actions do %> diff --git a/backend/app/views/spree/admin/option_types/edit.html.erb b/backend/app/views/spree/admin/option_types/edit.html.erb index d3bcaa169dd..92f80bc1b3f 100644 --- a/backend/app/views/spree/admin/option_types/edit.html.erb +++ b/backend/app/views/spree/admin/option_types/edit.html.erb @@ -23,7 +23,7 @@
- <%= Spree::OptionValue.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::OptionValue) %> diff --git a/backend/app/views/spree/admin/option_types/index.html.erb b/backend/app/views/spree/admin/option_types/index.html.erb index e904d8cf22a..758812fd477 100644 --- a/backend/app/views/spree/admin/option_types/index.html.erb +++ b/backend/app/views/spree/admin/option_types/index.html.erb @@ -1,5 +1,5 @@ <% content_for :page_title do %> - <%= Spree::OptionType.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::OptionType) %> <% end %> <% content_for :page_actions do %> diff --git a/backend/app/views/spree/admin/orders/confirm/_payments.html.erb b/backend/app/views/spree/admin/orders/confirm/_payments.html.erb index 30c4b23a7bb..ea99ee30b8f 100644 --- a/backend/app/views/spree/admin/orders/confirm/_payments.html.erb +++ b/backend/app/views/spree/admin/orders/confirm/_payments.html.erb @@ -1,5 +1,5 @@
- <%= Spree::Payment.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::Payment) %>
diff --git a/backend/app/views/spree/admin/payment_methods/index.html.erb b/backend/app/views/spree/admin/payment_methods/index.html.erb index d7bb89faec3..09356b5a519 100644 --- a/backend/app/views/spree/admin/payment_methods/index.html.erb +++ b/backend/app/views/spree/admin/payment_methods/index.html.erb @@ -1,7 +1,7 @@ <%= render 'spree/admin/shared/payments_tabs' %> <% content_for :page_title do %> - <%= Spree::PaymentMethod.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::PaymentMethod) %> <% end %> <% content_for :page_actions do %> diff --git a/backend/app/views/spree/admin/payments/_capture_events.html.erb b/backend/app/views/spree/admin/payments/_capture_events.html.erb index 00644b38631..63eb8cd4e95 100644 --- a/backend/app/views/spree/admin/payments/_capture_events.html.erb +++ b/backend/app/views/spree/admin/payments/_capture_events.html.erb @@ -1,5 +1,5 @@ <% if @payment.capture_events.exists? %> -

<%= Spree::PaymentCaptureEvent.model_name.human(count: :other) %>

+

<%= plural_resource_name(Spree::PaymentCaptureEvent) %>

diff --git a/backend/app/views/spree/admin/payments/index.html.erb b/backend/app/views/spree/admin/payments/index.html.erb index 959a37f95d5..6f7efa06ce1 100644 --- a/backend/app/views/spree/admin/payments/index.html.erb +++ b/backend/app/views/spree/admin/payments/index.html.erb @@ -10,7 +10,7 @@ <% end %> <% content_for :page_title do %> - <%= Spree::Payment.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::Payment) %> <% end %> <% if @order.outstanding_balance? %> @@ -20,13 +20,13 @@ <% if @payments.any? %>
- <%= Spree::Payment.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::Payment) %> <%= render :partial => 'list', :locals => { :payments => @payments } %>
<% if @refunds.any? %>
- <%= Spree::Refund.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::Refund) %> <%= render :partial => 'spree/admin/shared/refunds', :locals => { :refunds => @refunds, show_actions: true } %>
<% end %> diff --git a/backend/app/views/spree/admin/product_properties/index.html.erb b/backend/app/views/spree/admin/product_properties/index.html.erb index 9d1c57ce21b..311bf7eac71 100644 --- a/backend/app/views/spree/admin/product_properties/index.html.erb +++ b/backend/app/views/spree/admin/product_properties/index.html.erb @@ -18,7 +18,7 @@ <%= form_for @product, :url => admin_product_url(@product), :method => :put do |f| %>
- <%= Spree::ProductProperty.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::ProductProperty) %>
diff --git a/backend/app/views/spree/admin/products/_form.html.erb b/backend/app/views/spree/admin/products/_form.html.erb index 3f0e1d99b62..94e9a58a05b 100644 --- a/backend/app/views/spree/admin/products/_form.html.erb +++ b/backend/app/views/spree/admin/products/_form.html.erb @@ -137,14 +137,14 @@
<%= f.field_container :taxons do %> - <%= f.label :taxon_ids, Spree::Taxon.model_name.human(count: :other) %>
+ <%= f.label :taxon_ids, plural_resource_name(Spree::Taxon) %>
<%= f.hidden_field :taxon_ids, :value => @product.taxon_ids.join(',') %> <% end %>
<%= f.field_container :option_types do %> - <%= f.label :option_type_ids, Spree::OptionType.model_name.human(count: :other) %> + <%= f.label :option_type_ids, plural_resource_name(Spree::OptionType) %> <%= f.hidden_field :option_type_ids, :value => @product.option_type_ids.join(',') %> <% end %>
diff --git a/backend/app/views/spree/admin/products/_properties_form.erb b/backend/app/views/spree/admin/products/_properties_form.erb index f0991e5c856..ffdce7e365a 100644 --- a/backend/app/views/spree/admin/products/_properties_form.erb +++ b/backend/app/views/spree/admin/products/_properties_form.erb @@ -1,5 +1,5 @@ <% content_for :page_title do %> - <%= Spree::Property.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::Property) %> <% end %> <% f.fields_for :product_properties do |properties_form| %> diff --git a/backend/app/views/spree/admin/promotion_categories/index.html.erb b/backend/app/views/spree/admin/promotion_categories/index.html.erb index 1a476c43dff..8560171e8b4 100644 --- a/backend/app/views/spree/admin/promotion_categories/index.html.erb +++ b/backend/app/views/spree/admin/promotion_categories/index.html.erb @@ -1,5 +1,5 @@ <% content_for :page_title do %> - <%= Spree::PromotionCategory.model_name.human(count: :many) %> + <%= plural_resource_name(Spree::PromotionCategory) %> <% end %> <% content_for :page_actions do %> diff --git a/backend/app/views/spree/admin/promotions/_actions.html.erb b/backend/app/views/spree/admin/promotions/_actions.html.erb index b4a380c514d..732fe20cf27 100644 --- a/backend/app/views/spree/admin/promotions/_actions.html.erb +++ b/backend/app/views/spree/admin/promotions/_actions.html.erb @@ -3,7 +3,7 @@ <%= form_tag spree.admin_promotion_promotion_actions_path(@promotion), :remote => true, :id => 'new_promotion_action_form' do %> <% options = options_for_select( Rails.application.config.spree.promotions.actions.map(&:name).map {|name| [ Spree.t("promotion_action_types.#{name.demodulize.underscore}.name"), name] } ) %>
- <%= Spree::PromotionAction.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::PromotionAction) %> <% if can?(:update, @promotion) %>
<%= label_tag :action_type, Spree.t(:add_action_of_type)%> diff --git a/backend/app/views/spree/admin/promotions/index.html.erb b/backend/app/views/spree/admin/promotions/index.html.erb index e9a3606f5a5..37bdbcfa244 100644 --- a/backend/app/views/spree/admin/promotions/index.html.erb +++ b/backend/app/views/spree/admin/promotions/index.html.erb @@ -1,5 +1,5 @@ <% content_for :page_title do %> - <%= Spree::Promotion.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::Promotion) %> <% end %> <% content_for :page_actions do %> diff --git a/backend/app/views/spree/admin/promotions/rules/_option_value.html.erb b/backend/app/views/spree/admin/promotions/rules/_option_value.html.erb index 8014fcdd5df..0c3a888f179 100644 --- a/backend/app/views/spree/admin/promotions/rules/_option_value.html.erb +++ b/backend/app/views/spree/admin/promotions/rules/_option_value.html.erb @@ -1,7 +1,7 @@
<%= label_tag nil, Spree::Product.model_name.human %>
-
<%= label_tag nil, Spree::OptionValue.model_name.human(count: :other) %>
+
<%= label_tag nil, plural_resource_name(Spree::OptionValue) %>
diff --git a/backend/app/views/spree/admin/properties/index.html.erb b/backend/app/views/spree/admin/properties/index.html.erb index 975404f5bc0..44b3f2a0ddc 100644 --- a/backend/app/views/spree/admin/properties/index.html.erb +++ b/backend/app/views/spree/admin/properties/index.html.erb @@ -1,5 +1,5 @@ <% content_for :page_title do %> - <%= Spree::Property.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::Property) %> <% end %> <% content_for :page_actions do %> diff --git a/backend/app/views/spree/admin/prototypes/_form.html.erb b/backend/app/views/spree/admin/prototypes/_form.html.erb index 94846e061f1..62ccf280d84 100644 --- a/backend/app/views/spree/admin/prototypes/_form.html.erb +++ b/backend/app/views/spree/admin/prototypes/_form.html.erb @@ -10,7 +10,7 @@
<%= f.field_container :property_ids do %> - <%= f.label :property_ids, Spree::Property.model_name.human(count: :other) %>
+ <%= f.label :property_ids, plural_resource_name(Spree::Property) %>
<%= f.select :property_ids, Spree::Property.all.map { |p| ["#{p.presentation} (#{p.name})", p.id] }, {}, { multiple: true, class: "select2 fullwidth" } %> <% end %>
@@ -19,7 +19,7 @@
<%= f.field_container :option_type_ids do %> - <%= f.label :option_type_ids, Spree::OptionType.model_name.human(count: :other) %>
+ <%= f.label :option_type_ids, plural_resource_name(Spree::OptionType) %>
<%= f.select :option_type_ids, Spree::OptionType.all.map { |ot| ["#{ot.presentation} (#{ot.name})", ot.id] }, {}, { multiple: true, class: "select2 fullwidth" } %> <% end %>
@@ -28,7 +28,7 @@
<%= f.field_container :taxon_ids do %> - <%= f.label :taxon_ids, Spree::Taxon.model_name.human(count: :other) %>
+ <%= f.label :taxon_ids, plural_resource_name(Spree::Taxon) %>
<%= f.select :taxon_ids, Spree::Taxon.all.map { |t| [t.name, t.id] }, {}, { multiple: true, class: "select2 fullwidth" } %> <% end %>
diff --git a/backend/app/views/spree/admin/prototypes/index.html.erb b/backend/app/views/spree/admin/prototypes/index.html.erb index 524c92bb0a9..f55f1bc81ad 100644 --- a/backend/app/views/spree/admin/prototypes/index.html.erb +++ b/backend/app/views/spree/admin/prototypes/index.html.erb @@ -1,5 +1,5 @@ <% content_for :page_title do %> - <%= Spree::Prototype.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::Prototype) %> <% end %> <% content_for :page_actions do %> diff --git a/backend/app/views/spree/admin/prototypes/show.html.erb b/backend/app/views/spree/admin/prototypes/show.html.erb index 07ed820d7a6..d0aaea6508b 100644 --- a/backend/app/views/spree/admin/prototypes/show.html.erb +++ b/backend/app/views/spree/admin/prototypes/show.html.erb @@ -1,5 +1,5 @@ <% if @prototype.option_types.present? %> -

<%= Spree::Variant.model_name.human(count: :other) %>

+

<%= plural_resource_name(Spree::Variant) %>

    <% @prototype.option_types.each do |ot| %> @@ -7,7 +7,7 @@ <%= check_box_tag "option_types[]", ot.id, (params[:option_types] || []).include?(ot.id.to_s), :id => "option_type_#{ot.id}", :class => "option-type" %> <%= label_tag "option_type_#{ot.id}", ot.presentation %> - +
      <% ot.option_values.each do |ov| %>
    • diff --git a/backend/app/views/spree/admin/refund_reasons/index.html.erb b/backend/app/views/spree/admin/refund_reasons/index.html.erb index 054b3526a29..3ef7f160e58 100644 --- a/backend/app/views/spree/admin/refund_reasons/index.html.erb +++ b/backend/app/views/spree/admin/refund_reasons/index.html.erb @@ -1,7 +1,7 @@ <%= render 'spree/admin/shared/settings_checkout_tabs' %> <% content_for :page_title do %> - <%= Spree::RefundReason.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::RefundReason) %> <% end %> <% content_for :page_actions do %> diff --git a/backend/app/views/spree/admin/reimbursement_types/index.html.erb b/backend/app/views/spree/admin/reimbursement_types/index.html.erb index b900e2fa050..b2ebebd08e7 100644 --- a/backend/app/views/spree/admin/reimbursement_types/index.html.erb +++ b/backend/app/views/spree/admin/reimbursement_types/index.html.erb @@ -1,7 +1,7 @@ <%= render 'spree/admin/shared/settings_checkout_tabs' %> <% content_for :page_title do %> - <%= Spree::ReimbursementType.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::ReimbursementType) %> <% end %>
diff --git a/backend/app/views/spree/admin/reimbursements/index.html.erb b/backend/app/views/spree/admin/reimbursements/index.html.erb index 8e51cb54230..511d7ae5176 100644 --- a/backend/app/views/spree/admin/reimbursements/index.html.erb +++ b/backend/app/views/spree/admin/reimbursements/index.html.erb @@ -1,7 +1,7 @@ <%= render :partial => 'spree/admin/shared/order_tabs', :locals => { :current => 'Reimbursements' } %> <% content_for :page_title do %> - <%= Spree::Reimbursement.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::Reimbursement) %> <% end %> <% content_for :page_actions do %> diff --git a/backend/app/views/spree/admin/return_authorizations/index.html.erb b/backend/app/views/spree/admin/return_authorizations/index.html.erb index 37b51fc1252..b6f0ad430a8 100644 --- a/backend/app/views/spree/admin/return_authorizations/index.html.erb +++ b/backend/app/views/spree/admin/return_authorizations/index.html.erb @@ -12,7 +12,7 @@ <% end %> <% content_for :page_title do %> - <%= Spree::ReturnAuthorization.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::ReturnAuthorization) %> <% end %> <% if @order.shipments.any?(&:shipped?) || @order.return_authorizations.any? %> diff --git a/backend/app/views/spree/admin/return_reasons/index.html.erb b/backend/app/views/spree/admin/return_reasons/index.html.erb index bdf0b888f4b..660e96ebd55 100644 --- a/backend/app/views/spree/admin/return_reasons/index.html.erb +++ b/backend/app/views/spree/admin/return_reasons/index.html.erb @@ -1,5 +1,5 @@ <%= render partial: 'spree/admin/shared/named_types/index', locals: { - page_title: Spree::ReturnReason.model_name.human(count: :other), + page_title: plural_resource_name(Spree::ReturnReason), new_button_text: Spree.t(:new_rma_reason), resource: Spree::ReturnReason } %> diff --git a/backend/app/views/spree/admin/shared/_areas_tabs.html.erb b/backend/app/views/spree/admin/shared/_areas_tabs.html.erb index ed4768847ea..f66d440c746 100644 --- a/backend/app/views/spree/admin/shared/_areas_tabs.html.erb +++ b/backend/app/views/spree/admin/shared/_areas_tabs.html.erb @@ -2,16 +2,16 @@ - + @@ -59,7 +59,7 @@
<%= Spree::StockLocation.human_attribute_name(:name) %> <%= Spree::StockLocation.human_attribute_name(:state_id) %><%= Spree::StockMovement.model_name.human(count: :other) %><%= plural_resource_name(Spree::StockMovement) %>
<% if can?(:display, Spree::StockMovement) %> - <%= link_to Spree::StockMovement.model_name.human(count: :other), admin_stock_location_stock_movements_path(stock_location.id) %> + <%= link_to plural_resource_name(Spree::StockMovement), admin_stock_location_stock_movements_path(stock_location.id) %> <% else %> Stock Movements <% end %> diff --git a/backend/app/views/spree/admin/stock_transfers/_transfer_item_table.html.erb b/backend/app/views/spree/admin/stock_transfers/_transfer_item_table.html.erb index 2b5e7b2ef9f..1f03e8a7287 100644 --- a/backend/app/views/spree/admin/stock_transfers/_transfer_item_table.html.erb +++ b/backend/app/views/spree/admin/stock_transfers/_transfer_item_table.html.erb @@ -59,5 +59,5 @@
> - <%= Spree.t(:no_resource, resource: Spree::TransferItem.model_name.human(count: :other)) %> + <%= Spree.t(:no_resource, resource: plural_resource_name(Spree::TransferItem)) %>
diff --git a/backend/app/views/spree/admin/stock_transfers/index.html.erb b/backend/app/views/spree/admin/stock_transfers/index.html.erb index 3be04bff696..38bb41a883e 100644 --- a/backend/app/views/spree/admin/stock_transfers/index.html.erb +++ b/backend/app/views/spree/admin/stock_transfers/index.html.erb @@ -1,5 +1,5 @@ <% content_for :page_title do %> - <%= Spree::StockTransfer.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::StockTransfer) %> <% end %> <% content_for :page_actions do %> diff --git a/backend/app/views/spree/admin/stock_transfers/show.html.erb b/backend/app/views/spree/admin/stock_transfers/show.html.erb index cf77ae7a670..971da6cd8e0 100644 --- a/backend/app/views/spree/admin/stock_transfers/show.html.erb +++ b/backend/app/views/spree/admin/stock_transfers/show.html.erb @@ -43,6 +43,6 @@
- <%= Spree::TransferItem.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::TransferItem) %> <%= render partial: 'transfer_item_table', locals: { transfer_items: @stock_transfer.transfer_items, show_expected: true, show_received: true, show_actions: false } %>
diff --git a/backend/app/views/spree/admin/stock_transfers/tracking_info.html.erb b/backend/app/views/spree/admin/stock_transfers/tracking_info.html.erb index c4622001adc..b0e3242cd57 100644 --- a/backend/app/views/spree/admin/stock_transfers/tracking_info.html.erb +++ b/backend/app/views/spree/admin/stock_transfers/tracking_info.html.erb @@ -43,6 +43,6 @@
- <%= Spree::TransferItem.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::TransferItem) %> <%= render partial: 'transfer_item_table', locals: { transfer_items: @stock_transfer.transfer_items, show_expected: true, show_received: false, show_actions: false } %>
diff --git a/backend/app/views/spree/admin/tax_rates/index.html.erb b/backend/app/views/spree/admin/tax_rates/index.html.erb index 1fcc76e6f0c..5f870974b60 100644 --- a/backend/app/views/spree/admin/tax_rates/index.html.erb +++ b/backend/app/views/spree/admin/tax_rates/index.html.erb @@ -1,7 +1,7 @@ <%= render 'spree/admin/shared/taxes_tabs' %> <% content_for :page_title do %> - <%= Spree::TaxRate.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::TaxRate) %> <% end %> <% content_for :page_actions do %> diff --git a/backend/app/views/spree/admin/taxonomies/index.html.erb b/backend/app/views/spree/admin/taxonomies/index.html.erb index 15317d8906a..4ba9400940c 100644 --- a/backend/app/views/spree/admin/taxonomies/index.html.erb +++ b/backend/app/views/spree/admin/taxonomies/index.html.erb @@ -1,5 +1,5 @@ <% content_for :page_title do %> - <%= Spree::Taxonomy.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::Taxonomy) %> <% end %> <% content_for :page_actions do %> diff --git a/backend/app/views/spree/admin/taxons/index.html.erb b/backend/app/views/spree/admin/taxons/index.html.erb index c160f0062e6..701d1f4c357 100644 --- a/backend/app/views/spree/admin/taxons/index.html.erb +++ b/backend/app/views/spree/admin/taxons/index.html.erb @@ -1,5 +1,5 @@ <% content_for :page_title do %> - <%= Spree::Taxon.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::Taxon) %> <% end %> <% content_for :table_filter_title do %> diff --git a/backend/app/views/spree/admin/trackers/index.html.erb b/backend/app/views/spree/admin/trackers/index.html.erb index e4339908901..76a86a6dc7b 100644 --- a/backend/app/views/spree/admin/trackers/index.html.erb +++ b/backend/app/views/spree/admin/trackers/index.html.erb @@ -1,7 +1,7 @@ <%= render 'spree/admin/shared/general_tabs' %> <% content_for :page_title do %> - <%= Spree::Tracker.model_name.human(count: :other) %> + <%= plural_resource_name(Spree::Tracker) %> <% end %> <% content_for :page_actions do %> diff --git a/backend/app/views/spree/admin/users/_form.html.erb b/backend/app/views/spree/admin/users/_form.html.erb index 57bdb100337..5febe509325 100644 --- a/backend/app/views/spree/admin/users/_form.html.erb +++ b/backend/app/views/spree/admin/users/_form.html.erb @@ -13,7 +13,7 @@ <% if can? :display, Spree::Role %>
- <%= label_tag nil, Spree::Role.model_name.human(count: :other) %> + <%= label_tag nil, plural_resource_name(Spree::Role) %>