copy_tuner_client 0.16.0 → 0.16.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +5 -0
- data/lib/copy_tuner_client/helper_extension.rb +7 -4
- data/lib/copy_tuner_client/translation_log.rb +2 -2
- data/lib/copy_tuner_client/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f71a4d30fba150acdb6fcaf87bb23d1dac860938ed1ea49c4f66147b0c745f2d
|
4
|
+
data.tar.gz: 7bf32e6a7d61f91f6963dd93d4a6cfd061bf7178e74eafbd7b750ab28c19a8d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e67f8c08453b08b0fbff07ff08adf949ba8738d71b7f79402c99a2c195def37a2b05ec9c642eeedb70bc6bc5ab7669df62b9f0bb6ef26a45ed0d3d5354475c2
|
7
|
+
data.tar.gz: 82f76ec81af6b689f37fe692a04771ed23e0e1987c8bb83f925f00afa23f5e3c16fd769828ca50721389fe7c69def403c4c04826c5c0f6b0446581b3293b09a5
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.2.2
|
data/CHANGELOG.md
CHANGED
@@ -13,20 +13,23 @@ module CopyTunerClient
|
|
13
13
|
# TODO: test
|
14
14
|
# NOTE: default引数が設定されている場合は、copytunerキャッシュの値をI18n.t呼び出しにより上書きしている
|
15
15
|
# SEE: https://github.com/rails/rails/blob/6c43ebc220428ce9fc9569c2e5df90a38a4fc4e4/actionview/lib/action_view/helpers/translation_helper.rb#L82
|
16
|
-
|
16
|
+
if options.key?(:default)
|
17
|
+
I18n.t(key.to_s.first == '.' ? scope_key_by_partial(key) : key, **options)
|
18
|
+
end
|
17
19
|
|
18
20
|
if CopyTunerClient.configuration.disable_copyray_comment_injection
|
19
21
|
source
|
20
22
|
else
|
21
23
|
separator = options[:separator] || I18n.default_separator
|
22
24
|
scope = options[:scope]
|
23
|
-
|
25
|
+
scope_key =
|
24
26
|
if key.to_s.first == '.'
|
25
27
|
scope_key_by_partial(key)
|
26
28
|
else
|
27
|
-
|
29
|
+
# NOTE: locale prefix無しのkeyが必要のためこうしている
|
30
|
+
I18n.normalize_keys(nil, key, scope, separator).compact.join(separator)
|
28
31
|
end
|
29
|
-
CopyTunerClient::Copyray.augment_template(source,
|
32
|
+
CopyTunerClient::Copyray.augment_template(source, scope_key)
|
30
33
|
end
|
31
34
|
end
|
32
35
|
if middleware_enabled
|
@@ -25,9 +25,9 @@ module CopyTunerClient
|
|
25
25
|
result = translate_without_copy_tuner_hook(key, **options)
|
26
26
|
|
27
27
|
if key.is_a?(Array)
|
28
|
-
key.zip(result).each { |k, v| CopyTunerClient::TranslationLog.add(I18n.normalize_keys(nil, k, scope).join('.'), v) unless v.is_a?(Array) }
|
28
|
+
key.zip(result).each { |k, v| CopyTunerClient::TranslationLog.add(I18n.normalize_keys(nil, k, scope).compact.join('.'), v) unless v.is_a?(Array) }
|
29
29
|
else
|
30
|
-
CopyTunerClient::TranslationLog.add(I18n.normalize_keys(nil, key, scope).join('.'), result) unless result.is_a?(Array)
|
30
|
+
CopyTunerClient::TranslationLog.add(I18n.normalize_keys(nil, key, scope).compact.join('.'), result) unless result.is_a?(Array)
|
31
31
|
end
|
32
32
|
result
|
33
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: copy_tuner_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SonicGarden
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -281,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
281
281
|
- !ruby/object:Gem::Version
|
282
282
|
version: '0'
|
283
283
|
requirements: []
|
284
|
-
rubygems_version: 3.
|
284
|
+
rubygems_version: 3.4.10
|
285
285
|
signing_key:
|
286
286
|
specification_version: 4
|
287
287
|
summary: Client for the CopyTuner copy management service
|