gettext_i18n_rails 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gettext_i18n_rails (0.5.1)
4
+ gettext_i18n_rails (0.5.2)
5
5
  fast_gettext
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  module ActiveModel
2
2
  class Name < String
3
3
  def human(options={})
4
- _(@klass.humanize_class_name(self))
4
+ _(@klass.humanize_class_name)
5
5
  end
6
6
  end
7
7
  end
@@ -4,13 +4,13 @@ module GettextI18nRails::ActiveRecord
4
4
  s_(gettext_translation_for_attribute_name(attribute))
5
5
  end
6
6
 
7
- # CarDealer -> _('car dealer')
8
7
  # method deprecated in Rails 3.1
9
8
  def human_name(*args)
10
- _(self.humanize_class_name(self.to_s))
9
+ _(self.humanize_class_name)
11
10
  end
12
11
 
13
- def humanize_class_name(name)
12
+ def humanize_class_name(name=nil)
13
+ name ||= self.to_s
14
14
  name.underscore.humanize
15
15
  end
16
16
 
@@ -9,7 +9,7 @@ module GettextI18nRails
9
9
  File.open(file,'w') do |f|
10
10
  f.puts "#DO NOT MODIFY! AUTOMATICALLY GENERATED FILE!"
11
11
  ModelAttributesFinder.new.find(options).each do |model,column_names|
12
- f.puts("_('#{model.human_name_without_translation}')")
12
+ f.puts("_('#{model.humanize_class_name}')")
13
13
 
14
14
  #all columns namespaced under the model
15
15
  column_names.each do |attribute|
@@ -1,3 +1,3 @@
1
1
  module GettextI18nRails
2
- Version = VERSION = '0.5.1'
2
+ Version = VERSION = '0.5.2'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gettext_i18n_rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 1
10
- version: 0.5.1
9
+ - 2
10
+ version: 0.5.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Grosser