From a73db14e5a6ff4b8b303039115b25249385ee646 Mon Sep 17 00:00:00 2001
From: kpokorski
Date: Fri, 18 Aug 2023 12:57:28 +0200
Subject: [PATCH 1/2] Added different message to import with API.
---
app/views/spree/admin/dashboard/_getting_started.html.erb | 2 +-
config/locales/en.yml | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/views/spree/admin/dashboard/_getting_started.html.erb b/app/views/spree/admin/dashboard/_getting_started.html.erb
index abd589f962..c5aab4e26a 100644
--- a/app/views/spree/admin/dashboard/_getting_started.html.erb
+++ b/app/views/spree/admin/dashboard/_getting_started.html.erb
@@ -44,7 +44,7 @@
<%= Spree.t('admin.gettting_started.products_section.message_with_products_html', count: current_store.products.count ) %>
<% else %>
- <%= Spree.t('admin.gettting_started.products_section.message_without_products') %>
+ <%= Spree.t('admin.gettting_started.products_section.message_without_products', link: link_to(Spree.t('admin.gettting_started.products_section.import_message'), 'https://api.spreecommerce.org/docs/api-v2/27527143a4edf-create-a-product')).html_safe %>
<%= link_to_with_icon 'add.svg', Spree.t('admin.gettting_started.add_products'), spree.admin_products_path, class: 'btn btn-success btn-sm mb-2' %>
<% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 851164a0e4..2a7ad2d1c1 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -326,7 +326,8 @@ en:
setup_taxes_calculation: Setup tax calculation
products_section:
message_with_products_html: You have added %{count} products so far - good job!
- message_without_products: You can add products manually through API or import from a CSV file.
+ message_without_products: You can add products manually or %{link}
+ import_message: import them via the API.
shipping_section:
message_with_shipping: You have setup shipping for
message_without_shipping: You can add multiple shipping methods, different for each country, continent or region.
From 1860cab1c5b4b9580c397ed367ef7ceb9f55f3e1 Mon Sep 17 00:00:00 2001
From: kpokorski
Date: Thu, 24 Aug 2023 14:10:29 +0200
Subject: [PATCH 2/2] Changed the way link is saved
---
app/views/spree/admin/dashboard/_getting_started.html.erb | 3 ++-
config/locales/en.yml | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/views/spree/admin/dashboard/_getting_started.html.erb b/app/views/spree/admin/dashboard/_getting_started.html.erb
index c5aab4e26a..9fe6e3fadc 100644
--- a/app/views/spree/admin/dashboard/_getting_started.html.erb
+++ b/app/views/spree/admin/dashboard/_getting_started.html.erb
@@ -44,7 +44,8 @@
<%= Spree.t('admin.gettting_started.products_section.message_with_products_html', count: current_store.products.count ) %>
<% else %>
- <%= Spree.t('admin.gettting_started.products_section.message_without_products', link: link_to(Spree.t('admin.gettting_started.products_section.import_message'), 'https://api.spreecommerce.org/docs/api-v2/27527143a4edf-create-a-product')).html_safe %>
+ <%= Spree.t('admin.gettting_started.products_section.message_without_products') %>
+ <%= link_to(Spree.t('admin.gettting_started.products_section.import_message'), 'https://api.spreecommerce.org/docs/api-v2/27527143a4edf-create-a-product') %>
<%= link_to_with_icon 'add.svg', Spree.t('admin.gettting_started.add_products'), spree.admin_products_path, class: 'btn btn-success btn-sm mb-2' %>
<% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 2a7ad2d1c1..0936fdc9d2 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -326,7 +326,7 @@ en:
setup_taxes_calculation: Setup tax calculation
products_section:
message_with_products_html: You have added %{count} products so far - good job!
- message_without_products: You can add products manually or %{link}
+ message_without_products: You can add products manually or
import_message: import them via the API.
shipping_section:
message_with_shipping: You have setup shipping for