spree_mobility 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/.hound.yml +21 -0
- data/.rspec +3 -0
- data/.rubocop.yml +7 -0
- data/.travis.yml +45 -0
- data/Appraisals +8 -0
- data/CONTRIBUTING.md +81 -0
- data/Gemfile +8 -0
- data/Guardfile +12 -0
- data/LICENSE.md +26 -0
- data/README.md +92 -0
- data/Rakefile +24 -0
- data/app/assets/javascripts/spree/backend/spree_mobility.js +2 -0
- data/app/assets/javascripts/spree/backend/taxon_tree_menu.js +49 -0
- data/app/assets/javascripts/spree/backend/translations.js +50 -0
- data/app/controllers/concerns/spree_mobility/controller_mobility_helper.rb +18 -0
- data/app/controllers/spree/admin/option_values_controller_decorator.rb +23 -0
- data/app/controllers/spree/admin/product_properties_controller_decorator.rb +22 -0
- data/app/controllers/spree/admin/shipping_methods_controller_decorator.rb +18 -0
- data/app/controllers/spree/admin/translations_controller.rb +53 -0
- data/app/controllers/spree/api/base_controller_decorator.rb +5 -0
- data/app/controllers/spree/base_controller_decorator.rb +5 -0
- data/app/helpers/spree_mobility/locale_helper.rb +11 -0
- data/app/models/concerns/spree_mobility/translatable.rb +63 -0
- data/app/overrides/spree/admin/option_types/_option_value_fields/add_translation.rb +10 -0
- data/app/overrides/spree/admin/option_types/index/add_translation.rb +8 -0
- data/app/overrides/spree/admin/product_properties/_product_property_fields/add_translation.rb +10 -0
- data/app/overrides/spree/admin/products/index/search_by_name_or_sku.rb +21 -0
- data/app/overrides/spree/admin/promotions/index/add_translation_link.rb +8 -0
- data/app/overrides/spree/admin/properties/index/add_translation.rb +8 -0
- data/app/overrides/spree/admin/shared/_product_tabs/add_translations.rb +10 -0
- data/app/overrides/spree/admin/shared/_translations/translation.rb +8 -0
- data/app/overrides/spree/admin/shared/sub_menu/_configuration/store_translations.rb +8 -0
- data/app/overrides/spree/admin/shipping_methods/index/add_translation.rb +8 -0
- data/app/overrides/spree/admin/taxonomies/_list/add_translations.rb +8 -0
- data/app/views/spree/admin/translations/_fields.html.erb +12 -0
- data/app/views/spree/admin/translations/_form.html.erb +13 -0
- data/app/views/spree/admin/translations/_form_fields.html.erb +38 -0
- data/app/views/spree/admin/translations/_settings.html.erb +22 -0
- data/app/views/spree/admin/translations/option_type.html.erb +9 -0
- data/app/views/spree/admin/translations/option_value.html.erb +25 -0
- data/app/views/spree/admin/translations/product.html.erb +7 -0
- data/app/views/spree/admin/translations/product_property.html.erb +23 -0
- data/app/views/spree/admin/translations/promotion.html.erb +9 -0
- data/app/views/spree/admin/translations/property.html.erb +9 -0
- data/app/views/spree/admin/translations/shipping_method.html.erb +9 -0
- data/app/views/spree/admin/translations/store.html.erb +25 -0
- data/app/views/spree/admin/translations/taxon.html.erb +25 -0
- data/app/views/spree/admin/translations/taxonomy.html.erb +9 -0
- data/bin/rails +7 -0
- data/config/initializers/enable_extensions.rb +27 -0
- data/config/initializers/form_builder_mobility_patch.rb +53 -0
- data/config/initializers/mobility.rb +118 -0
- data/config/initializers/spree_ransack.rb +31 -0
- data/config/locales/be.yml +6 -0
- data/config/locales/bg.yml +6 -0
- data/config/locales/en.yml +6 -0
- data/config/locales/it.yml +6 -0
- data/config/locales/ru.yml +6 -0
- data/config/locales/zh-TW.yml +6 -0
- data/config/routes.rb +7 -0
- data/db/migrate/20220411041407_add_translations_to_main_models.rb +83 -0
- data/db/migrate/20220412095648_remove_null_constraints_from_spree_tables.rb +13 -0
- data/db/migrate/20220413095648_migrate_translation_data.rb +53 -0
- data/gemfiles/spree_4_2.gemfile +8 -0
- data/gemfiles/spree_master.gemfile +10 -0
- data/lib/generators/spree_mobility/install/install_generator.rb +23 -0
- data/lib/spree_mobility/configuration.rb +12 -0
- data/lib/spree_mobility/core_ext/mobility/backends/active_record/table/mobility_acts_as_paranoid_decorator.rb +31 -0
- data/lib/spree_mobility/core_ext/spree/option_type_decorator.rb +11 -0
- data/lib/spree_mobility/core_ext/spree/option_value_decorator.rb +30 -0
- data/lib/spree_mobility/core_ext/spree/product_decorator.rb +87 -0
- data/lib/spree_mobility/core_ext/spree/product_property_decorator.rb +6 -0
- data/lib/spree_mobility/core_ext/spree/product_scopes_with_mobility_decorator.rb +16 -0
- data/lib/spree_mobility/core_ext/spree/products/find_with_mobility_decorator.rb +12 -0
- data/lib/spree_mobility/core_ext/spree/promotion_decorator.rb +11 -0
- data/lib/spree_mobility/core_ext/spree/property_decorator.rb +26 -0
- data/lib/spree_mobility/core_ext/spree/shipping_method_decorator.rb +10 -0
- data/lib/spree_mobility/core_ext/spree/store_decorator.rb +12 -0
- data/lib/spree_mobility/core_ext/spree/taxon_decorator.rb +54 -0
- data/lib/spree_mobility/core_ext/spree/taxonomy_decorator.rb +29 -0
- data/lib/spree_mobility/core_ext/spree/variant_decorator.rb +19 -0
- data/lib/spree_mobility/engine.rb +33 -0
- data/lib/spree_mobility/fallbacks.rb +45 -0
- data/lib/spree_mobility/translation_query.rb +36 -0
- data/lib/spree_mobility/version.rb +18 -0
- data/lib/spree_mobility.rb +47 -0
- data/spec/features/admin/products_spec.rb +15 -0
- data/spec/features/admin/translations_spec.rb +259 -0
- data/spec/features/translations_spec.rb +35 -0
- data/spec/models/product_spec.rb +77 -0
- data/spec/models/taxon_spec.rb +16 -0
- data/spec/models/translated_models_spec.rb +33 -0
- data/spec/models/variant_spec.rb +33 -0
- data/spec/spec_helper.rb +10 -0
- data/spec/support/i18n.rb +5 -0
- data/spec/support/matchers/be_a_thorough_translation_of_matcher.rb +21 -0
- data/spec/support/matchers/have_text_like.rb +3 -0
- data/spec/support/shared_contexts/translatable_context.rb +63 -0
- data/spree_mobility.gemspec +37 -0
- metadata +316 -0
@@ -0,0 +1,16 @@
|
|
1
|
+
module Spree
|
2
|
+
RSpec.describe Taxon, type: :model do
|
3
|
+
describe '.ransack' do
|
4
|
+
let!(:taxon) { create(:taxon, name: 'find-me') }
|
5
|
+
let!(:other_taxon) { create(:taxon, name: 'no-thanks') }
|
6
|
+
|
7
|
+
it 'handles translation' do
|
8
|
+
result = described_class.ransack(name_cont: taxon.name[0..2]).result
|
9
|
+
expect(result.to_a).to eq [taxon]
|
10
|
+
|
11
|
+
result = described_class.search(name_cont: taxon.name[0..2]).result
|
12
|
+
expect(result.to_a).to eq [taxon]
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Spree
|
2
|
+
RSpec.describe Product, type: :model do
|
3
|
+
include_context "behaves as translatable"
|
4
|
+
end
|
5
|
+
|
6
|
+
RSpec.describe OptionType, type: :model do
|
7
|
+
include_context "behaves as translatable"
|
8
|
+
end
|
9
|
+
|
10
|
+
RSpec.describe Taxon, type: :model do
|
11
|
+
include_context "behaves as translatable"
|
12
|
+
end
|
13
|
+
|
14
|
+
RSpec.describe Taxonomy, type: :model do
|
15
|
+
include_context "behaves as translatable"
|
16
|
+
end
|
17
|
+
|
18
|
+
RSpec.describe Promotion, type: :model do
|
19
|
+
include_context "behaves as translatable"
|
20
|
+
end
|
21
|
+
|
22
|
+
RSpec.describe Property, type: :model do
|
23
|
+
include_context "behaves as translatable"
|
24
|
+
end
|
25
|
+
|
26
|
+
RSpec.describe ProductProperty, type: :model do
|
27
|
+
include_context "behaves as translatable"
|
28
|
+
end
|
29
|
+
|
30
|
+
RSpec.describe Spree::ShippingMethod, type: :model do
|
31
|
+
include_context 'behaves as translatable'
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Spree
|
4
|
+
RSpec.describe Variant do
|
5
|
+
let(:product) do
|
6
|
+
Product.create!(
|
7
|
+
name: 'mobility',
|
8
|
+
price: 19.99,
|
9
|
+
shipping_category: ShippingCategory.create!(name: 'a')
|
10
|
+
)
|
11
|
+
end
|
12
|
+
|
13
|
+
let!(:variant) do
|
14
|
+
Variant.create!(
|
15
|
+
price: 19.99,
|
16
|
+
product: product
|
17
|
+
)
|
18
|
+
end
|
19
|
+
|
20
|
+
# this test is invalid, should be removed or changed
|
21
|
+
# see https://github.com/spree-contrib/spree_mobility/commit/87802a97c8ee82f5444243467faf2a8faa8236f6#commitcomment-12963401
|
22
|
+
xit 'fetches variant from product via translation table' do
|
23
|
+
product_relation = Product.where(name: "mobility")
|
24
|
+
variant_relation = described_class.joins(:product).merge(product_relation)
|
25
|
+
described_class.includes(:product).ransack(name_cont: 'mobility').result.to_a
|
26
|
+
|
27
|
+
expect(variant_relation.last).to eq variant
|
28
|
+
|
29
|
+
variants = described_class.includes(:product).ransack(name_cont: 'mobility').result.to_a
|
30
|
+
expect(variants.last).to eq variant
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# Configure Rails Environment
|
2
|
+
ENV['RAILS_ENV'] = 'test'
|
3
|
+
|
4
|
+
require File.expand_path('../dummy/config/environment.rb', __FILE__)
|
5
|
+
|
6
|
+
require 'spree_dev_tools/rspec/spec_helper'
|
7
|
+
|
8
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
9
|
+
# in spec/support/ and its subdirectories.
|
10
|
+
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].sort.each { |f| require f }
|
@@ -0,0 +1,21 @@
|
|
1
|
+
RSpec::Matchers.define :be_a_thorough_translation_of do |default_locale_filepath|
|
2
|
+
match do |filepath|
|
3
|
+
locale_file = I18nSpec::LocaleFile.new(filepath)
|
4
|
+
default_locale = I18nSpec::LocaleFile.new(default_locale_filepath)
|
5
|
+
|
6
|
+
@misses = default_locale.flattened_translations.select do |key, value|
|
7
|
+
!@keys.include?(key) &&
|
8
|
+
locale_file.flattened_translations[key] != "" &&
|
9
|
+
locale_file.flattened_translations[key] == value
|
10
|
+
end
|
11
|
+
@misses.empty?
|
12
|
+
end
|
13
|
+
|
14
|
+
chain :except do |keys|
|
15
|
+
@keys = keys
|
16
|
+
end
|
17
|
+
|
18
|
+
failure_message do |filepath|
|
19
|
+
"expected #{filepath} to translate :\n- " << @misses.keys.sort.join("\n- ")
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
shared_context "behaves as translatable" do
|
2
|
+
testable_attributes = [:name, :value]
|
3
|
+
attribute = nil
|
4
|
+
|
5
|
+
before do
|
6
|
+
subject.attribute_names.each do |a|
|
7
|
+
if testable_attributes.include? a.to_sym
|
8
|
+
attribute = a.to_sym
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
context "when there's a missing translation" do
|
14
|
+
before do
|
15
|
+
subject[attribute] = "English"
|
16
|
+
I18n.locale = :es
|
17
|
+
end
|
18
|
+
|
19
|
+
it "falls back to default locale" do
|
20
|
+
expect(subject[attribute]).to eq "English"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
context "missing translation on default locale" do
|
25
|
+
let!(:change_locale) { I18n.locale = :es }
|
26
|
+
let!(:model) { subject.class.new }
|
27
|
+
|
28
|
+
before do
|
29
|
+
[:es, :en, :de].each do |locale|
|
30
|
+
create(:store, default_locale: locale)
|
31
|
+
end
|
32
|
+
SpreeMobility::Fallbacks.config!
|
33
|
+
|
34
|
+
model[attribute] = 'produto'
|
35
|
+
end
|
36
|
+
|
37
|
+
it "falls back to not default translations" do
|
38
|
+
I18n.locale = :en
|
39
|
+
expect(model[attribute]).to eq "produto"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
context "missing translation on locale other than default" do
|
44
|
+
let!(:model) { subject.class.new }
|
45
|
+
|
46
|
+
before do
|
47
|
+
[:es, :en, :de].each do |locale|
|
48
|
+
create(:store, default_locale: locale)
|
49
|
+
end
|
50
|
+
SpreeMobility::Fallbacks.config!
|
51
|
+
|
52
|
+
model[attribute] = 'product'
|
53
|
+
end
|
54
|
+
|
55
|
+
it "falls back to default locale first" do
|
56
|
+
I18n.locale = :es
|
57
|
+
model[attribute] = "produto"
|
58
|
+
|
59
|
+
I18n.locale = :de
|
60
|
+
expect(model[attribute]).to eq "product"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib/', __FILE__)
|
3
|
+
$LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
require 'spree_mobility/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.name = 'spree_mobility'
|
10
|
+
s.version = SpreeMobility.version
|
11
|
+
s.summary = 'Better model translation for Spree'
|
12
|
+
s.description = 'Provides model translation, localization, globalization features for Spreecommerce. Based on the Mobility gem, successor of Globalize.'
|
13
|
+
|
14
|
+
s.author = 'Jan Berdajs'
|
15
|
+
s.email = 'mrbrdo@mrbrdo.net'
|
16
|
+
s.homepage = 'https://github.com/mrbrdo'
|
17
|
+
s.license = 'BSD-3'
|
18
|
+
|
19
|
+
s.files = `git ls-files`.split("\n")
|
20
|
+
s.test_files = `git ls-files -- spec/*`.split("\n")
|
21
|
+
s.require_path = 'lib'
|
22
|
+
s.requirements << 'none'
|
23
|
+
|
24
|
+
spree_version = '>= 4.3.0', '< 5.0'
|
25
|
+
s.add_dependency 'spree_core', spree_version
|
26
|
+
s.add_runtime_dependency 'spree_extension'
|
27
|
+
s.add_runtime_dependency 'friendly_id-mobility'
|
28
|
+
s.add_runtime_dependency 'mobility'
|
29
|
+
s.add_runtime_dependency 'spree_i18n'
|
30
|
+
s.add_runtime_dependency 'i18n_data'
|
31
|
+
s.add_runtime_dependency 'rails-i18n'
|
32
|
+
s.add_runtime_dependency 'kaminari-i18n'
|
33
|
+
s.add_dependency 'deface', '~> 1.0'
|
34
|
+
|
35
|
+
s.add_development_dependency 'acts_as_paranoid'
|
36
|
+
s.add_development_dependency 'spree_dev_tools'
|
37
|
+
end
|
metadata
ADDED
@@ -0,0 +1,316 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: spree_mobility
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jan Berdajs
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-04-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: spree_core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.3.0
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '5.0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 4.3.0
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '5.0'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: spree_extension
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: friendly_id-mobility
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: mobility
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: spree_i18n
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
type: :runtime
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: i18n_data
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
type: :runtime
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: rails-i18n
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
type: :runtime
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: kaminari-i18n
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
type: :runtime
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: deface
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - "~>"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '1.0'
|
138
|
+
type: :runtime
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - "~>"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '1.0'
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: acts_as_paranoid
|
147
|
+
requirement: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
type: :development
|
153
|
+
prerelease: false
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: spree_dev_tools
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
173
|
+
description: Provides model translation, localization, globalization features for
|
174
|
+
Spreecommerce. Based on the Mobility gem, successor of Globalize.
|
175
|
+
email: mrbrdo@mrbrdo.net
|
176
|
+
executables: []
|
177
|
+
extensions: []
|
178
|
+
extra_rdoc_files: []
|
179
|
+
files:
|
180
|
+
- ".gitignore"
|
181
|
+
- ".hound.yml"
|
182
|
+
- ".rspec"
|
183
|
+
- ".rubocop.yml"
|
184
|
+
- ".travis.yml"
|
185
|
+
- Appraisals
|
186
|
+
- CONTRIBUTING.md
|
187
|
+
- Gemfile
|
188
|
+
- Guardfile
|
189
|
+
- LICENSE.md
|
190
|
+
- README.md
|
191
|
+
- Rakefile
|
192
|
+
- app/assets/javascripts/spree/backend/spree_mobility.js
|
193
|
+
- app/assets/javascripts/spree/backend/taxon_tree_menu.js
|
194
|
+
- app/assets/javascripts/spree/backend/translations.js
|
195
|
+
- app/controllers/concerns/spree_mobility/controller_mobility_helper.rb
|
196
|
+
- app/controllers/spree/admin/option_values_controller_decorator.rb
|
197
|
+
- app/controllers/spree/admin/product_properties_controller_decorator.rb
|
198
|
+
- app/controllers/spree/admin/shipping_methods_controller_decorator.rb
|
199
|
+
- app/controllers/spree/admin/translations_controller.rb
|
200
|
+
- app/controllers/spree/api/base_controller_decorator.rb
|
201
|
+
- app/controllers/spree/base_controller_decorator.rb
|
202
|
+
- app/helpers/spree_mobility/locale_helper.rb
|
203
|
+
- app/models/concerns/spree_mobility/translatable.rb
|
204
|
+
- app/overrides/spree/admin/option_types/_option_value_fields/add_translation.rb
|
205
|
+
- app/overrides/spree/admin/option_types/index/add_translation.rb
|
206
|
+
- app/overrides/spree/admin/product_properties/_product_property_fields/add_translation.rb
|
207
|
+
- app/overrides/spree/admin/products/index/search_by_name_or_sku.rb
|
208
|
+
- app/overrides/spree/admin/promotions/index/add_translation_link.rb
|
209
|
+
- app/overrides/spree/admin/properties/index/add_translation.rb
|
210
|
+
- app/overrides/spree/admin/shared/_product_tabs/add_translations.rb
|
211
|
+
- app/overrides/spree/admin/shared/_translations/translation.rb
|
212
|
+
- app/overrides/spree/admin/shared/sub_menu/_configuration/store_translations.rb
|
213
|
+
- app/overrides/spree/admin/shipping_methods/index/add_translation.rb
|
214
|
+
- app/overrides/spree/admin/taxonomies/_list/add_translations.rb
|
215
|
+
- app/views/spree/admin/translations/_fields.html.erb
|
216
|
+
- app/views/spree/admin/translations/_form.html.erb
|
217
|
+
- app/views/spree/admin/translations/_form_fields.html.erb
|
218
|
+
- app/views/spree/admin/translations/_settings.html.erb
|
219
|
+
- app/views/spree/admin/translations/option_type.html.erb
|
220
|
+
- app/views/spree/admin/translations/option_value.html.erb
|
221
|
+
- app/views/spree/admin/translations/product.html.erb
|
222
|
+
- app/views/spree/admin/translations/product_property.html.erb
|
223
|
+
- app/views/spree/admin/translations/promotion.html.erb
|
224
|
+
- app/views/spree/admin/translations/property.html.erb
|
225
|
+
- app/views/spree/admin/translations/shipping_method.html.erb
|
226
|
+
- app/views/spree/admin/translations/store.html.erb
|
227
|
+
- app/views/spree/admin/translations/taxon.html.erb
|
228
|
+
- app/views/spree/admin/translations/taxonomy.html.erb
|
229
|
+
- bin/rails
|
230
|
+
- config/initializers/enable_extensions.rb
|
231
|
+
- config/initializers/form_builder_mobility_patch.rb
|
232
|
+
- config/initializers/mobility.rb
|
233
|
+
- config/initializers/spree_ransack.rb
|
234
|
+
- config/locales/be.yml
|
235
|
+
- config/locales/bg.yml
|
236
|
+
- config/locales/en.yml
|
237
|
+
- config/locales/it.yml
|
238
|
+
- config/locales/ru.yml
|
239
|
+
- config/locales/zh-TW.yml
|
240
|
+
- config/routes.rb
|
241
|
+
- db/migrate/20220411041407_add_translations_to_main_models.rb
|
242
|
+
- db/migrate/20220412095648_remove_null_constraints_from_spree_tables.rb
|
243
|
+
- db/migrate/20220413095648_migrate_translation_data.rb
|
244
|
+
- gemfiles/spree_4_2.gemfile
|
245
|
+
- gemfiles/spree_master.gemfile
|
246
|
+
- lib/generators/spree_mobility/install/install_generator.rb
|
247
|
+
- lib/spree_mobility.rb
|
248
|
+
- lib/spree_mobility/configuration.rb
|
249
|
+
- lib/spree_mobility/core_ext/mobility/backends/active_record/table/mobility_acts_as_paranoid_decorator.rb
|
250
|
+
- lib/spree_mobility/core_ext/spree/option_type_decorator.rb
|
251
|
+
- lib/spree_mobility/core_ext/spree/option_value_decorator.rb
|
252
|
+
- lib/spree_mobility/core_ext/spree/product_decorator.rb
|
253
|
+
- lib/spree_mobility/core_ext/spree/product_property_decorator.rb
|
254
|
+
- lib/spree_mobility/core_ext/spree/product_scopes_with_mobility_decorator.rb
|
255
|
+
- lib/spree_mobility/core_ext/spree/products/find_with_mobility_decorator.rb
|
256
|
+
- lib/spree_mobility/core_ext/spree/promotion_decorator.rb
|
257
|
+
- lib/spree_mobility/core_ext/spree/property_decorator.rb
|
258
|
+
- lib/spree_mobility/core_ext/spree/shipping_method_decorator.rb
|
259
|
+
- lib/spree_mobility/core_ext/spree/store_decorator.rb
|
260
|
+
- lib/spree_mobility/core_ext/spree/taxon_decorator.rb
|
261
|
+
- lib/spree_mobility/core_ext/spree/taxonomy_decorator.rb
|
262
|
+
- lib/spree_mobility/core_ext/spree/variant_decorator.rb
|
263
|
+
- lib/spree_mobility/engine.rb
|
264
|
+
- lib/spree_mobility/fallbacks.rb
|
265
|
+
- lib/spree_mobility/translation_query.rb
|
266
|
+
- lib/spree_mobility/version.rb
|
267
|
+
- spec/features/admin/products_spec.rb
|
268
|
+
- spec/features/admin/translations_spec.rb
|
269
|
+
- spec/features/translations_spec.rb
|
270
|
+
- spec/models/product_spec.rb
|
271
|
+
- spec/models/taxon_spec.rb
|
272
|
+
- spec/models/translated_models_spec.rb
|
273
|
+
- spec/models/variant_spec.rb
|
274
|
+
- spec/spec_helper.rb
|
275
|
+
- spec/support/i18n.rb
|
276
|
+
- spec/support/matchers/be_a_thorough_translation_of_matcher.rb
|
277
|
+
- spec/support/matchers/have_text_like.rb
|
278
|
+
- spec/support/shared_contexts/translatable_context.rb
|
279
|
+
- spree_mobility.gemspec
|
280
|
+
homepage: https://github.com/mrbrdo
|
281
|
+
licenses:
|
282
|
+
- BSD-3
|
283
|
+
metadata: {}
|
284
|
+
post_install_message:
|
285
|
+
rdoc_options: []
|
286
|
+
require_paths:
|
287
|
+
- lib
|
288
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
289
|
+
requirements:
|
290
|
+
- - ">="
|
291
|
+
- !ruby/object:Gem::Version
|
292
|
+
version: '0'
|
293
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
294
|
+
requirements:
|
295
|
+
- - ">="
|
296
|
+
- !ruby/object:Gem::Version
|
297
|
+
version: '0'
|
298
|
+
requirements:
|
299
|
+
- none
|
300
|
+
rubygems_version: 3.1.6
|
301
|
+
signing_key:
|
302
|
+
specification_version: 4
|
303
|
+
summary: Better model translation for Spree
|
304
|
+
test_files:
|
305
|
+
- spec/features/admin/products_spec.rb
|
306
|
+
- spec/features/admin/translations_spec.rb
|
307
|
+
- spec/features/translations_spec.rb
|
308
|
+
- spec/models/product_spec.rb
|
309
|
+
- spec/models/taxon_spec.rb
|
310
|
+
- spec/models/translated_models_spec.rb
|
311
|
+
- spec/models/variant_spec.rb
|
312
|
+
- spec/spec_helper.rb
|
313
|
+
- spec/support/i18n.rb
|
314
|
+
- spec/support/matchers/be_a_thorough_translation_of_matcher.rb
|
315
|
+
- spec/support/matchers/have_text_like.rb
|
316
|
+
- spec/support/shared_contexts/translatable_context.rb
|