spree_mobility 1.1.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.md +1 -1
- data/README.md +11 -2
- data/app/assets/javascripts/spree/backend/taxon_tree_menu.js +2 -2
- data/app/assets/javascripts/spree/backend/translations.js +2 -2
- data/app/controllers/spree/admin/payment_method_translations_controller.rb +25 -0
- data/app/overrides/spree/admin/option_types/_option_value_fields/add_translation.rb +2 -2
- data/app/overrides/spree/admin/option_types/index/add_translation.rb +2 -2
- data/app/overrides/spree/admin/payment_methods/index/add_translation.rb +8 -0
- data/app/overrides/spree/admin/product_properties/_product_property_fields/add_translation.rb +2 -2
- data/app/overrides/spree/admin/promotions/index/add_translation_link.rb +2 -2
- data/app/overrides/spree/admin/properties/index/add_translation.rb +2 -2
- data/app/overrides/spree/admin/shipping_methods/index/add_translation.rb +2 -2
- data/app/overrides/spree/admin/taxonomies/_list/add_translations.rb +2 -2
- data/app/views/spree/admin/translations/_fields.html.erb +3 -2
- data/app/views/spree/admin/translations/_form_fields.html.erb +6 -5
- data/app/views/spree/admin/translations/payment_method.html.erb +21 -0
- data/config/initializers/enable_extensions.rb +1 -1
- data/config/routes.rb +1 -0
- data/db/migrate/20220309003419_add_translations_to_payment_method.rb +54 -0
- data/lib/spree_mobility/core_ext/spree/payment_method_decorator.rb +10 -0
- data/lib/spree_mobility/version.rb +1 -1
- data/lib/spree_mobility.rb +19 -3
- data/spec/models/translated_models_spec.rb +4 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b978eb059a4af42b54b7972c52ca54a3c05e5bf2e1a1e6c184472da2298c555
|
4
|
+
data.tar.gz: '0748c01ed29ce8e98ae2e68b707d540d4e97066fb744f679f9e86087cfe555e9'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97541ca9b86a4a59632852d1ddd9c98c51dbfa82db2818e534ea4651754f85247efa9aa04df4ace9c5680639c1cef7b466e0d6ad7350fd548251ed1ec4da9232
|
7
|
+
data.tar.gz: 4fdae65ac633438659005a07fb4d9c6f62245c4fe4b566bc2b29f01c427253fc0916a6b54db3bc6c0908218e4df95f9ec35dcd12e622869f7cec0d061ae86960
|
data/LICENSE.md
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@ This is a Spree model translation gem based on `spree_globalize` for [Spree Comm
|
|
4
4
|
It uses `mobility` instead of `globalize`, since `globalize` is not actively developed anymore.
|
5
5
|
It is a drop-in replacement for `spree_globalize` and will use your existing translations.
|
6
6
|
|
7
|
-
Currently, this gem is tested with Spree 4.3.1.
|
7
|
+
Currently, this gem is tested with Spree 4.3.1. Since version 1.3, it should also work with Spree 4.4.
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -34,6 +34,15 @@ Mobility.configure do
|
|
34
34
|
end
|
35
35
|
```
|
36
36
|
|
37
|
+
## Spree 4.3.x
|
38
|
+
|
39
|
+
It seems there is a bug in spree_backend v4.3.x (before v4.4), which prevents translation links working correctly.
|
40
|
+
To fix this, add to the bottom of `vendor/assets/javascripts/spree/backend/all.js`:
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
$(document).trigger('page:load');
|
44
|
+
```
|
45
|
+
|
37
46
|
---
|
38
47
|
|
39
48
|
## Improvements over spree_globalize
|
@@ -59,7 +68,7 @@ For more localization features, see my `better_spree_localization` gem.
|
|
59
68
|
This feature uses the [Mobility][3] gem to localize model data.
|
60
69
|
So far the following models are translatable:
|
61
70
|
|
62
|
-
Product, Promotion, OptionType, Taxonomy, Taxon, Property, Store and
|
71
|
+
Product, Promotion, OptionType, Taxonomy, Taxon, Property, Store, ShippingMethod and PaymentMethod.
|
63
72
|
|
64
73
|
Start your server and you should see a TRANSLATIONS link or a flag icon on each
|
65
74
|
admin section that supports this feature.
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Spree
|
2
|
+
module Admin
|
3
|
+
class PaymentMethodTranslationsController < Spree::Admin::BaseController
|
4
|
+
def translate
|
5
|
+
# Need to manually update translations, otherwise Rails
|
6
|
+
# accepts_nested_attributes_for in combination with current mobility
|
7
|
+
# implementation has some problems with the subclasses used with
|
8
|
+
# PaymentMethods
|
9
|
+
payment_method = Spree::PaymentMethod.find(params[:id])
|
10
|
+
|
11
|
+
translations_params =
|
12
|
+
params.require(:payment_method).permit(
|
13
|
+
[translations_attributes: [:id, :locale, :name, :description]])
|
14
|
+
|
15
|
+
payment_method.translations.delete_all
|
16
|
+
translations_params[:translations_attributes].each_pair do |k, value|
|
17
|
+
payment_method.translations.create(value)
|
18
|
+
end
|
19
|
+
|
20
|
+
flash[:success] = Spree.t(:successfully_updated, resource: Spree.t(:payment_method))
|
21
|
+
redirect_to spree.edit_admin_payment_method_path(payment_method)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
Deface::Override.new(
|
2
2
|
virtual_path: 'spree/admin/option_types/_option_value_fields',
|
3
3
|
name: 'option_value_translation',
|
4
|
-
insert_bottom: 'td.actions',
|
4
|
+
insert_bottom: 'td.actions > span:first',
|
5
5
|
text: <<-HTML
|
6
6
|
<% if f.object.persisted? %>
|
7
|
-
<%= link_to_with_icon 'translate', nil, spree.admin_translations_path('option_values', f.object.id), title: Spree.t(:'i18n.translations'), class: 'btn btn-sm btn-primary' %>
|
7
|
+
<%= link_to_with_icon 'translate', nil, spree.admin_translations_path('option_values', f.object.id), title: Spree.t(:'i18n.translations'), class: 'btn btn-sm btn-primary', no_text: true %>
|
8
8
|
<% end %>
|
9
9
|
HTML
|
10
10
|
)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
Deface::Override.new(
|
2
2
|
virtual_path: 'spree/admin/option_types/index',
|
3
3
|
name: 'option_types_index_translation',
|
4
|
-
insert_top: 'td.actions',
|
4
|
+
insert_top: 'td.actions > span:first',
|
5
5
|
text: <<-HTML
|
6
|
-
<%= link_to_with_icon 'translate', nil, spree.admin_translations_path('option_types', option_type.id), title: Spree.t(:'i18n.translations'), class: 'btn btn-sm btn-primary' %>
|
6
|
+
<%= link_to_with_icon 'translate', nil, spree.admin_translations_path('option_types', option_type.id), title: Spree.t(:'i18n.translations'), class: 'btn btn-sm btn-primary', no_text: true %>
|
7
7
|
HTML
|
8
8
|
)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
Deface::Override.new(
|
2
|
+
virtual_path: 'spree/admin/payment_methods/index',
|
3
|
+
name: 'payment_methods_translation',
|
4
|
+
insert_bottom: 'td.actions > span:first',
|
5
|
+
text: <<-HTML
|
6
|
+
<%= link_to_with_icon 'translate', nil, spree.admin_translations_path('payment_methods', method.id), title: Spree.t(:'i18n.translations'), class: 'btn btn-sm btn-primary', no_text: true %>
|
7
|
+
HTML
|
8
|
+
)
|
data/app/overrides/spree/admin/product_properties/_product_property_fields/add_translation.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
Deface::Override.new(
|
2
2
|
virtual_path: 'spree/admin/product_properties/_product_property_fields',
|
3
3
|
name: 'product_property_translation',
|
4
|
-
insert_bottom: 'td.actions',
|
4
|
+
insert_bottom: 'td.actions > span:first',
|
5
5
|
text: <<-HTML
|
6
6
|
<% if f.object.persisted? %>
|
7
|
-
<%= link_to_with_icon 'translate', nil, spree.admin_translations_path('product_property', f.object.id), title: Spree.t(:'i18n.translations'), class: 'btn btn-sm btn-primary' %>
|
7
|
+
<%= link_to_with_icon 'translate', nil, spree.admin_translations_path('product_property', f.object.id), title: Spree.t(:'i18n.translations'), class: 'btn btn-sm btn-primary', no_text: true %>
|
8
8
|
<% end %>
|
9
9
|
HTML
|
10
10
|
)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
Deface::Override.new(
|
2
2
|
virtual_path: 'spree/admin/promotions/index',
|
3
3
|
name: 'promotions_translation',
|
4
|
-
insert_bottom: 'td.actions',
|
4
|
+
insert_bottom: 'td.actions > span:first',
|
5
5
|
text: <<-HTML
|
6
|
-
<%= link_to_with_icon 'translate', nil, spree.admin_translations_path('promotions', promotion.id), title: Spree.t(:'i18n.translations'), class: 'btn btn-sm btn-primary' %>
|
6
|
+
<%= link_to_with_icon 'translate', nil, spree.admin_translations_path('promotions', promotion.id), title: Spree.t(:'i18n.translations'), class: 'btn btn-sm btn-primary', no_text: true %>
|
7
7
|
HTML
|
8
8
|
)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
Deface::Override.new(
|
2
2
|
virtual_path: 'spree/admin/properties/index',
|
3
3
|
name: 'properties_translation',
|
4
|
-
insert_bottom: 'td.actions',
|
4
|
+
insert_bottom: 'td.actions > span:first',
|
5
5
|
text: <<-HTML
|
6
|
-
<%= link_to_with_icon 'translate', nil, spree.admin_translations_path('properties', property.id), title: Spree.t(:'i18n.translations'), class: 'btn btn-sm btn-primary' %>
|
6
|
+
<%= link_to_with_icon 'translate', nil, spree.admin_translations_path('properties', property.id), title: Spree.t(:'i18n.translations'), class: 'btn btn-sm btn-primary', no_text: true %>
|
7
7
|
HTML
|
8
8
|
)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
Deface::Override.new(
|
2
2
|
virtual_path: 'spree/admin/shipping_methods/index',
|
3
3
|
name: 'shipping_methods_translation',
|
4
|
-
insert_bottom: 'td.actions',
|
4
|
+
insert_bottom: 'td.actions > span:first',
|
5
5
|
text: <<-HTML
|
6
|
-
<%= link_to_with_icon 'translate', nil, spree.admin_translations_path('shipping_methods', shipping_method.id), title: Spree.t(:'i18n.translations'), class: 'btn btn-sm btn-primary' %>
|
6
|
+
<%= link_to_with_icon 'translate', nil, spree.admin_translations_path('shipping_methods', shipping_method.id), title: Spree.t(:'i18n.translations'), class: 'btn btn-sm btn-primary', no_text: true %>
|
7
7
|
HTML
|
8
8
|
)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
Deface::Override.new(
|
2
2
|
virtual_path: 'spree/admin/taxonomies/_list',
|
3
3
|
name: 'taxonomies_translation',
|
4
|
-
insert_bottom: 'td.actions',
|
4
|
+
insert_bottom: 'td.actions > span:first',
|
5
5
|
text: <<-HTML
|
6
|
-
<%= link_to_with_icon 'translate', nil, spree.admin_translations_path('taxonomies', taxonomy.id), title: Spree.t(:'i18n.translations'), class: 'btn btn-sm btn-primary' %>
|
6
|
+
<%= link_to_with_icon 'translate', nil, spree.admin_translations_path('taxonomies', taxonomy.id), title: Spree.t(:'i18n.translations'), class: 'btn btn-sm btn-primary', no_text: true %>
|
7
7
|
HTML
|
8
8
|
)
|
@@ -1,11 +1,12 @@
|
|
1
|
+
<% resource_class ||= @resource.class %>
|
1
2
|
<div class="panel panel-default fields">
|
2
3
|
<div class="panel-heading">
|
3
4
|
<%= Spree.t(:'i18n.fields') %>
|
4
5
|
</div>
|
5
6
|
<div class="list-group" id="attr_list">
|
6
|
-
<%
|
7
|
+
<% resource_class.mobility_attributes.each_with_index do |attr, i| %>
|
7
8
|
<a class="list-group-item <%= 'active' if i.zero? %>" data-attr="<%= attr %>" href="#">
|
8
|
-
<%=
|
9
|
+
<%= resource_class.human_attribute_name(attr) %>
|
9
10
|
</a>
|
10
11
|
<% end %>
|
11
12
|
</div>
|
@@ -1,11 +1,12 @@
|
|
1
|
+
<% resource_class ||= @resource.class %>
|
1
2
|
<div id="attr_fields">
|
2
3
|
<% available_locales.each do |locale| %>
|
3
4
|
<%= f.mobility_fields_for locale.to_sym do |g| %>
|
4
|
-
<%
|
5
|
+
<% resource_class.mobility_attributes.each_with_index do |attr, i| %>
|
5
6
|
<div class="panel panel-default <%= attr %> <%= locale %>" style="display:<%= i == 0 ? 'auto' : 'none' %>;">
|
6
7
|
<div class="panel-heading">
|
7
8
|
<% I18n.with_locale(locale) do %>
|
8
|
-
<%=
|
9
|
+
<%= resource_class.human_attribute_name(attr) %>
|
9
10
|
|
10
11
|
<div class="pull-right text-muted">
|
11
12
|
<small><i><%= Spree.t(:'i18n.this_file_language') %></i></small>
|
@@ -14,11 +15,11 @@
|
|
14
15
|
</div>
|
15
16
|
|
16
17
|
<div class="panel-body">
|
17
|
-
<% field_type =
|
18
|
+
<% field_type = resource_class.translation_class.columns_hash[attr.to_s].type %>
|
18
19
|
<% if @resource.kind_of?(Spree::Product) && attr.to_sym == :description %>
|
19
|
-
<%= g.text_area :description, { rows: "30", class: "form-control #{"spree-rte" if
|
20
|
+
<%= g.text_area :description, { rows: "30", class: "form-control #{"spree-rte" if SpreeMobility.product_wysiwyg_editor_enabled? }" } %>
|
20
21
|
<% elsif @resource.kind_of?(Spree::Taxon) && attr.to_sym == :description %>
|
21
|
-
<%= g.text_area :description, { rows: "30", class: "form-control #{"spree-rte" if
|
22
|
+
<%= g.text_area :description, { rows: "30", class: "form-control #{"spree-rte" if SpreeMobility.taxon_wysiwyg_editor_enabled? }" } %>
|
22
23
|
<% elsif field_type == :text %>
|
23
24
|
<%= g.text_area attr, class: 'form-control', rows: 4 %>
|
24
25
|
<% else %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<% content_for :page_title do %>
|
2
|
+
<%= Spree.t(:editing_resource, resource: Spree::PaymentMethod.model_name.human) %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :page_actions do %>
|
6
|
+
<%= button_link_to Spree.t(:back_to_resource_list, resource: Spree::PaymentMethod.model_name.human), spree.admin_payment_methods_path, class: 'btn-primary', :icon => 'arrow-left' %>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<%= render 'settings' %>
|
10
|
+
|
11
|
+
<div class="row translations">
|
12
|
+
<div class="col-md-4">
|
13
|
+
<%= render 'fields', resource_class: Spree::PaymentMethod %>
|
14
|
+
</div>
|
15
|
+
<div class="col-md-8">
|
16
|
+
<%= form_for [:admin, @resource], url: admin_translate_payment_method_path(@resource), as: :payment_method do |f| %>
|
17
|
+
<%= render 'form_fields', f: f, resource_class: Spree::PaymentMethod %>
|
18
|
+
<%= render 'spree/admin/shared/edit_resource_links' %>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
21
|
+
</div>
|
@@ -16,10 +16,10 @@ Rails.application.config.to_prepare do
|
|
16
16
|
SpreeMobility.prepend_once(::Spree::Promotion, SpreeMobility::CoreExt::Spree::PromotionDecorator)
|
17
17
|
SpreeMobility.prepend_once(::Spree::Property, SpreeMobility::CoreExt::Spree::PropertyDecorator)
|
18
18
|
SpreeMobility.prepend_once(::Spree::ShippingMethod, SpreeMobility::CoreExt::Spree::ShippingMethodDecorator)
|
19
|
+
SpreeMobility.prepend_once(::Spree::PaymentMethod, SpreeMobility::CoreExt::Spree::PaymentMethodDecorator)
|
19
20
|
SpreeMobility.prepend_once(::Spree::Store, SpreeMobility::CoreExt::Spree::StoreDecorator)
|
20
21
|
SpreeMobility.prepend_once(::Spree::Taxon, SpreeMobility::CoreExt::Spree::TaxonDecorator)
|
21
22
|
SpreeMobility.prepend_once(::Spree::Taxonomy, SpreeMobility::CoreExt::Spree::TaxonomyDecorator)
|
22
23
|
SpreeMobility.prepend_once(::Spree::Variant.singleton_class, SpreeMobility::CoreExt::Spree::VariantDecorator::ClassMethods)
|
23
24
|
SpreeMobility.prepend_once(::Spree::Products::Find, SpreeMobility::CoreExt::Spree::Products::FindWithMobilityDecorator)
|
24
25
|
end
|
25
|
-
|
data/config/routes.rb
CHANGED
@@ -3,5 +3,6 @@ Spree::Core::Engine.add_routes do
|
|
3
3
|
get '/:resource/:resource_id/translations' => 'translations#index', as: :translations
|
4
4
|
patch '/option_values/:id' => 'option_values#update', as: :option_type_option_value
|
5
5
|
patch 'product/:id/product_properties/:id' => "product_properties#translate", as: :translate_product_property
|
6
|
+
patch 'payment_methods/:id/translate' => "payment_method_translations#translate", as: :translate_payment_method
|
6
7
|
end
|
7
8
|
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
class AddTranslationsToPaymentMethod < SpreeExtension::Migration[4.2]
|
2
|
+
def up
|
3
|
+
unless table_exists?(:spree_payment_method_translations)
|
4
|
+
params = { name: :string, description: :text }
|
5
|
+
create_translation_table(:spree_payment_method, params)
|
6
|
+
migrate_data(Spree::PaymentMethod, params)
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def down
|
11
|
+
drop_table :spree_payment_method_translations
|
12
|
+
end
|
13
|
+
|
14
|
+
protected
|
15
|
+
|
16
|
+
def create_translation_table(table, params)
|
17
|
+
create_table :"#{table}_translations" do |t|
|
18
|
+
|
19
|
+
# Translated attribute(s)
|
20
|
+
params.each_pair do |attr, attr_type|
|
21
|
+
t.send attr_type, attr
|
22
|
+
end
|
23
|
+
|
24
|
+
t.string :locale, null: false
|
25
|
+
t.references table, null: false, foreign_key: true, index: false
|
26
|
+
|
27
|
+
t.timestamps null: false
|
28
|
+
end
|
29
|
+
|
30
|
+
add_index :"#{table}_translations", :locale, name: :"index_#{table}_translations_on_locale"
|
31
|
+
add_index :"#{table}_translations", [:"#{table}_id", :locale], name: :"index_#{table}_translations_on_id_and_locale", unique: true
|
32
|
+
end
|
33
|
+
|
34
|
+
def migrate_data(model_klass, fields)
|
35
|
+
store = Spree::Store.unscoped.first
|
36
|
+
return unless store
|
37
|
+
default_locale = store.default_locale.to_s
|
38
|
+
field_names = fields.keys + ['created_at', 'updated_at']
|
39
|
+
translation_table = "#{model_klass.table_name.singularize}_translations"
|
40
|
+
foreign_key = "#{model_klass.table_name.singularize}_id"
|
41
|
+
|
42
|
+
# In case we are migrating from Globalize with existing translations, skip this step
|
43
|
+
return if ActiveRecord::Base.connection.execute("SELECT id FROM #{translation_table}").any?
|
44
|
+
ActiveRecord::Base.connection.execute("SELECT id, #{field_names.join(',')} FROM #{model_klass.table_name}").each do |r|
|
45
|
+
field_values =
|
46
|
+
field_names.each_with_object([]) do |field_name, a|
|
47
|
+
a << r[field_name.to_s]
|
48
|
+
end
|
49
|
+
|
50
|
+
ActiveRecord::Base.connection.execute(ActiveRecord::Base.sanitize_sql_array(["INSERT INTO #{translation_table} (locale, #{foreign_key}, #{field_names.join(',')}) VALUES (?,?,#{(['?'] * field_names.size).join(',')})",
|
51
|
+
default_locale.to_s, r['id'], *field_values]))
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module SpreeMobility::CoreExt::Spree::PaymentMethodDecorator
|
2
|
+
def self.prepended(base)
|
3
|
+
base.include SpreeMobility::Translatable
|
4
|
+
SpreeMobility.translates_for base, :name, :description
|
5
|
+
|
6
|
+
base.translation_class.class_eval do
|
7
|
+
validates :name, presence: true
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
data/lib/spree_mobility.rb
CHANGED
@@ -9,13 +9,13 @@ module SpreeMobility
|
|
9
9
|
def self.prepend_once(to_klass, klass)
|
10
10
|
to_klass.prepend(klass) unless to_klass.ancestors.include?(klass)
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
def self.clear_validations_for(klass, *attrs)
|
14
14
|
attrs.each do |attr|
|
15
15
|
klass.validators_on(attr).each { |val| val.attributes.delete(attr) }
|
16
16
|
end
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
def self.translates_for(klass, *attrs)
|
20
20
|
klass.translates(*attrs)
|
21
21
|
klass.accepts_nested_attributes_for :translations
|
@@ -44,4 +44,20 @@ module SpreeMobility
|
|
44
44
|
end
|
45
45
|
result
|
46
46
|
end
|
47
|
-
|
47
|
+
|
48
|
+
def self.product_wysiwyg_editor_enabled?
|
49
|
+
spree_backend_config :product_wysiwyg_editor_enabled
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.taxon_wysiwyg_editor_enabled?
|
53
|
+
spree_backend_config :taxon_wysiwyg_editor_enabled
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.spree_backend_config(key)
|
57
|
+
if defined?(Spree::Backend::Config) && Spree::Backend::Config.has_preference?(key)
|
58
|
+
Spree::Backend::Config[key]
|
59
|
+
else
|
60
|
+
Spree::Config[key]
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_mobility
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Berdajs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|
@@ -194,6 +194,7 @@ files:
|
|
194
194
|
- app/assets/javascripts/spree/backend/translations.js
|
195
195
|
- app/controllers/concerns/spree_mobility/controller_mobility_helper.rb
|
196
196
|
- app/controllers/spree/admin/option_values_controller_decorator.rb
|
197
|
+
- app/controllers/spree/admin/payment_method_translations_controller.rb
|
197
198
|
- app/controllers/spree/admin/product_properties_controller_decorator.rb
|
198
199
|
- app/controllers/spree/admin/shipping_methods_controller_decorator.rb
|
199
200
|
- app/controllers/spree/admin/translations_controller.rb
|
@@ -203,6 +204,7 @@ files:
|
|
203
204
|
- app/models/concerns/spree_mobility/translatable.rb
|
204
205
|
- app/overrides/spree/admin/option_types/_option_value_fields/add_translation.rb
|
205
206
|
- app/overrides/spree/admin/option_types/index/add_translation.rb
|
207
|
+
- app/overrides/spree/admin/payment_methods/index/add_translation.rb
|
206
208
|
- app/overrides/spree/admin/product_properties/_product_property_fields/add_translation.rb
|
207
209
|
- app/overrides/spree/admin/promotions/index/add_translation_link.rb
|
208
210
|
- app/overrides/spree/admin/properties/index/add_translation.rb
|
@@ -217,6 +219,7 @@ files:
|
|
217
219
|
- app/views/spree/admin/translations/_settings.html.erb
|
218
220
|
- app/views/spree/admin/translations/option_type.html.erb
|
219
221
|
- app/views/spree/admin/translations/option_value.html.erb
|
222
|
+
- app/views/spree/admin/translations/payment_method.html.erb
|
220
223
|
- app/views/spree/admin/translations/product.html.erb
|
221
224
|
- app/views/spree/admin/translations/product_property.html.erb
|
222
225
|
- app/views/spree/admin/translations/promotion.html.erb
|
@@ -237,6 +240,7 @@ files:
|
|
237
240
|
- config/locales/ru.yml
|
238
241
|
- config/locales/zh-TW.yml
|
239
242
|
- config/routes.rb
|
243
|
+
- db/migrate/20220309003419_add_translations_to_payment_method.rb
|
240
244
|
- db/migrate/20220411041407_add_translations_to_main_models.rb
|
241
245
|
- db/migrate/20220412095648_remove_null_constraints_from_spree_tables.rb
|
242
246
|
- db/migrate/20220413095648_migrate_translation_data.rb
|
@@ -248,6 +252,7 @@ files:
|
|
248
252
|
- lib/spree_mobility/core_ext/mobility/backends/active_record/table/mobility_acts_as_paranoid_decorator.rb
|
249
253
|
- lib/spree_mobility/core_ext/spree/option_type_decorator.rb
|
250
254
|
- lib/spree_mobility/core_ext/spree/option_value_decorator.rb
|
255
|
+
- lib/spree_mobility/core_ext/spree/payment_method_decorator.rb
|
251
256
|
- lib/spree_mobility/core_ext/spree/product_decorator.rb
|
252
257
|
- lib/spree_mobility/core_ext/spree/product_property_decorator.rb
|
253
258
|
- lib/spree_mobility/core_ext/spree/product_scopes_with_mobility_decorator.rb
|