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
@@ -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
|
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.
|
12
|
+
f.puts("_('#{model.humanize_class_name}')")
|
13
13
|
|
14
14
|
#all columns namespaced under the model
|
15
15
|
column_names.each do |attribute|
|
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:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 2
|
10
|
+
version: 0.5.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Grosser
|