i18n 1.8.5 → 1.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/i18n.rb +4 -4
- data/lib/i18n/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecfb802a53a50fa0b480295092adbe3064584ef69f06b81851b95bd15f49bca2
|
4
|
+
data.tar.gz: 84e6ce2a82b2ce6f52ba8358b5c409c7fe48ff790ca7f3680d922557b06c7f56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8cf31834170e4aea3f2b25cfad6930372f4ab5f781a9fb7c5f78e6ddabb5316f45a67c5258375d50b5b4ea7f7a97d3a44eda6c34d1a8e7b8c5e5a5f21a95042
|
7
|
+
data.tar.gz: 49532d4362b42b2dcf5f8ef60afd677e64d23aece076933623f0e102f3a803383bff1f6c9add7d00097044459cbd609dd71ead49a965af1636c7a3452f3a885b
|
data/lib/i18n.rb
CHANGED
@@ -192,7 +192,7 @@ module I18n
|
|
192
192
|
# I18n.t(:salutation, { :gender => 'w', :name => 'Smith' })
|
193
193
|
# I18n.t(:salutation, any_hash)
|
194
194
|
#
|
195
|
-
def translate(key = nil,
|
195
|
+
def translate(key = nil, throw: false, raise: false, locale: nil, **options) # TODO deprecate :raise
|
196
196
|
locale ||= config.locale
|
197
197
|
raise Disabled.new('t') if locale == false
|
198
198
|
enforce_available_locales!(locale)
|
@@ -217,8 +217,8 @@ module I18n
|
|
217
217
|
|
218
218
|
# Wrapper for <tt>translate</tt> that adds <tt>:raise => true</tt>. With
|
219
219
|
# this option, if no translation is found, it will raise <tt>I18n::MissingTranslationData</tt>
|
220
|
-
def translate!(key, options
|
221
|
-
translate(key, **options
|
220
|
+
def translate!(key, **options)
|
221
|
+
translate(key, **options, raise: true)
|
222
222
|
end
|
223
223
|
alias :t! :translate!
|
224
224
|
|
@@ -281,7 +281,7 @@ module I18n
|
|
281
281
|
# I18n.transliterate("Jürgen") # => "Juergen"
|
282
282
|
# I18n.transliterate("Jürgen", :locale => :en) # => "Jurgen"
|
283
283
|
# I18n.transliterate("Jürgen", :locale => :de) # => "Juergen"
|
284
|
-
def transliterate(key,
|
284
|
+
def transliterate(key, throw: false, raise: false, locale: nil, replacement: nil, **options)
|
285
285
|
locale ||= config.locale
|
286
286
|
raise Disabled.new('transliterate') if locale == false
|
287
287
|
enforce_available_locales!(locale)
|
data/lib/i18n/version.rb
CHANGED
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.8.
|
4
|
+
version: 1.8.7
|
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:
|
16
|
+
date: 2021-01-04 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: concurrent-ruby
|
@@ -86,10 +86,10 @@ homepage: https://github.com/ruby-i18n/i18n
|
|
86
86
|
licenses:
|
87
87
|
- MIT
|
88
88
|
metadata:
|
89
|
-
bug_tracker_uri: https://github.com/
|
90
|
-
changelog_uri: https://github.com/
|
89
|
+
bug_tracker_uri: https://github.com/ruby-i18n/i18n/issues
|
90
|
+
changelog_uri: https://github.com/ruby-i18n/i18n/releases
|
91
91
|
documentation_uri: https://guides.rubyonrails.org/i18n.html
|
92
|
-
source_code_uri: https://github.com/
|
92
|
+
source_code_uri: https://github.com/ruby-i18n/i18n
|
93
93
|
post_install_message: |2+
|
94
94
|
|
95
95
|
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
|
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: 1.3.5
|
123
123
|
requirements: []
|
124
|
-
rubygems_version: 3.
|
124
|
+
rubygems_version: 3.2.3
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
127
|
summary: New wave Internationalization support for Ruby
|