rich_pluralization 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,8 +1,14 @@
1
1
  = Rich-pluralization CHANGELOG
2
2
 
3
+ == Version 1.0.3 (September 4, 2010)
4
+
5
+ * Specified version (0.3.7) of the i18n gem dependency
6
+ * Corrected Rich-pluralization require statement within test setup
7
+ * Added basic Spanish pluralization rules (for M. Koper & Friends ^^)
8
+
3
9
  == Version 1.0.2 (July 22, 2010)
4
10
 
5
- * Specify the locales with relative paths
11
+ * Specified the locales with relative paths
6
12
  * Fixed error during gem initialization
7
13
 
8
14
  == Version 1.0.1 (July 21, 2010)
@@ -190,6 +190,16 @@ h2. ToDo's
190
190
  * Complete the Dutch inflections
191
191
  * Most String inflection methods are also defined in rich_i18n (keep it DRY)
192
192
 
193
+ h2. E9s
194
+
195
+ E9s - "http://github.com/archan937/e9s":http://github.com/archan937/e9s
196
+
197
+ h3. E9s modules
198
+
199
+ * Rich-CMS - "http://github.com/archan937/rich_cms":http://github.com/archan937/rich_cms
200
+ * Rich-i18n - "http://github.com/archan937/rich_i18n":http://github.com/archan937/rich_i18n
201
+ * Rich-pluralization - "http://github.com/archan937/rich_pluralization":http://github.com/archan937/rich_pluralization
202
+
193
203
  h2. License
194
204
 
195
205
  Copyright (c) 2010 Paul Engel, released under the MIT license
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ begin
12
12
  gemspec.homepage = "http://github.com/archan937/rich_pluralization"
13
13
  gemspec.author = "Paul Engel"
14
14
 
15
- gemspec.add_dependency "i18n"
15
+ gemspec.add_dependency "i18n", "0.3.7"
16
16
  end
17
17
  Jeweler::GemcutterTasks.new
