Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Pluralize admin products search result [OFN-12532]" #12730

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/admin/products_v3/_sort.html.haml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#sort
%div.pagination-description
- if pagy.present?
= t(".pagination.total_html", count: pagy.count, from: pagy.from, to: pagy.to)
= t(".pagination.total_html", total: 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" } }
Expand Down
1 change: 1 addition & 0 deletions config/locales/ca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,7 @@ ca:
search: Cerca
sort:
pagination:
total_html: "<strong>%{total} productes</strong> trobats pels vostres criteris de cerca. Mostrant de %{from} a %{to} ."
per_page:
show: Mostra
per_page: "%{num} per pàgina"
Expand Down
1 change: 1 addition & 0 deletions config/locales/cy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@ cy:
search: Chwilio
sort:
pagination:
total_html: "<strong>%{total}Cafwyd hyd i </strong> cynnyrch ar gyfer eich meini prawf chwilio. Yn dangos %{from} i %{to}."
per_page:
show: Dangos
per_page: "%{num} fesul tudalen"
Expand Down
1 change: 1 addition & 0 deletions config/locales/el.yml
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,7 @@ el:
search: Αναζήτηση
sort:
pagination:
total_html: "<strong>%{total}προϊόντα</strong> βρέθηκαν σύμφωνα με τα κριτήρια της αναζήτησής σας. Εμφανίζονται %{from} στα %{to}."
per_page:
show: Εμφάνιση
per_page: "%{num}ανα σελίδα"
Expand Down
4 changes: 1 addition & 3 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -880,9 +880,7 @@ en:
search: Search
sort:
pagination:
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}."
total_html: "<strong>%{total} products</strong> found for your search criteria. Showing %{from} to %{to}."
per_page:
show: Show
per_page: "%{num} per page"
Expand Down
5 changes: 1 addition & 4 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -811,10 +811,7 @@ fr:
search: Rechercher
sort:
pagination:
total_html:
one: "<strong>%{count} produit</strong> trouvé pour vos critères de recherche. Affichage %{from} à %{to} ."
many: "<strong>%{count} produits</strong> trouvés pour vos critères de recherche. Affichage %{from} à %{to} ."
other: "<strong>%{count} produits</strong> trouvés pour vos critères de recherche. Affichage %{from} à %{to} ."
total_html: "<strong>%{total} produits</strong> trouvés selon vos critères de recherche. Résultats %{from} à %{to}."
per_page:
show: Montrer
per_page: "%{num} par page"
Expand Down
1 change: 1 addition & 0 deletions config/locales/hi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,7 @@ hi:
search: सर्च
sort:
pagination:
total_html: "<strong>%{total} उत्पाद</strong> आपके सर्च क्राइटेरिया के लिए मिले। %{from} से %{to} दिखा रहा है।"
per_page:
show: दिखाएं
per_page: "%{num} प्रति पेज"
Expand Down
1 change: 1 addition & 0 deletions config/locales/hu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,7 @@ hu:
search: Keresés
sort:
pagination:
total_html: "<strong>%{total} terméket </strong> találtunk a keresési feltételek alapján. %{from}-től %{to}-ig mutat."
per_page:
show: Mutasd
per_page: "%{num}per oldal"
Expand Down
1 change: 1 addition & 0 deletions config/locales/ml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@ ml:
search: തിരയുക
sort:
pagination:
total_html: "നിങ്ങളുടെ തിരയൽ മാനദണ്ഡങ്ങൾക്കനുസരിച്ച് <strong>%{total} ഉൽപ്പന്നങ്ങൾ</strong> കണ്ടെത്തി. %{from} മുതൽ %{to} വരെ കാണിക്കുന്നു."
per_page:
show: കാണിക്കുക
per_page: "ഓരോ പേജിലും %{num}"
Expand Down
1 change: 1 addition & 0 deletions config/locales/mr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,7 @@ mr:
search: शोधा
sort:
pagination:
total_html: "तुमच्या शोध निकषांसाठी <strong>%{total} उत्पादने</strong> आढळली. %{from} ते %{to} दाखवत आहे."
per_page:
show: दाखवा
per_page: "%{num} प्रति पृष्ठ"
Expand Down
1 change: 1 addition & 0 deletions config/locales/nb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,7 @@ nb:
search: Søk
sort:
pagination:
total_html: "<strong>%{total} produkter</strong> funnet for søkekriteriene dine. Viser %{from} til %{to} ."
per_page:
show: Vis
per_page: "%{num} per side"
Expand Down
1 change: 1 addition & 0 deletions config/locales/pa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,7 @@ pa:
search: ਖੋਜੋ
sort:
pagination:
total_html: "ਤੁਹਾਡੇ ਖੋਜ ਮਾਪਦੰਡ ਲਈ <strong>%{total} ਉਤਪਾਦ</strong> ਮਿਲੇ ਹਨ। %{from} ਤੋਂ %{to} ਦਿਖਾ ਰਹੇ ਹਨ।"
per_page:
show: ਵਿਖਾਓ
per_page: "%{num} ਪ੍ਰਤੀ ਪੇਜ"
Expand Down
1 change: 1 addition & 0 deletions config/locales/ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,7 @@ ru:
search: Поиск
sort:
pagination:
total_html: "<strong>%{total} товаров</strong> найдено по вашим критериям поиска. Показаны %{from} до %{to} ."
per_page:
show: Показывать
per_page: "%{num} на странице"
Expand Down
12 changes: 6 additions & 6 deletions spec/system/admin/products_v3/index_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
search_for "searchable product"

expect(page).to have_field "search_term", with: "searchable product"
expect(page).to have_content "1 product found for your search criteria. Showing 1 to 1."
expect(page).to have_content "1 products found for your search criteria. Showing 1 to 1."
expect_products_count_to_be 1
end

Expand All @@ -216,7 +216,7 @@
search_for "searchable product"

expect(page).to have_field "search_term", with: "searchable product"
expect(page).to have_content "1 product found for your search criteria. Showing 1 to 1."
expect(page).to have_content "1 products found for your search criteria. Showing 1 to 1."
expect_products_count_to_be 1
end

Expand All @@ -229,7 +229,7 @@
search_for "Big box"

expect(page).to have_field "search_term", with: "Big box"
expect(page).to have_content "1 product found for your search criteria. Showing 1 to 1."
expect(page).to have_content "1 products found for your search criteria. Showing 1 to 1."
expect_products_count_to_be 1
end

Expand All @@ -246,7 +246,7 @@
expect_per_page_to_be 15
expect_products_count_to_be 1
search_for "searchable product"
expect(page).to have_content "1 product found for your search criteria. Showing 1 to 1."
expect(page).to have_content "1 products found for your search criteria. Showing 1 to 1."
expect_products_count_to_be 1
end

Expand All @@ -256,7 +256,7 @@

search_for "searchable product"
expect(page).to have_field "search_term", with: "searchable product"
expect(page).to have_content "1 product found for your search criteria. Showing 1 to 1."
expect(page).to have_content "1 products 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

Expand Down Expand Up @@ -348,7 +348,7 @@

search_by_category "Category 1"

expect(page).to have_content "1 product found for your search criteria. Showing 1 to 1."
expect(page).to have_content "1 products 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
Expand Down
Loading