fast_gettext 0.9.2 → 1.0.0

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
  SHA1:
3
- metadata.gz: f8223fdf6163640df93d9bf2d85845b2472f43da
4
- data.tar.gz: dd4ca7c177c493a96fc48b9d84e9393a9a42511b
3
+ metadata.gz: 6ac283f35f54466e64db6ad5655786bf4e1468d5
4
+ data.tar.gz: ee2a9e46dd0a4137420ce9ed119baa6eb47f0e9a
5
5
  SHA512:
6
- metadata.gz: c4d473de9847b436a691ffeb37a0a684f0bd890a7ef863d1d6e8a879283ab0b4b3acaa4215ee7c52ca50dcc819dddb2e2654b347078cb872c820e6300d92712c
7
- data.tar.gz: 17380612d276740536201c724d6360940b0cb51f12b9f67bfae570438c0ec9704c2b1fe81bafc360bdb0973b3a5775a54fedb95857257592badd84ed5261d91e
6
+ metadata.gz: 31b81c071588437a83e164c9c901293baab9a619a5f29c024547506311fb4549a6566943c4e935995483ec8d3c21902f115ecf7f1a389bba3725a74c0b14b954
7
+ data.tar.gz: 47486431368e3d66e2e20182c1e3168be9f4b028a30d79e3df4649f3c12f5851a94d2b5cdeff881e78674fc41106e2c54af715cba1548d2b6730351c2a3b202d
data/CHANGELOG CHANGED
@@ -1,3 +1,4 @@
1
+ 1.0.0 -- do not enforce attr_accessible unless ProtectedAttributes are loaded
1
2
  0.9.0 -- reworked internals of caching to be plugable
2
3
  0.7.0 -- set_locale resets to default locale if none of the available locales was tried to set
3
4
  0.6.0 -- plurals use singular translations as fallack e.g. you translated 'Axis' then n_('Axis','Axis',1) would return the translation for 'Axis' if no plural translation was found
data/Readme.md CHANGED
@@ -142,7 +142,7 @@ If you have any languages that do not fit this rule, you have to add a custom pl
142
142
 
143
143
  Via Ruby:
144
144
 
145
- FastGettext.pluralisation_rule = lamda{|count| count > 5 ? 1 : (count > 2 ? 0 : 2)}
145
+ FastGettext.pluralisation_rule = lambda{|count| count > 5 ? 1 : (count > 2 ? 0 : 2)}
146
146
 
147
147
  Via mo/pofile:
148
148
 
@@ -175,7 +175,7 @@ When you want to know which keys could not be translated or were used, add a Log
175
175
 
176
176
  repos = [
177
177
  FastGettext::TranslationRepository.build('app', :path=>'....')
178
- FastGettext::TranslationRepository.build('logger', :type=>:logger, :callback=>lamda{|key_or_array_of_ids| ... }),
178
+ FastGettext::TranslationRepository.build('logger', :type=>:logger, :callback=>lambda{|key_or_array_of_ids| ... }),
179
179
  }
180
180
  FastGettext.add_text_domain 'combined', :type=>:chain, :chain=>repos
181
181
 
@@ -254,6 +254,7 @@ Mo/Po-file parsing from Masao Mutoh, see vendor/README
254
254
  - [Stephan Kulow](https://github.com/coolo)
255
255
  - [Fotos Georgiadis](https://github.com/fotos)
256
256
  - [Lukáš Zapletal](https://github.com/lzap)
257
+ - [Dominic Cleal](https://github.com/domcleal)
257
258
 
258
259
  [Michael Grosser](http://grosser.it)<br/>
259
260
  michael@grosser.it<br/>
@@ -1,5 +1,3 @@
1
- require "protected_attributes" if ActiveRecord::VERSION::MAJOR >= 4
2
-
3
1
  class TranslationKey < ActiveRecord::Base
4
2
  has_many :translations, :class_name => 'TranslationText', :dependent => :destroy
5
3
 
@@ -8,7 +6,7 @@ class TranslationKey < ActiveRecord::Base
8
6
  validates_uniqueness_of :key
9
7
  validates_presence_of :key
10
8
 
11
- attr_accessible :key, :translations, :translations_attributes
9
+ attr_accessible :key, :translations, :translations_attributes if ActiveRecord::VERSION::MAJOR == 3 || defined?(ProtectedAttributes)
12
10
 
13
11
  before_save :normalize_newlines
14
12
 
@@ -1,10 +1,8 @@
1
- require "protected_attributes" if ActiveRecord::VERSION::MAJOR >= 4
2
-
3
1
  class TranslationText < ActiveRecord::Base
4
2
  belongs_to :translation_key, :class_name => 'TranslationKey'
5
3
  validates_presence_of :locale
6
4
  validates_uniqueness_of :locale, :scope=>:translation_key_id
7
- attr_accessible :text, :locale, :translation_key, :translation_key_id
5
+ attr_accessible :text, :locale, :translation_key, :translation_key_id if ActiveRecord::VERSION::MAJOR == 3 || defined?(ProtectedAttributes)
8
6
  after_update :expire_cache
9
7
 
10
8
  protected
@@ -1,3 +1,3 @@
1
1
  module FastGettext
2
- VERSION = Version = '0.9.2'
2
+ VERSION = Version = '1.0.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: 0.9.2
4
+ version: 1.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: 2015-01-11 00:00:00.000000000 Z
11
+ date: 2015-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake