alchemy_i18n 3.2.0 → 4.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a19c374843e9ec5e6633c4d0851c624e4aa3665ede192b3434a6b7deb3734629
4
- data.tar.gz: 9cadc0dabb05690745090816f99f8e31eba14e8093740f58403b1030eb3b45be
3
+ metadata.gz: fe8181e95211f25589c670ca70399aeadca6e72f74105afc71b54c3533965272
4
+ data.tar.gz: 550be2d0f544f9b7582ae4ee190a8b3ddb70fdf27a12ab9f0480c750c50abfd2
5
5
  SHA512:
6
- metadata.gz: 65c209fea9391c281d2d27f6b856c130a44bca644d745f534347188c2ee53d6dca7c7f1f3ca189e5aeabc7d26387c63c8dfbf8dba97a270cb68d419eef42e573
7
- data.tar.gz: 8904a17c558b1eb761df2bdaa7aac335364f80bddbd0c3e9dcb781e9833bc7ff7966458305524959c9c4ddc4573878940972f025b728663fb51c145edc740b91
6
+ metadata.gz: 562a9758f5faf35da051b54d6674f45cce97fb131f056f4762dd323229ed7e2830cf50abfb6b044d69ac2c3ab712cee5d1292f4a528ac02af1439133841bde53
7
+ data.tar.gz: 7b1d0bcf163e1bf9fd6c6407cc2c5f308d4ee644eaa86511c28014bd59b51f34aea13959aadd65b84aa8b7c8401443ba744b5b6207d59f1da669a0972753dc97
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [v4.0.0](https://github.com/AlchemyCMS/alchemy_i18n/tree/v4.0.0) (2023-10-06)
4
+
5
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy_i18n/compare/v3.2.0...v4.0.0)
6
+
7
+ **Fixed bugs:**
8
+
9
+ - Import flatpickr translations into Alchemy admin [\#51](https://github.com/AlchemyCMS/alchemy_i18n/pull/51) ([tvdeyen](https://github.com/tvdeyen))
10
+
11
+ **Closed issues:**
12
+
13
+ - Generator relies on webpacker [\#50](https://github.com/AlchemyCMS/alchemy_i18n/issues/50)
14
+
3
15
  ## [v3.2.0](https://github.com/AlchemyCMS/alchemy_i18n/tree/v3.2.0) (2023-09-29)
4
16
 
5
17
  [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 6.0 and above.
3
+ Translations files for AlchemyCMS 7.0 and above.
4
4
 
5
5
  ## Alchemy version
6
6
 
7
- For a Alchemy 5.3 compatible version use v2.3.1 or the `2.3-stable` branch.
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
 
@@ -5,6 +5,10 @@ module AlchemyI18n
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
@@ -1,3 +1,3 @@
1
1
  module AlchemyI18n
2
- VERSION = "3.2.0"
2
+ VERSION = "4.0.0"
3
3
  end
@@ -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: 3.2.0
4
+ version: 4.0.0
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-09-29 00:00:00.000000000 Z
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: 6.0.0
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: 6.0.0
29
+ version: 7.0.4
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '8'