brtraducao 2.0.6 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,52 +2,51 @@
2
2
  #
3
3
  # http://pt.wikipedia.org/wiki/Plural e
4
4
  # http://pt.wikipedia.org/wiki/Singular
5
- module Inflector
6
- Inflector.inflections do |inflect|
7
- inflect.clear
8
-
9
- inflect.plural(/$/, 's')
10
- inflect.plural(/(s)$/i, '\1')
11
- inflect.plural(/^(paí)s$/i, '\1ses')
12
- inflect.plural(/(z|r)$/i, '\1es')
13
- inflect.plural(/al$/i, 'ais')
14
- inflect.plural(/el$/i, 'eis')
15
- inflect.plural(/ol$/i, 'ois')
16
- inflect.plural(/ul$/i, 'uis')
17
- inflect.plural(/([^aeou])il$/i, '\1is')
18
- inflect.plural(/m$/i, 'ns')
19
- inflect.plural(/^(japon|escoc|ingl|dinamarqu|fregu|portugu)ês$/i, '\1eses')
20
- inflect.plural(/^(|g)ás$/i, '\1ases')
21
- inflect.plural(/ão$/i, 'ões')
22
- inflect.plural(/^(irm|m)ão$/i, '\1ãos')
23
- inflect.plural(/^(alem|c|p)ão$/i, '\1ães')
24
-
25
- # Sem acentos...
26
- inflect.plural(/ao$/i, 'oes')
27
- inflect.plural(/^(irm|m)ao$/i, '\1aos')
28
- inflect.plural(/^(alem|c|p)ao$/i, '\1aes')
29
-
30
- inflect.singular(/([^ê])s$/i, '\1')
31
- inflect.singular(/^(á|gá|paí)s$/i, '\1s')
32
- inflect.singular(/(r|z)es$/i, '\1')
33
- inflect.singular(/([^p])ais$/i, '\1al')
34
- inflect.singular(/eis$/i, 'el')
35
- inflect.singular(/ois$/i, 'ol')
36
- inflect.singular(/uis$/i, 'ul')
37
- inflect.singular(/(r|t)is$/i, '\1il')
38
- inflect.singular(/ns$/i, 'm')
39
- inflect.singular(/sses$/i, 'sse')
40
- inflect.singular(/^(.*[^s]s)es$/i, '\1')
41
- inflect.singular(/ães$/i, 'ão')
42
- inflect.singular(/aes$/i, 'ao')
43
- inflect.singular(/ãos$/i, 'ão')
44
- inflect.singular(/aos$/i, 'ao')
45
- inflect.singular(/ões$/i, 'ão')
46
- inflect.singular(/oes$/i, 'ao')
47
- inflect.singular(/(japon|escoc|ingl|dinamarqu|fregu|portugu)eses$/i, '\1ês')
48
- inflect.singular(/^(g|)ases$/i, '\1ás')
49
-
50
- # #irregulares
5
+ ActiveSupport::Inflector.inflections do |inflect|
6
+ inflect.clear
7
+
8
+ inflect.plural(/$/, 's')
9
+ inflect.plural(/(s)$/i, '\1')
10
+ inflect.plural(/^(paí)s$/i, '\1ses')
11
+ inflect.plural(/(z|r)$/i, '\1es')
12
+ inflect.plural(/al$/i, 'ais')
13
+ inflect.plural(/el$/i, 'eis')
14
+ inflect.plural(/ol$/i, 'ois')
15
+ inflect.plural(/ul$/i, 'uis')
16
+ inflect.plural(/([^aeou])il$/i, '\1is')
17
+ inflect.plural(/m$/i, 'ns')
18
+ inflect.plural(/^(japon|escoc|ingl|dinamarqu|fregu|portugu)ês$/i, '\1eses')
19
+ inflect.plural(/^(|g)ás$/i, '\1ases')
20
+ inflect.plural(/ão$/i, 'ões')
21
+ inflect.plural(/^(irm|m)ão$/i, '\1ãos')
22
+ inflect.plural(/^(alem|c|p)ão$/i, '\1ães')
23
+
24
+ # Sem acentos...
25
+ inflect.plural(/ao$/i, 'oes')
26
+ inflect.plural(/^(irm|m)ao$/i, '\1aos')
27
+ inflect.plural(/^(alem|c|p)ao$/i, '\1aes')
28
+
29
+ inflect.singular(/([^ê])s$/i, '\1')
30
+ inflect.singular(/^(á|gá|paí)s$/i, '\1s')
31
+ inflect.singular(/(r|z)es$/i, '\1')
32
+ inflect.singular(/([^p])ais$/i, '\1al')
33
+ inflect.singular(/eis$/i, 'el')
34
+ inflect.singular(/ois$/i, 'ol')
35
+ inflect.singular(/uis$/i, 'ul')
36
+ inflect.singular(/(r|t)is$/i, '\1il')
37
+ inflect.singular(/ns$/i, 'm')
38
+ inflect.singular(/sses$/i, 'sse')
39
+ inflect.singular(/^(.*[^s]s)es$/i, '\1')
40
+ inflect.singular(es$/i, 'ão')
41
+ inflect.singular(/aes$/i, 'ao')
42
+ inflect.singular(/ãos$/i, 'ão')
43
+ inflect.singular(/aos$/i, 'ao')
44
+ inflect.singular(/ões$/i, 'ão')
45
+ inflect.singular(/oes$/i, 'ao')
46
+ inflect.singular(/(japon|escoc|ingl|dinamarqu|fregu|portugu)eses$/i, '\1ês')
47
+ inflect.singular(/^(g|)ases$/i, '\1ás')
48
+
49
+ # #irregulares
51
50
  # irregulares = {'país' => 'paises'}
52
51
  #
53
52
  #
@@ -55,7 +54,6 @@ module Inflector
55
54
  # inflect.plural(/^#{key.to_s}$/, value)
56
55
  # inflect.singular(/^#{value}$/, key.to_s)
57
56
  # end
58
-
59
- inflect.uncountable %w( tórax tênis ônibus lápis fênix )
60
- end
57
+
58
+ inflect.uncountable %w( tórax tênis ônibus lápis fênix )
61
59
  end
@@ -4,6 +4,6 @@ module BrTraducao
4
4
 
5
5
 
6
6
 
7
- STRING = "2.0.6"
7
+ STRING = "2.0.7"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brtraducao
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Marcos Tapaj\xC3\xB3s"
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2008-09-08 00:00:00 -03:00
15
+ date: 2008-09-23 00:00:00 -03:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency