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 +7 -1
- data/README.textile +10 -0
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/locales/es.yml +44 -0
- data/rich_pluralization.gemspec +6 -5
- data/test/core/string/inflections_test.rb +1 -1
- data/test/engine_test.rb +1 -1
- data/test/locales/nl/inflections_test.rb +1 -1
- data/test/setup.rb +1 -1
- metadata +12 -5
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
|
-
*
|
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)
|
data/README.textile
CHANGED
@@ -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
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.3
|
data/locales/es.yml
ADDED
@@ -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
|
+
# })
|
data/rich_pluralization.gemspec
CHANGED
@@ -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.
|
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-
|
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>, ["
|
66
|
+
s.add_runtime_dependency(%q<i18n>, ["= 0.3.7"])
|
66
67
|
else
|
67
|
-
s.add_dependency(%q<i18n>, ["
|
68
|
+
s.add_dependency(%q<i18n>, ["= 0.3.7"])
|
68
69
|
end
|
69
70
|
else
|
70
|
-
s.add_dependency(%q<i18n>, ["
|
71
|
+
s.add_dependency(%q<i18n>, ["= 0.3.7"])
|
71
72
|
end
|
72
73
|
end
|
73
74
|
|
data/test/engine_test.rb
CHANGED
data/test/setup.rb
CHANGED
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
|
-
-
|
9
|
-
version: 1.0.
|
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-
|
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
|
-
|
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"
|