view_component 2.52.0 → 2.53.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of view_component might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1eb8c14aae22e2977db7cde77cd64f9ff1d69f14c0f2c95b6b2ebf0fabf67f5a
4
- data.tar.gz: fe2c729ae013bf1dd2effb17143acfef756e915ea773dcb7eef84fd329c7e002
3
+ metadata.gz: 0d505afaa4cb16810628e814c69bb2d00bc76498f6c681173d7811f44cd87c8e
4
+ data.tar.gz: 2bc859d6034fed19e34739cf1844679bcf83332c7e227c487ddb7364e8166f4b
5
5
  SHA512:
6
- metadata.gz: 0e72fac02dd38cd39cfa7fe45bc57617a8088d2016add0c769df9075393dc8fde66ea44c96d466019354585da3754b1db2099e9207a46418b011e6ef8765b816
7
- data.tar.gz: 6ec82473f583cd484e9ee4042683d7d605131279ef855a199f1a89292967dd971c6ed8a43f8ad7fc9d519bae02fb4f2e5cf8d14f4876ffa1b524ad41ce25ea20
6
+ metadata.gz: 75dcf204fd8e3dfad8a1da18de6d96d43fd779f1c9a73ca66b76f0db1ac7be04cf04447c9eaa901d32bc674d7eb7fa79fd5572bff08652a892a7e96f5186faaa
7
+ data.tar.gz: 7be68adaa9de981a4fb12451ebcc19875f5754fa4798eef60f98702b1c7396bb598a1f6ae77b768bbe55e5b4f77c33f6b9db7156fa18f04c0a63075c54fdd7cc
data/docs/CHANGELOG.md CHANGED
@@ -3,10 +3,42 @@ layout: default
3
3
  title: Changelog
4
4
  ---
5
5
 
6
+ <!-- Add unreleased changes under the "main" heading. -->
7
+
6
8
  # Changelog
7
9
 
8
10
  ## main
9
11
 
12
+ ## 2.53.0
13
+
14
+ * Add support for relative I18n scopes to translations.
15
+
16
+ *Elia Schito*
17
+
18
+ * Update CI configuration to use latest Rails 7.0.
19
+
20
+ *Hans Lemuet*
21
+
22
+ * Document how to use blocks with lambda slots.
23
+
24
+ *Sam Partington*
25
+
26
+ * Skip Rails 5.2 in local test environment if using incompatible Ruby version.
27
+
28
+ *Cameron Dutro*, *Blake Williams*, *Joel Hawksley*
29
+
30
+ * Improve landing page documentation.
31
+
32
+ *Jason Swett*
33
+
34
+ * Add Bearer to list of companies that heavily rely on ViewComponent.
35
+
36
+ *Yaroslav Shmarov*
37
+
38
+ * Add articles to resources page.
39
+
40
+ *Joel Hawksley*
41
+
10
42
  ## 2.52.0
11
43
 
12
44
  * Add ADR for separate slot getter/setter API.
@@ -124,7 +156,7 @@ title: Changelog
124
156
 
125
157
  *Joel Hawksley*
126
158
 
127
- * Add Ruby 3.1 and Rails 7.0 to CI
159
+ * Add Ruby 3.1 and Rails 7.0 to CI.
128
160
 
129
161
  *Peter Goldstein*
130
162
 
@@ -3,7 +3,6 @@
3
3
  require "erb"
4
4
  require "set"
5
5
  require "i18n"
6
- require "action_view/helpers/translation_helper"
7
6
  require "active_support/concern"
8
7
 
9
8
  module ViewComponent
@@ -68,7 +67,10 @@ module ViewComponent
68
67
  return key.map { |k| translate(k, **options) } if key.is_a?(Array)
69
68
 
70
69
  locale = options.delete(:locale) || ::I18n.locale
70
+ scope = options.delete(:scope)
71
+ scope = scope.join(".") if scope.is_a? Array
71
72
  key = key&.to_s unless key.is_a?(String)
73
+ key = "#{scope}.#{key}" if scope
72
74
  key = "#{i18n_scope}#{key}" if key.start_with?(".")
73
75
 
74
76
  if HTML_SAFE_TRANSLATION_KEY.match?(key)
@@ -3,7 +3,7 @@
3
3
  module ViewComponent
4
4
  module VERSION
5
5
  MAJOR = 2
6
- MINOR = 52
6
+ MINOR = 53
7
7
  PATCH = 0
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH].join(".")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_component
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.52.0
4
+ version: 2.53.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Open Source
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-25 00:00:00.000000000 Z
11
+ date: 2022-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport