alchemy_i18n 3.0.1 → 3.1.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: 263d3532a1a2e7bf34a6f0f6ba4c3302f61788df98f75712a050d1fb290ac4ec
4
- data.tar.gz: cc7a0dbd132c69a331d95b44dc1065fb1d4f62133670d6fad5c5d8285a2a1af4
3
+ metadata.gz: afcda1e2237220c08f23a6b02a6c62346f4c6023578013295aed3a65189a617b
4
+ data.tar.gz: 0bddec1cc7a9697e6efd77f59921bf67e2a7064dd2cbb9ceb3d8564e41e99727
5
5
  SHA512:
6
- metadata.gz: 47113496d713289c97b7ef7d627abbb6800ecac337dda2b1cf9d9bff36ede3f000edd7853b3f5775e785483c03394e43b98c0e16e72de4713d4762902090972c
7
- data.tar.gz: dc5c07d3cb28ada7cb6059594628efd98fddde7a84947bdfd3be88af81f94fc82a9ff88410391d0945fa88a47c12cbef655391284236c34bf18080bb09f4b58b
6
+ metadata.gz: 0fbad3ee9e873804db695e5ee41664706ebb68db0496f201728725337b6ad5558d175a453e9deb6052d455a597e39ab8ac85d2c877a4c80ad89069ea37bb04b1
7
+ data.tar.gz: f2f8df792344d80ac620f378c1b565a39641430f84e5388147272545d902367ed0a1c14e44026bb473396b752cae6a10289bf737deae9b9430b3ed8c06689523
data/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## [v3.1.0](https://github.com/AlchemyCMS/alchemy_i18n/tree/v3.1.0) (2023-03-30)
4
+
5
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy_i18n/compare/v3.0.2...v3.1.0)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Allow also future version of Alchemy [\#47](https://github.com/AlchemyCMS/alchemy_i18n/pull/47) ([sascha-karnatz](https://github.com/sascha-karnatz))
10
+
11
+ ## [v3.0.2](https://github.com/AlchemyCMS/alchemy_i18n/tree/v3.0.2) (2022-04-20)
12
+
13
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy_i18n/compare/v2.3.1...v3.0.2)
14
+
15
+ **Merged pull requests:**
16
+
17
+ - Skip English for additional locales [\#46](https://github.com/AlchemyCMS/alchemy_i18n/pull/46) ([tvdeyen](https://github.com/tvdeyen))
18
+
19
+ ## [v2.3.1](https://github.com/AlchemyCMS/alchemy_i18n/tree/v2.3.1) (2022-04-20)
20
+
21
+ [Full Changelog](https://github.com/AlchemyCMS/alchemy_i18n/compare/v3.0.1...v2.3.1)
22
+
3
23
  ## [v3.0.1](https://github.com/AlchemyCMS/alchemy_i18n/tree/v3.0.1) (2022-04-20)
4
24
 
5
25
  [Full Changelog](https://github.com/AlchemyCMS/alchemy_i18n/compare/v3.0.0...v3.0.1)
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.1.0"
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,14 +1,14 @@
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.1.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: 2022-04-20 00:00:00.000000000 Z
11
+ date: 2023-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: alchemy_cms
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 6.0.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7'
22
+ version: '8'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 6.0.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7'
32
+ version: '8'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rails-i18n
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  requirements: []
133
- rubygems_version: 3.1.6
133
+ rubygems_version: 3.4.6
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: AlchemyCMS translation files