fast_gettext 2.0.0 → 2.0.1

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: 3b7df1ae6f9c9acae6fe82a22b0ce3efd1d545c9d814447070ebb59652a7fd71
4
- data.tar.gz: 05af6efd5f93f5ea8bf2f8be7314566d0238781f7d809799823223ec01866ce4
3
+ metadata.gz: 183bb8e8189ae58adc5a33621eae23da634f4a68e6629fa705323ce9bd5f97dd
4
+ data.tar.gz: 2e0a657b867f347e746601a93b615449ef7e1f530bf531f346509e0c9ae8b643
5
5
  SHA512:
6
- metadata.gz: b0df4b37e9837b4661cf7c0cbef1c75144c3c2804b2da4110a4850c08eb3084a91cd419ffb5c796eff30ee96860d87cb555a3cb2bd3e99e25db64731868a08ff
7
- data.tar.gz: dc6f882c3c3fa4ea1c3fc2399077d149c3e981124de8f9da99e0ee7bdf2fd248ac74131cc92f9167d05ef15a04eb2ba4e25780ea1f8bc9ecfe04795776704310
6
+ metadata.gz: b735d946318eeafaecc3c817d3c8709e28b1cd9938d32a29c9a1de33fb53ff6cac5a6f224d438c7d6713121aaf23670b8e1ea45201ce4492677126ec0f97cd8c
7
+ data.tar.gz: ce132742a3a3352546260905e6fcd36c3eac54ae0e27e5f6bfc5ffb69282b33e5d0c64a5f6868a2589481fbfd25e92fe29a412217942a54019ea3dd31c378394
data/Readme.md CHANGED
@@ -95,8 +95,8 @@ FastGettext.locale = 'de'
95
95
 
96
96
  ### 4. Start translating
97
97
 
98
- FastGetText supports all the translation methods of [ruby-gettext](http://github.com/ruby-gettext/gettext) with added support for block defaults.
99
- (to get `*gettext` methods, use `FastGetText::TranslationAliased`)
98
+ FastGettext supports all the translation methods of [ruby-gettext](http://github.com/ruby-gettext/gettext) with added support for block defaults.
99
+ (to get `*gettext` methods, use `FastGettext::TranslationAliased`)
100
100
 
101
101
  #### `_()` or `gettext()`: basic translation
102
102
 
@@ -116,7 +116,7 @@ n_('Car', 'Cars', 2) == 'Autos' # German plural of Cars
116
116
  You'll often want to interpolate the results of `n_()` using ruby builtin `%` operator.
117
117
 
118
118
  ```ruby
119
- n_('Car', '#{n} Cars', 2) % { n: count } == '2 Autos'
119
+ n_('Car', '%{n} Cars', 2) % { n: count } == '2 Autos'
120
120
  ```
121
121
 
122
122
  #### `p_()` or `pgettext()`: translation with context
@@ -159,7 +159,7 @@ allow for those strings to be discovered.
159
159
  ```
160
160
  N_("active"); N_("inactive"); N_("paused") # possible value of status for parser to find.
161
161
  Nn_("active", "inactive", "paused") # alternative method
162
- _("Your account is #{account_state}.") % { account_state: status }
162
+ _("Your account is %{account_state}.") % { account_state: status }
163
163
  ```
164
164
 
165
165
 
@@ -11,6 +11,7 @@ module FastGettext
11
11
  # file => path or FastGettext::GetText::MOFile
12
12
  def initialize(file, options = {})
13
13
  @filename = file
14
+ @data = nil
14
15
  load_data if options[:eager_load]
15
16
  end
16
17
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FastGettext
4
- VERSION = Version = '2.0.0' # rubocop:disable Naming/ConstantName
4
+ VERSION = Version = '2.0.1' # rubocop:disable Naming/ConstantName
5
5
  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: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-21 00:00:00.000000000 Z
11
+ date: 2019-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake