view_component 2.52.0 → 2.53.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 +4 -4
- data/docs/CHANGELOG.md +33 -1
- data/lib/view_component/translatable.rb +3 -1
- data/lib/view_component/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0d505afaa4cb16810628e814c69bb2d00bc76498f6c681173d7811f44cd87c8e
|
|
4
|
+
data.tar.gz: 2bc859d6034fed19e34739cf1844679bcf83332c7e227c487ddb7364e8166f4b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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)
|
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.
|
|
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-
|
|
11
|
+
date: 2022-04-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|