alchemy_i18n 3.2.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/README.md +3 -2
- data/lib/alchemy_i18n/engine.rb +5 -1
- data/lib/alchemy_i18n/version.rb +1 -1
- data/lib/generators/alchemy_i18n/install/install_generator.rb +0 -18
- 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: fdda2886398913c95a57b7852b733082be9dbced726ed25c7901fa63fd498179
|
4
|
+
data.tar.gz: 35e1d7951d9a92e6685ec970e36ab7a39a4cb22da3afc6c02a136f0f87a53f23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f29f317490edd4789fa262f2c37323696af99662a208cb7a7f72454c7361944b7fa6188586d4d10547647ebb418f4ebfa6efc3cbec403eef9fd2d2eb6dc0b6bb
|
7
|
+
data.tar.gz: 3fd9a4083c211fa180a4a7bca6cc6e1656e72c92b3cdfca49ccd081d1132626e2720d8b4300523416254e8f9d32e7d70034c0e44b937469b2895df2667776937
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v4.0.1](https://github.com/AlchemyCMS/alchemy_i18n/tree/v4.0.1) (2023-10-06)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/AlchemyCMS/alchemy_i18n/compare/v4.0.0...v4.0.1)
|
6
|
+
|
7
|
+
**Fixed bugs:**
|
8
|
+
|
9
|
+
- Do not attempt to load en flatpickr locale [\#52](https://github.com/AlchemyCMS/alchemy_i18n/pull/52) ([tvdeyen](https://github.com/tvdeyen))
|
10
|
+
|
11
|
+
## [v4.0.0](https://github.com/AlchemyCMS/alchemy_i18n/tree/v4.0.0) (2023-10-06)
|
12
|
+
|
13
|
+
[Full Changelog](https://github.com/AlchemyCMS/alchemy_i18n/compare/v3.2.0...v4.0.0)
|
14
|
+
|
15
|
+
**Fixed bugs:**
|
16
|
+
|
17
|
+
- Import flatpickr translations into Alchemy admin [\#51](https://github.com/AlchemyCMS/alchemy_i18n/pull/51) ([tvdeyen](https://github.com/tvdeyen))
|
18
|
+
|
19
|
+
**Closed issues:**
|
20
|
+
|
21
|
+
- Generator relies on webpacker [\#50](https://github.com/AlchemyCMS/alchemy_i18n/issues/50)
|
22
|
+
|
3
23
|
## [v3.2.0](https://github.com/AlchemyCMS/alchemy_i18n/tree/v3.2.0) (2023-09-29)
|
4
24
|
|
5
25
|
[Full Changelog](https://github.com/AlchemyCMS/alchemy_i18n/compare/v3.1.0...v3.2.0)
|
data/README.md
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
# AlchemyCMS Translations
|
2
2
|
|
3
|
-
Translations files for AlchemyCMS
|
3
|
+
Translations files for AlchemyCMS 7.0 and above.
|
4
4
|
|
5
5
|
## Alchemy version
|
6
6
|
|
7
|
-
For a Alchemy
|
7
|
+
- For a Alchemy 6.1 compatible version use v3.2.0 or the `3.2-stable` branch.
|
8
|
+
- For a Alchemy 5.3 compatible version use v2.3.1 or the `2.3-stable` branch.
|
8
9
|
|
9
10
|
## Installation
|
10
11
|
|
data/lib/alchemy_i18n/engine.rb
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
module AlchemyI18n
|
2
2
|
class Engine < ::Rails::Engine
|
3
3
|
initializer "alchemy-i18n" do |app|
|
4
|
-
locales = Array(app.config.i18n.available_locales)
|
4
|
+
locales = Array(app.config.i18n.available_locales).reject { |l| l == :en }
|
5
5
|
pattern = locales.empty? ? "*" : "{#{locales.join ","}}"
|
6
6
|
files = Dir[root.join("locales", "alchemy.#{pattern}.yml")]
|
7
7
|
I18n.load_path.concat(files)
|
8
|
+
locales.each do |locale|
|
9
|
+
Alchemy.importmap.pin "flatpickr/#{locale}.js", to: "https://ga.jspm.io/npm:flatpickr@4.6.13/dist/l10n/#{locale}.js"
|
10
|
+
Alchemy.admin_js_imports << "flatpickr/#{locale}.js"
|
11
|
+
end
|
8
12
|
end
|
9
13
|
end
|
10
14
|
end
|
data/lib/alchemy_i18n/version.rb
CHANGED
@@ -37,24 +37,6 @@ module AlchemyI18n
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
def append_pack
|
41
|
-
app_root = Rails.root
|
42
|
-
config_file = app_root.join("config", "webpacker.yml")
|
43
|
-
if config_file.exist?
|
44
|
-
webpack_config = YAML.load_file(config_file)[Rails.env]
|
45
|
-
pack = app_root.join(
|
46
|
-
webpack_config["source_path"],
|
47
|
-
webpack_config["source_entry_path"],
|
48
|
-
"alchemy/admin.js"
|
49
|
-
)
|
50
|
-
else
|
51
|
-
pack = app_root.join("app/javascript/alchemy_admin.js")
|
52
|
-
end
|
53
|
-
additional_locales.each { |locale| append_file pack, <<~PACK }
|
54
|
-
import "flatpickr/dist/l10n/#{locale}.js"
|
55
|
-
PACK
|
56
|
-
end
|
57
|
-
|
58
40
|
def add_rails_i18n
|
59
41
|
environment do
|
60
42
|
"config.i18n.available_locales = #{locales.inspect}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy_i18n
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: alchemy_cms
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 7.0.4
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '8'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 7.0.4
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '8'
|