spree_backend 4.8.0 → 4.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/spree/admin/translatable.rb +17 -4
- data/lib/spree/backend/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50d15f557484b7de4678567d9efafbc222c0b1a5693520b5a3fb4c54cca2d3dc
|
4
|
+
data.tar.gz: 07a69c4b34ca20c724c489b1cb8082c77b338d823d4f68a06629184d4243620a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 017da7b314df0c609a0cd1791fcddcfe805e4a02bd83629ad0ffb1339e95808d1b914dd592d2e227d4b9f496069ba48d700845c5d0ee39f197966c3d1c4c33df
|
7
|
+
data.tar.gz: 69bcb32c1983d1d2d623915dd50134f52d626369bd422516fa504fb5e3e1a20f6f1db971b9228a22da3be99da5779a62221e0dda815550e9c26e1921ef99bd5a
|
@@ -20,13 +20,26 @@ module Spree
|
|
20
20
|
locales_to_update = current_store_locales & params_locales
|
21
21
|
|
22
22
|
locales_to_update.each do |locale|
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
if update_translation_value?(locale)
|
24
|
+
translation = @object.translations.find_or_initialize_by(locale: locale)
|
25
|
+
translation_params.each do |attribute, translations|
|
26
|
+
translation.public_send("#{attribute}=", translations[locale])
|
27
|
+
end
|
28
|
+
translation.save!
|
29
|
+
else
|
30
|
+
Mobility.with_locale(locale) do
|
31
|
+
translation_params.each do |attribute, translations|
|
32
|
+
@object.public_send("#{attribute}=", translations[locale])
|
33
|
+
end
|
34
|
+
@object.save!
|
35
|
+
end
|
26
36
|
end
|
27
|
-
translation.save!
|
28
37
|
end
|
29
38
|
end
|
39
|
+
|
40
|
+
def update_translation_value?(locale)
|
41
|
+
Spree.always_use_translations? || I18n.default_locale.to_s != locale
|
42
|
+
end
|
30
43
|
end
|
31
44
|
end
|
32
45
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.8.
|
4
|
+
version: 4.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-05-
|
12
|
+
date: 2024-05-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: spree
|
@@ -2488,9 +2488,9 @@ licenses:
|
|
2488
2488
|
- BSD-3-Clause
|
2489
2489
|
metadata:
|
2490
2490
|
bug_tracker_uri: https://github.com/spree/spree_backend/issues
|
2491
|
-
changelog_uri: https://github.com/spree/spree_backend/releases/tag/v4.8.
|
2491
|
+
changelog_uri: https://github.com/spree/spree_backend/releases/tag/v4.8.1
|
2492
2492
|
documentation_uri: https://docs.spreecommerce.org/
|
2493
|
-
source_code_uri: https://github.com/spree/spree_backend/tree/v4.8.
|
2493
|
+
source_code_uri: https://github.com/spree/spree_backend/tree/v4.8.1
|
2494
2494
|
post_install_message:
|
2495
2495
|
rdoc_options: []
|
2496
2496
|
require_paths:
|