i18n 1.14.7 → 1.14.8
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/lib/i18n/backend/interpolation_compiler.rb +1 -0
- data/lib/i18n/exceptions.rb +0 -2
- data/lib/i18n/middleware.rb +1 -1
- data/lib/i18n/tests/interpolation.rb +3 -3
- data/lib/i18n/version.rb +1 -1
- data/lib/i18n.rb +3 -2
- 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: edf1a48f0dd110066260f4d93cd2af16e73e9f91845a16126794d4c9af5b664c
|
|
4
|
+
data.tar.gz: 36a488fcbbaefdabb42e1a6f42af534fa36f640de5674d31a92407d6dfd1835d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 82897d5266dfb62379930d6f94346dc0e62c14e619995e3933dc6339d0dd6d06d4b491449d1f4eb43128de995e3d9837624e4132b7b506455e0169dece108b7f
|
|
7
|
+
data.tar.gz: 8938b0f8d862e989f7427ccb2299722914bd485af9afff24bf0bda6cd8f438dc750cacd8c85d45292787f2e78438ead7c7533d6c696f5d5b9fc7109535a48ee4
|
data/lib/i18n/exceptions.rb
CHANGED
data/lib/i18n/middleware.rb
CHANGED
|
@@ -89,14 +89,14 @@ module I18n
|
|
|
89
89
|
end
|
|
90
90
|
|
|
91
91
|
test "interpolation: ASCII strings in the backend should be encoded to UTF8 if interpolation options are in UTF8" do
|
|
92
|
-
I18n.backend.store_translations 'en', 'encoding' => ('%{who} let me go'.force_encoding(
|
|
92
|
+
I18n.backend.store_translations 'en', 'encoding' => ('%{who} let me go'.dup.force_encoding(Encoding::US_ASCII))
|
|
93
93
|
result = I18n.t 'encoding', :who => "måmmå miå"
|
|
94
94
|
assert_equal Encoding::UTF_8, result.encoding
|
|
95
95
|
end
|
|
96
96
|
|
|
97
97
|
test "interpolation: UTF8 strings in the backend are still returned as UTF8 with ASCII interpolation" do
|
|
98
98
|
I18n.backend.store_translations 'en', 'encoding' => 'måmmå miå %{what}'
|
|
99
|
-
result = I18n.t 'encoding', :what => 'let me go'.force_encoding(
|
|
99
|
+
result = I18n.t 'encoding', :what => 'let me go'.dup.force_encoding(Encoding::US_ASCII)
|
|
100
100
|
assert_equal Encoding::UTF_8, result.encoding
|
|
101
101
|
end
|
|
102
102
|
|
|
@@ -172,7 +172,7 @@ module I18n
|
|
|
172
172
|
end
|
|
173
173
|
|
|
174
174
|
def euc_jp(string)
|
|
175
|
-
string.encode
|
|
175
|
+
string.encode(Encoding::EUC_JP)
|
|
176
176
|
end
|
|
177
177
|
|
|
178
178
|
def interpolate(*args)
|
data/lib/i18n/version.rb
CHANGED
data/lib/i18n.rb
CHANGED
|
@@ -55,12 +55,13 @@ module I18n
|
|
|
55
55
|
module Base
|
|
56
56
|
# Gets I18n configuration object.
|
|
57
57
|
def config
|
|
58
|
-
Thread.current
|
|
58
|
+
Thread.current.thread_variable_get(:i18n_config) ||
|
|
59
|
+
Thread.current.thread_variable_set(:i18n_config, I18n::Config.new)
|
|
59
60
|
end
|
|
60
61
|
|
|
61
62
|
# Sets I18n configuration object.
|
|
62
63
|
def config=(value)
|
|
63
|
-
Thread.current
|
|
64
|
+
Thread.current.thread_variable_set(:i18n_config, value)
|
|
64
65
|
end
|
|
65
66
|
|
|
66
67
|
# Write methods which delegates to the configuration object
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: i18n
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.14.
|
|
4
|
+
version: 1.14.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sven Fuchs
|
|
@@ -13,7 +13,7 @@ authors:
|
|
|
13
13
|
autorequire:
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
|
-
date: 2025-
|
|
16
|
+
date: 2025-12-21 00:00:00.000000000 Z
|
|
17
17
|
dependencies:
|
|
18
18
|
- !ruby/object:Gem::Dependency
|
|
19
19
|
name: concurrent-ruby
|