18
18
  rescue LoadError
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.2
1
+ 1.0.3
@@ -0,0 +1,44 @@
1
+ ---
2
+ es:
3
+
4
+ e9s:
5
+ plural:
6
+ - rule: | ([aeiou]s)$
7
+ replacement: \1
8
+
9
+ - rule: | ([^aeioué])$
10
+ replacement: \1es
11
+
12
+ - rule: | á([sn])$
13
+ replacement: a\1es
14
+
15
+ - rule: | í([sn])$
16
+ replacement: i\1es
17
+
18
+ - rule: | ó([sn])$
19
+ replacement: o\1es
20
+
21
+ - rule: | ú([sn])$
22
+ replacement: u\1es
23
+
24
+ - rule: z$
25
+ replacement: ces
26
+
27
+ - rule: (es|s)$
28
+ replacement: ""
29
+
30
+ - rule: $
31
+ replacement: s
32
+
33
+ irregular:
34
+ "papá": "papás"
35
+ "mamá": "mamás"
36
+ "sofá": "sofás"
37
+
38
+ # http://gist.github.com/138956
39
+ # http://www.viget.com/extend/rails-internationalization-and-tu/
40
+ #
41
+ # inflect.plural(/^(\w+)\s(.+)$/, lambda { |match|
42
+ # head, tail = match.split(/\s+/, 2)
43
+ # "#{head.pluralize} #{tail}"
44
+ # })
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rich_pluralization}
8
- s.version = "1.0.2"
8
+ s.version = "1.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paul Engel"]
12
- s.date = %q{2010-07-22}
12
+ s.date = %q{2010-09-30}
13
13
  s.description = %q{Rich-pluralization is a module of E9s (http://github.com/archan937/e9s) which provides localized pluralization in combination with i18n. Doing this enables you to only translate words in singular form as the module pluralizes the translation for you.}
14
14
  s.email = %q{paul.engel@holder.nl}
15
15
  s.extra_rdoc_files = [
@@ -33,6 +33,7 @@ Gem::Specification.new do |s|
33
33
  "lib/rich/pluralization/inflector.rb",
34
34
  "lib/rich/pluralization/inflector/inflections.rb",
35
35
  "lib/rich_pluralization.rb",
36
+ "locales/es.yml",
36
37
  "locales/nl.yml",
37
38
  "rails/init.rb",
38
39
  "rich_pluralization.gemspec",
@@ -62,12 +63,12 @@ Gem::Specification.new do |s|
62
63
  s.specification_version = 3
63
64
 
64
65
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
65
- s.add_runtime_dependency(%q<i18n>, [">= 0"])
66
+ s.add_runtime_dependency(%q<i18n>, ["= 0.3.7"])
66
67
  else
67
- s.add_dependency(%q<i18n>, [">= 0"])
68
+ s.add_dependency(%q<i18n>, ["= 0.3.7"])
68
69
  end
69
70
  else
70
- s.add_dependency(%q<i18n>, [">= 0"])
71
+ s.add_dependency(%q<i18n>, ["= 0.3.7"])
71
72
  end
72
73
  end
73
74
 
@@ -9,7 +9,7 @@ module Rich
9
9
  class InflectionsTest < ActiveSupport::TestCase
10
10
  setup do
11
11
  include Setup
12
- I18n.locale = ::Rich::Pluralization::Engine.init(Locales::NL)
12
+ I18n.locale = Engine.init(Locales::NL)
13
13
  end
14
14
 
15
15
  # test "pl" do
@@ -7,7 +7,7 @@ module Rich
7
7
  class EngineTest < ActiveSupport::TestCase
8
8
  setup do
9
9
  include Setup
10
- I18n.locale = ::Rich::Pluralization::Engine.init(Locales::NL)
10
+ I18n.locale = Engine.init(Locales::NL)
11
11
  end
12
12
 
13
13
  # test "something" do
@@ -10,7 +10,7 @@ module Rich
10
10
  class InflectionsTest < ActiveSupport::TestCase
11
11
  setup do
12
12
  include Setup
13
- I18n.locale = ::Rich::Pluralization::Engine.init(self)
13
+ I18n.locale = Engine.init(self)
14
14
  end
15
15
 
16
16
  test "dutch_pluralizations" do
@@ -5,7 +5,7 @@ module Rich
5
5
  module Setup
6
6
 
7
7
  def self.included(base)
8
- require "rich/pluralization"
8
+ require "rich_pluralization"
9
9
  end
10
10
 
11
11
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rich_pluralization
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 17
4
5
  prerelease: false
5
6
  segments:
6
7
  - 1
7
8
  - 0
8
- - 2
9
- version: 1.0.2
9
+ - 3
10
+ version: 1.0.3
10
11
  platform: ruby
11
12
  authors:
12
13
  - Paul Engel
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-07-22 00:00:00 +02:00
18
+ date: 2010-09-30 00:00:00 +02:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
@@ -23,11 +24,14 @@ dependencies:
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
24
25
  none: false
25
26
  requirements:
26
- - - ">="
27
+ - - "="
27
28
  - !ruby/object:Gem::Version
29
+ hash: 29
28
30
  segments:
29
31
  - 0
30
- version: "0"
32
+ - 3
33
+ - 7
34
+ version: 0.3.7
31
35
  type: :runtime
32
36
  version_requirements: *id001
33
37
  description: Rich-pluralization is a module of E9s (http://github.com/archan937/e9s) which provides localized pluralization in combination with i18n. Doing this enables you to only translate words in singular form as the module pluralizes the translation for you.
@@ -56,6 +60,7 @@ files:
56
60
  - lib/rich/pluralization/inflector.rb
57
61
  - lib/rich/pluralization/inflector/inflections.rb
58
62
  - lib/rich_pluralization.rb
63
+ - locales/es.yml
59
64
  - locales/nl.yml
60
65
  - rails/init.rb
61
66
  - rich_pluralization.gemspec
@@ -80,6 +85,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
80
85
  requirements:
81
86
  - - ">="
82
87
  - !ruby/object:Gem::Version
88
+ hash: 3
83
89
  segments:
84
90
  - 0
85
91
  version: "0"
@@ -88,6 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
94
  requirements:
89
95
  - - ">="
90
96
  - !ruby/object:Gem::Version
97
+ hash: 3
91
98
  segments:
92
99
  - 0
93
100
  version: "0"