alchemy_i18n 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 263d3532a1a2e7bf34a6f0f6ba4c3302f61788df98f75712a050d1fb290ac4ec
4
- data.tar.gz: cc7a0dbd132c69a331d95b44dc1065fb1d4f62133670d6fad5c5d8285a2a1af4
3
+ metadata.gz: f8ed0103c10c6bbf7d0fbf1b5ca7d68fc1a6760beb2ddbfc9ea65c8c9f9d7ca0
4
+ data.tar.gz: 54df22794d3b743094a2cb860794d31eb6398602c9b5ec1f54e619155d252704
5
5
  SHA512:
6
- metadata.gz: 47113496d713289c97b7ef7d627abbb6800ecac337dda2b1cf9d9bff36ede3f000edd7853b3f5775e785483c03394e43b98c0e16e72de4713d4762902090972c
7
- data.tar.gz: dc5c07d3cb28ada7cb6059594628efd98fddde7a84947bdfd3be88af81f94fc82a9ff88410391d0945fa88a47c12cbef655391284236c34bf18080bb09f4b58b
6
+ metadata.gz: c284b4fb443236d484ca5f94a252eb645bf5c3924853488a4331dd056e1545c01b5073b2befa828feea705cb179c9d43304cc811f0f25f0ea75ebd2c7baedcb1
7
+ data.tar.gz: f36a639f7a109dca0b445ee4670b08bd58f419f4d74efa175b5c4d20ba835e998d895cd4f8ff68c3a1591828b975158ef6536d1eacb61f8217e4cd0374f4e418
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [v3.0.2](https://github.com/AlchemyCMS/alchemy_i18n/tree/v3.0.2) (2022-04-20)
4
+
5
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy_i18n/compare/v2.3.1...v3.0.2)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Skip English for additional locales [\#46](https://github.com/AlchemyCMS/alchemy_i18n/pull/46) ([tvdeyen](https://github.com/tvdeyen))
10
+
3
11
  ## [v3.0.1](https://github.com/AlchemyCMS/alchemy_i18n/tree/v3.0.1) (2022-04-20)
4
12
 
5
13
  [Full Changelog](https://github.com/AlchemyCMS/alchemy_i18n/compare/v3.0.0...v3.0.1)
@@ -28,6 +36,10 @@
28
36
  - Add german node translations [\#37](https://github.com/AlchemyCMS/alchemy_i18n/pull/37) ([tvdeyen](https://github.com/tvdeyen))
29
37
  - Allow Alchemy 6 [\#36](https://github.com/AlchemyCMS/alchemy_i18n/pull/36) ([afdev82](https://github.com/afdev82))
30
38
 
39
+ ## [v2.3.1](https://github.com/AlchemyCMS/alchemy_i18n/tree/v2.3.1) (2022-04-20)
40
+
41
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy_i18n/compare/v3.0.1...v2.3.1)
42
+
31
43
  ## [v2.3.0](https://github.com/AlchemyCMS/alchemy_i18n/tree/v2.3.0) (2021-10-26)
32
44
 
33
45
  [Full Changelog](https://github.com/AlchemyCMS/alchemy_i18n/compare/v2.2.0...v2.3.0)
data/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Translations files for AlchemyCMS 6.0 and above.
4
4
 
5
+ ## Alchemy version
6
+
7
+ For a Alchemy 5.3 compatible version use v2.3.1 or the `2.3-stable` branch.
8
+
5
9
  ## Installation
6
10
 
7
11
  Add this Gem to your `Gemfile` and run the install generator
@@ -1,3 +1,3 @@
1
1
  module AlchemyI18n
2
- VERSION = "3.0.1"
2
+ VERSION = "3.0.2"
3
3
  end
@@ -9,7 +9,7 @@ module AlchemyI18n
9
9
  desc "Installs Alchemy locales into your App."
10
10
 
11
11
  def self.description
12
- locales = Alchemy::I18n.available_locales.reject { |l| l == :en }.to_sentence
12
+ locales = Alchemy::I18n.available_locales.to_sentence
13
13
  "Available locales are #{locales}"
14
14
  end
15
15
 
@@ -21,7 +21,7 @@ module AlchemyI18n
21
21
  source_root AlchemyI18n::Engine.root
22
22
 
23
23
  def append_assets
24
- locales.each do |locale|
24
+ additional_locales.each do |locale|
25
25
  append_file 'vendor/assets/javascripts/alchemy/admin/all.js', <<~ASSETS
26
26
  //= require alchemy_i18n/#{locale}
27
27
  //= require select2_locale_#{locale}
@@ -30,7 +30,7 @@ module AlchemyI18n
30
30
  end
31
31
 
32
32
  def append_manifest
33
- locales.each do |locale|
33
+ additional_locales.each do |locale|
34
34
  append_file 'app/assets/config/manifest.js', <<~MANIFEST
35
35
  //= link tinymce/langs/#{locale}.js
36
36
  MANIFEST
@@ -40,7 +40,7 @@ module AlchemyI18n
40
40
  def append_pack
41
41
  webpack_config = YAML.load_file(Rails.root.join("config", "webpacker.yml"))[Rails.env]
42
42
  pack = Rails.root.join(webpack_config["source_path"], webpack_config["source_entry_path"], "alchemy/admin.js")
43
- locales.each do |locale|
43
+ additional_locales.each do |locale|
44
44
  append_file pack, <<~PACK
45
45
  import "flatpickr/dist/l10n/#{locale}.js"
46
46
  PACK
@@ -49,7 +49,7 @@ module AlchemyI18n
49
49
 
50
50
  def add_rails_i18n
51
51
  environment do
52
- "config.i18n.available_locales = #{locales.map(&:to_sym).inspect}"
52
+ "config.i18n.available_locales = #{locales.inspect}"
53
53
  end
54
54
  end
55
55
 
@@ -61,10 +61,14 @@ module AlchemyI18n
61
61
 
62
62
  private
63
63
 
64
+ def additional_locales
65
+ @_additional_locales ||= locales.reject { |locale| locale == :en }
66
+ end
67
+
64
68
  def locales
65
69
  @_locales ||= begin
66
- options[:locales].presence || ask_locales.split(' ')
67
- end
70
+ options[:locales].presence || ask_locales.split(" ")
71
+ end.map(&:to_sym)
68
72
  end
69
73
 
70
74
  def ask_locales
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_i18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen