locale_selector 1.93.0 → 1.93.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/locale_selector/gettext_tasks.rb +11 -2
- data/locale_selector.gemspec +1 -1
- metadata +3 -3
@@ -38,6 +38,15 @@ end
|
|
38
38
|
module GetText
|
39
39
|
module ActiveRecordParser
|
40
40
|
log "overriding the original activerecord parser"
|
41
|
+
|
42
|
+
def self.singularize(s)
|
43
|
+
# there seems to be a difference between Rails 2.1.2 and 2.1.0
|
44
|
+
if defined?(ActiveSupport::Inflector)
|
45
|
+
ActiveSupport::Inflector.singularize(s)
|
46
|
+
else
|
47
|
+
Inflector.singularize(s)
|
48
|
+
end
|
49
|
+
end
|
41
50
|
|
42
51
|
def self.parse(file, targets = []) # :nodoc:
|
43
52
|
log "locale_selector specific version of activerecordparser.parse is parsing #{file}"
|
@@ -55,9 +64,9 @@ module GetText
|
|
55
64
|
if klass.is_a?(Class) && klass < ActiveRecord::Base
|
56
65
|
log "processing class #{klass.name}"
|
57
66
|
unless (klass.untranslate_all? || klass.abstract_class?)
|
58
|
-
add_target(targets, file,
|
67
|
+
add_target(targets, file, singularize(klass.table_name.gsub(/_/, " ")))
|
59
68
|
unless klass.class_name == classname
|
60
|
-
add_target(targets, file,
|
69
|
+
add_target(targets, file, singularize(classname.gsub(/_/, " ").downcase))
|
61
70
|
end
|
62
71
|
begin
|
63
72
|
klass.columns.each do |column|
|
data/locale_selector.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
SPEC = Gem::Specification.new do |s|
|
2
2
|
s.name = 'locale_selector'
|
3
|
-
s.version = '1.93.
|
3
|
+
s.version = '1.93.1'
|
4
4
|
s.summary = 'Wraps and improves ruby-gettext, provides UI for locale selection, maintains user preferences.'
|
5
5
|
s.description = s.summary
|
6
6
|
s.author = 'Vladimir Dobriakov'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: locale_selector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.93.
|
4
|
+
version: 1.93.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Dobriakov
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-02-09 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
75
|
requirements: []
|
76
76
|
|
77
77
|
rubyforge_project: locale_selector
|
78
|
-
rubygems_version: 1.
|
78
|
+
rubygems_version: 1.2.0
|
79
79
|
signing_key:
|
80
80
|
specification_version: 2
|
81
81
|
summary: Wraps and improves ruby-gettext, provides UI for locale selection, maintains user preferences.
|