gettext_i18n_rails 1.10.1 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dae7769503d78af47afa65bce415dcf9ed13465b6a561ea91b314ccc624149ff
|
4
|
+
data.tar.gz: 801ac8e2d1a5c02911e27112ba80c4478de3f41aaf2cb0aef16c518c5231ac47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cce87a14ed24586cb8617d78b10f4e9b7888ed88e7e1c18789a6543992f990a102bf6517e04507158d63c08d9a43218f97705bd5c8f22709cbf5e0b76e8bde37
|
7
|
+
data.tar.gz: 3453bc4d44067f5927880805ebd51d9d74fc3cf4f8a83ac8db3bdc6cedf7ade2f9db523d5f0e5ba6d16b0819856c911bf4f7df783c267560df64e430be2056b7
|
@@ -5,8 +5,6 @@ module GettextI18nRails
|
|
5
5
|
cattr_accessor :translate_defaults
|
6
6
|
attr_accessor :backend
|
7
7
|
|
8
|
-
RUBY19 = (RUBY_VERSION > "1.9")
|
9
|
-
|
10
8
|
def initialize(*args)
|
11
9
|
self.backend = I18n::Backend::Simple.new(*args)
|
12
10
|
end
|
@@ -23,7 +21,7 @@ module GettextI18nRails
|
|
23
21
|
interpolate(translation, options)
|
24
22
|
else
|
25
23
|
result = backend.translate(locale, key, options)
|
26
|
-
if
|
24
|
+
if result.is_a?(String)
|
27
25
|
result = result.dup if result.frozen?
|
28
26
|
result.force_encoding("UTF-8")
|
29
27
|
else
|
@@ -65,6 +65,8 @@ module GettextI18nRails
|
|
65
65
|
|
66
66
|
def models
|
67
67
|
if Rails::VERSION::MAJOR >= 3
|
68
|
+
# Ensure autoloaders are set up before we attempt to eager load!
|
69
|
+
Rails.application.autoloaders.each(&:setup) if Rails.application.respond_to?(:autoloaders)
|
68
70
|
Rails.application.eager_load! # make sure that all models are loaded so that direct_descendants works
|
69
71
|
descendants = ::ActiveRecord::Base.direct_descendants
|
70
72
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gettext_i18n_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fast_gettext
|