fast_gettext 1.2.0 → 1.3.0
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/Readme.md +1 -0
- data/lib/fast_gettext/storage.rb +10 -0
- data/lib/fast_gettext/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc6a0e04654cd2e6d0d6657d37f564a1472ec43e
|
4
|
+
data.tar.gz: 9843f87ded12215c6e1f3ae9a588170af7e01f97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b535e9e77d6e2237bfcafcf44612d1794748f749fb5d12bde658533116d75d4208f5f9621957d0f33dfdf93b9b9eadcb9bf6d6fda87389e5880167683cd9ebde
|
7
|
+
data.tar.gz: c3f7e9345eb928d017baa6c10041a23fb0811eb5e93d150dac786735cc219b32a3ad12e7d0e2641594a844e76afdc09ac63e116168e6213577b7f0075f8bac22
|
data/Readme.md
CHANGED
@@ -273,6 +273,7 @@ Mo/Po-file parsing from Masao Mutoh, see vendor/README
|
|
273
273
|
- [Fotos Georgiadis](https://github.com/fotos)
|
274
274
|
- [Lukáš Zapletal](https://github.com/lzap)
|
275
275
|
- [Dominic Cleal](https://github.com/domcleal)
|
276
|
+
- [Tomas Strachota](https://github.com/tstrachota)
|
276
277
|
|
277
278
|
[Michael Grosser](http://grosser.it)<br/>
|
278
279
|
michael@grosser.it<br/>
|
data/lib/fast_gettext/storage.rb
CHANGED
@@ -136,6 +136,16 @@ module FastGettext
|
|
136
136
|
return nil#nothing found im sorry :P
|
137
137
|
end
|
138
138
|
|
139
|
+
# temporarily switch locale for a block
|
140
|
+
# FastGettext.with_locale 'xx' { _('cars') }
|
141
|
+
def with_locale(temp_locale)
|
142
|
+
current_locale = locale
|
143
|
+
set_locale temp_locale
|
144
|
+
yield
|
145
|
+
ensure
|
146
|
+
set_locale current_locale
|
147
|
+
end
|
148
|
+
|
139
149
|
#turn off translation if none was defined to disable all resulting errors
|
140
150
|
def silence_errors
|
141
151
|
require 'fast_gettext/translation_repository/base'
|
data/lib/fast_gettext/version.rb
CHANGED
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: 1.
|
4
|
+
version: 1.3.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: 2016-
|
11
|
+
date: 2016-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|