inflections 3.2.9.20121201 → 3.2.9.20121206
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.markdown +7 -2
- data/README.markdown +1 -0
- data/lib/inflections/kk.rb +20 -0
- data/lib/inflections/version.rb +1 -1
- data/test/kk_test.rb +47 -0
- metadata +5 -2
data/CHANGELOG.markdown
CHANGED
@@ -1,9 +1,14 @@
|
|
1
|
-
3.2.9 (current version)
|
2
|
-
|
1
|
+
3.2.9.20121206 (current version)
|
2
|
+
================================
|
3
|
+
* Support for Kazakh (thanks to [Galymzhan Kozhayev](https://github.com/galymzhan))
|
4
|
+
|
5
|
+
3.2.9
|
6
|
+
=====
|
3
7
|
* Support for Norwegian Bokmål (thanks to [Henrik Hodne](https://github.com/henrikhodne))
|
4
8
|
|
5
9
|
3.2.8
|
6
10
|
=====
|
11
|
+
>>>>>>> 6a241a8... Update docs to reflect Kazakh support
|
7
12
|
* Support for British English (thanks to [creativetags](https://github.com/creativetags))
|
8
13
|
* Now versioning alongside ActiveSupport
|
9
14
|
|
data/README.markdown
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Inflections
|
4
|
+
ActiveSupport::Inflector.inflections do |inflect|
|
5
|
+
inflect.clear
|
6
|
+
|
7
|
+
vowels = 'оұаыөүәіе'
|
8
|
+
|
9
|
+
inflect.plural(/[кқпстфхчцшщбвгд]$/i, '\0тар')
|
10
|
+
inflect.plural(/[өүәіе][^#{vowels}]*[кқпстфхчцшщбвгд]$/i, '\0тер')
|
11
|
+
|
12
|
+
inflect.plural(/[лмнңжз]$/i, '\0дар')
|
13
|
+
inflect.plural(/[өүәіе][^#{vowels}]*[лмнңжз]$/i, '\0дер')
|
14
|
+
|
15
|
+
inflect.plural(/[#{vowels}руй]$/i, '\0лар')
|
16
|
+
inflect.plural(/[өүәіе][^#{vowels}]*[#{vowels}руй]$/i, '\0лер')
|
17
|
+
|
18
|
+
inflect.singular(/[тдл][ае]р$/i, '')
|
19
|
+
end
|
20
|
+
end
|
data/lib/inflections/version.rb
CHANGED
data/test/kk_test.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'test_helper'
|
4
|
+
require 'inflections/kk'
|
5
|
+
|
6
|
+
class TestKazakhInflections < MiniTest::Unit::TestCase
|
7
|
+
def test_voiceless
|
8
|
+
assert_equal 'сабақтар', 'сабақ'.pluralize
|
9
|
+
assert_equal 'сабақ', 'сабақтар'.singularize
|
10
|
+
|
11
|
+
assert_equal 'мектептер', 'мектеп'.pluralize
|
12
|
+
assert_equal 'мектеп', 'мектептер'.singularize
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_voiced
|
16
|
+
assert_equal 'қағаздар', 'қағаз'.pluralize
|
17
|
+
assert_equal 'қағаз', 'қағаздар'.singularize
|
18
|
+
|
19
|
+
assert_equal 'кілемдер', 'кілем'.pluralize
|
20
|
+
assert_equal 'кілем', 'кілемдер'.singularize
|
21
|
+
|
22
|
+
assert_equal 'гүлдер', 'гүл'.pluralize
|
23
|
+
assert_equal 'гүл', 'гүлдер'.singularize
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_sonor
|
27
|
+
assert_equal 'балалар', 'бала'.pluralize
|
28
|
+
assert_equal 'бала', 'балалар'.singularize
|
29
|
+
|
30
|
+
assert_equal 'дәрігерлер', 'дәрігер'.pluralize
|
31
|
+
assert_equal 'дәрігер', 'дәрігерлер'.singularize
|
32
|
+
|
33
|
+
assert_equal 'үйлер', 'үй'.pluralize
|
34
|
+
assert_equal 'үй', 'үйлер'.singularize
|
35
|
+
|
36
|
+
assert_equal 'ескертулер', 'ескерту'.pluralize
|
37
|
+
assert_equal 'ескерту', 'ескертулер'.singularize
|
38
|
+
|
39
|
+
assert_equal 'аурулар', 'ауру'.pluralize
|
40
|
+
assert_equal 'ауру', 'аурулар'.singularize
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_looks_like_plural
|
44
|
+
assert_equal 'дәптерлер', 'дәптер'.pluralize
|
45
|
+
assert_equal 'дәптер', 'дәптерлер'.singularize
|
46
|
+
end
|
47
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inflections
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.9.
|
4
|
+
version: 3.2.9.20121206
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -79,12 +79,14 @@ files:
|
|
79
79
|
- lib/inflections/en-GB.rb
|
80
80
|
- lib/inflections/en.rb
|
81
81
|
- lib/inflections/es.rb
|
82
|
+
- lib/inflections/kk.rb
|
82
83
|
- lib/inflections/nb.rb
|
83
84
|
- lib/inflections/railtie.rb
|
84
85
|
- lib/inflections/version.rb
|
85
86
|
- test/en-GB_test.rb
|
86
87
|
- test/en_test.rb
|
87
88
|
- test/es_test.rb
|
89
|
+
- test/kk_test.rb
|
88
90
|
- test/nb_test.rb
|
89
91
|
- test/test_helper.rb
|
90
92
|
homepage: https://github.com/davidcelis/inflections
|
@@ -115,5 +117,6 @@ test_files:
|
|
115
117
|
- test/en-GB_test.rb
|
116
118
|
- test/en_test.rb
|
117
119
|
- test/es_test.rb
|
120
|
+
- test/kk_test.rb
|
118
121
|
- test/nb_test.rb
|
119
122
|
has_rdoc:
|