fast_gettext 3.1.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +1 -0
- data/lib/fast_gettext/vendor/string.rb +0 -16
- data/lib/fast_gettext/version.rb +1 -1
- data/lib/fast_gettext.rb +16 -0
- 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: 20e208d22e9a3e7d486f620c2c134e4e602c4d31411d737a07a4fc700a5cb50d
|
4
|
+
data.tar.gz: '09d8b2bc909e0163e1120dc61d9e87dc23604dce84829f20ddf4fe19c8433ff1'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9746937a00829ef51350812f51207941014bb7f354417e585c7f2f5b19415ea83abd762e7d6cf679ec56c595b509b36a523decc187fec5c185819bfb003f54cd
|
7
|
+
data.tar.gz: 4779c2456eaab59d6012eb6a00009cbf5869c5db46fab4cf52d1717062141e10b9b4341d4ffc524d63403f85d6fc79af9019482b15ab3866115a2ce06ccd3b68
|
data/CHANGELOG
CHANGED
@@ -58,19 +58,3 @@ rescue ArgumentError
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
61
|
-
|
62
|
-
# 1.9.1 if you misspell a %{key} your whole page would blow up, no thanks...
|
63
|
-
begin
|
64
|
-
("%{b}" % {:a=>'b'})
|
65
|
-
rescue KeyError
|
66
|
-
class String
|
67
|
-
alias :_fast_gettext_old_format_m :%
|
68
|
-
def %(*args)
|
69
|
-
begin
|
70
|
-
_fast_gettext_old_format_m(*args)
|
71
|
-
rescue KeyError
|
72
|
-
self
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
data/lib/fast_gettext/version.rb
CHANGED
data/lib/fast_gettext.rb
CHANGED
@@ -28,6 +28,22 @@ module FastGettext
|
|
28
28
|
translation_repositories[name] = TranslationRepository.build(name, options)
|
29
29
|
end
|
30
30
|
|
31
|
+
# deprecated, just a crutch to migrate to new api
|
32
|
+
def self.allow_invalid_keys!
|
33
|
+
eval(<<~CODE)
|
34
|
+
class ::String
|
35
|
+
alias :_fast_gettext_old_format_m :%
|
36
|
+
def %(*args)
|
37
|
+
begin
|
38
|
+
_fast_gettext_old_format_m(*args)
|
39
|
+
rescue KeyError
|
40
|
+
self
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
CODE
|
45
|
+
end
|
46
|
+
|
31
47
|
# some repositories know where to store their locales
|
32
48
|
def self.locale_path
|
33
49
|
translation_repositories[text_domain].instance_variable_get(:@options)[:path]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fast_gettext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.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:
|
11
|
+
date: 2025-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: prime
|