onoma 0.2.0 → 0.2.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
  SHA1:
3
- metadata.gz: 2a3b9764e9e343c16a7c54a7b8c3646f20f694f9
4
- data.tar.gz: 6a682d814629b5ada657fca5b0cf36da7ce8b4a3
3
+ metadata.gz: 890d5c0a9fe72ab997f84787c018d0d15babc7f1
4
+ data.tar.gz: 2e08211af0656a58fce6ee321dcead9d2e301469
5
5
  SHA512:
6
- metadata.gz: 06c2f3df5cf09c18784e53bb902ea1f32d406f4958987a8be505a5c9c240fbd9945d0b3406939819f6c71bfb17dfb41d8d41e5787bf43027f9941fd2a8b9f8c9
7
- data.tar.gz: 21df3d6b0e9d228d480fd4d99d803952bfcd33e4bcc00ffebc2fc897fcab5ac49797e33bce0d52841365498db8453ef003a75c18f3d7747fd968b004d774102e
6
+ metadata.gz: 34ab0b8193a1875fc0545e24e99c3c9abad3c97506acdf420b559253bc1288d2f656b06508fa8265f6cbcb91cb5a1d75f20acf7f84e9e3713a3af0c0c4b1ca8f
7
+ data.tar.gz: 38d9f0d8d1001a44d095eb5bdfcf34796cf994b83c9509290b17ebef0c052fe798420042ac5f6ece34201313022bb77c5933200131d20b66176281230dbf66a7
data/lib/onoma/item.rb CHANGED
@@ -11,6 +11,8 @@ module Onoma
11
11
  @name = name.to_s
12
12
  @left, @right = @nomenclature.new_boundaries
13
13
  @depth = 0
14
+ @parent = nil
15
+ @parent_name = nil
14
16
  parent = options.delete(:parent)
15
17
  if parent.is_a?(Symbol) || parent.is_a?(String)
16
18
  @parent_name = parent.to_s
@@ -176,7 +178,7 @@ module Onoma
176
178
 
177
179
  # Return human name of item
178
180
  def human_name(options = {})
179
- "nomenclatures.#{nomenclature.name}.items.#{name}".t(options.merge(default: ["items.#{name}".to_sym, "enumerize.#{nomenclature.name}.#{name}".to_sym, "labels.#{name}".to_sym, name.humanize]))
181
+ I18n.translate("nomenclatures.#{nomenclature.name}.items.#{name}", options.merge(default: ["items.#{name}".to_sym, "enumerize.#{nomenclature.name}.#{name}".to_sym, "labels.#{name}".to_sym, name.humanize]))
180
182
  end
181
183
  alias humanize human_name
182
184
  alias localize human_name
data/lib/onoma/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Onoma
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onoma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brice TEXIER