Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

remove unwanted translation fields

nciemniak33b571bd1452
diff --git a/api/spec/requests/spree/api/v2/storefront/products_spec.rb b/api/spec/requests/spree/api/v2/storefront/products_spec.rb
index 650d62ac78..b105d7474f 100644
--- a/api/spec/requests/spree/api/v2/storefront/products_spec.rb
+++ b/api/spec/requests/spree/api/v2/storefront/products_spec.rb
@@ -170,15 +170,13 @@ describe 'API V2 Storefront Products Spec', type: :request do
# generate translations for default store
let!(:store) do
default_store = Spree::Store.default
+ default_store.default_locale = 'pl'
+
Mobility.with_locale(:pl) do
default_store.name = 'Spree Sklep Testowy'
- default_store.url = 'www.example.com'
default_store.mail_from_address = '[email protected]'
default_store.customer_support_email = '[email protected]'
default_store.new_order_notifications_email = '[email protected]'
- default_store.default_currency = 'PLN'
- default_store.supported_currencies = 'PLN'
- default_store.default_locale = 'pl'
end
default_store
diff --git a/core/app/models/spree/store.rb b/core/app/models/spree/store.rb
index 4b329f4c9d..953aa777f9 100644
--- a/core/app/models/spree/store.rb
+++ b/core/app/models/spree/store.rb
@@ -8,9 +8,9 @@ module Spree
include Spree::Security::Stores
end
- TRANSLATABLE_FIELDS = %i[name url meta_description meta_keywords seo_title default_currency
- supported_currencies facebook twitter instagram customer_support_email
- description address contact_phone new_order_notifications_email].freeze
+ TRANSLATABLE_FIELDS = %i[name meta_description meta_keywords seo_title facebook
+ twitter instagram customer_support_email description
+ address contact_phone new_order_notifications_email].freeze
translates(*TRANSLATABLE_FIELDS)
self::Translation.class_eval do
diff --git a/core/db/migrate/20230210142732_create_store_translations.rb b/core/db/migrate/20230210142732_create_store_translations.rb
index e0daa45a90..9b5269293b 100644
--- a/core/db/migrate/20230210142732_create_store_translations.rb
+++ b/core/db/migrate/20230210142732_create_store_translations.rb
@@ -6,9 +6,6 @@ class CreateStoreTranslations < ActiveRecord::Migration[6.1]
remove_index :spree_store_translations, column: :spree_store_id, if_exists: true
end
- add_column :spree_store_translations, :url, :string
- add_column :spree_store_translations, :default_currency, :string
- add_column :spree_store_translations, :supported_currencies, :string
add_column :spree_store_translations, :facebook, :string
add_column :spree_store_translations, :twitter, :string
add_column :spree_store_translations, :instagram, :string
@@ -21,12 +18,9 @@ class CreateStoreTranslations < ActiveRecord::Migration[6.1]
create_table :spree_store_translations do |t|
# Translated attribute(s)
t.string :name
- t.string :url
t.text :meta_description
t.text :meta_keywords
t.string :seo_title
- t.string :default_currency
- t.string :supported_currencies
t.string :facebook
t.string :twitter
t.string :instagram