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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f47483365d8998f016a8c092875a4b92cc281264
4
- data.tar.gz: e3cdfa1fd0ca9ffc4b7ba397c10f7de01e6099d4
3
+ metadata.gz: fc6a0e04654cd2e6d0d6657d37f564a1472ec43e
4
+ data.tar.gz: 9843f87ded12215c6e1f3ae9a588170af7e01f97
5
5
  SHA512:
6
- metadata.gz: cf39c69120683117225d63aed75e3d4e451d89ef863edebee55055155b16dc5ed37413d183cd98e5edca4c63fe758652664f3afa0574c40a58eb70bc859a5280
7
- data.tar.gz: 14ddb2652d36ce7b9f9dc22bdfbcc36341446d5e623b1df41f33087cd75507194b567aabd96cab384573c94344084122297846f7b920b84746b8ac1a25a79b8d
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/>
@@ -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'
@@ -1,3 +1,3 @@
1
1
  module FastGettext
2
- VERSION = Version = '1.2.0'
2
+ VERSION = Version = '1.3.0'
3
3
  end
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.2.0
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-08-02 00:00:00.000000000 Z
11
+ date: 2016-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake