mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Pluralize admin products search result [OFN-12532-v1]
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#sort
|
||||
%div.pagination-description
|
||||
- if pagy.present?
|
||||
= t(".pagination.total_html", total: pagy.count, from: pagy.from, to: pagy.to)
|
||||
= t(".pagination.products_total_html", count: pagy.count, from: pagy.from, to: pagy.to)
|
||||
|
||||
- if search_term.present? || producer_id.present? || category_id.present?
|
||||
%a{ href: url_for(page: 1), class: "button disruptive", data: { 'turbo-frame': "_self", 'turbo-action': "advance" } }
|
||||
|
||||
@@ -880,7 +880,9 @@ en:
|
||||
search: Search
|
||||
sort:
|
||||
pagination:
|
||||
total_html: "<strong>%{total} products</strong> found for your search criteria. Showing %{from} to %{to}."
|
||||
products_total_html:
|
||||
one: "<strong>%{count} product</strong> found for your search criteria. Showing %{from} to %{to}."
|
||||
other: "<strong>%{count} products</strong> found for your search criteria. Showing %{from} to %{to}."
|
||||
per_page:
|
||||
show: Show
|
||||
per_page: "%{num} per page"
|
||||
|
||||
@@ -197,7 +197,7 @@ RSpec.describe 'As an enterprise user, I can manage my products' do
|
||||
search_for "searchable product"
|
||||
|
||||
expect(page).to have_field "search_term", with: "searchable product"
|
||||
expect(page).to have_content "1 products found for your search criteria. Showing 1 to 1."
|
||||
expect(page).to have_content "1 product found for your search criteria. Showing 1 to 1."
|
||||
expect_products_count_to_be 1
|
||||
end
|
||||
|
||||
@@ -216,7 +216,7 @@ RSpec.describe 'As an enterprise user, I can manage my products' do
|
||||
search_for "searchable product"
|
||||
|
||||
expect(page).to have_field "search_term", with: "searchable product"
|
||||
expect(page).to have_content "1 products found for your search criteria. Showing 1 to 1."
|
||||
expect(page).to have_content "1 product found for your search criteria. Showing 1 to 1."
|
||||
expect_products_count_to_be 1
|
||||
end
|
||||
|
||||
@@ -229,7 +229,7 @@ RSpec.describe 'As an enterprise user, I can manage my products' do
|
||||
search_for "Big box"
|
||||
|
||||
expect(page).to have_field "search_term", with: "Big box"
|
||||
expect(page).to have_content "1 products found for your search criteria. Showing 1 to 1."
|
||||
expect(page).to have_content "1 product found for your search criteria. Showing 1 to 1."
|
||||
expect_products_count_to_be 1
|
||||
end
|
||||
|
||||
@@ -246,7 +246,7 @@ RSpec.describe 'As an enterprise user, I can manage my products' do
|
||||
expect_per_page_to_be 15
|
||||
expect_products_count_to_be 1
|
||||
search_for "searchable product"
|
||||
expect(page).to have_content "1 products found for your search criteria. Showing 1 to 1."
|
||||
expect(page).to have_content "1 product found for your search criteria. Showing 1 to 1."
|
||||
expect_products_count_to_be 1
|
||||
end
|
||||
|
||||
@@ -256,7 +256,7 @@ RSpec.describe 'As an enterprise user, I can manage my products' do
|
||||
|
||||
search_for "searchable product"
|
||||
expect(page).to have_field "search_term", with: "searchable product"
|
||||
expect(page).to have_content "1 products found for your search criteria. Showing 1 to 1."
|
||||
expect(page).to have_content "1 product found for your search criteria. Showing 1 to 1."
|
||||
expect_products_count_to_be 1
|
||||
expect(page).to have_field "Name", with: product_by_name.name
|
||||
|
||||
@@ -348,7 +348,7 @@ RSpec.describe 'As an enterprise user, I can manage my products' do
|
||||
|
||||
search_by_category "Category 1"
|
||||
|
||||
expect(page).to have_content "1 products found for your search criteria. Showing 1 to 1."
|
||||
expect(page).to have_content "1 product found for your search criteria. Showing 1 to 1."
|
||||
expect(page).to have_select "category_id", selected: "Category 1"
|
||||
expect_products_count_to_be 1
|
||||
expect(page).to have_field "Name", with: product_by_category.name
|
||||
|
||||
Reference in New Issue
Block a user