Permalink
Browse files

Merge pull request #5 from sanderhahn/master

rich_pluralization working in Rails 3.1
  • Loading branch information...
2 parents 4e044e1 + 1c0d4fb commit 57e66f099a44c095a8b587087b46ad41378b22bd Paul Engel committed Nov 28, 2011
View
2 lib/rich/pluralization/core/string/inflections.rb
@@ -30,7 +30,7 @@ def cp_case!(s)
def pl(count = nil)
Rich::Pluralization::Inflector.pluralize self, count
end
-
+
end
end
end
View
1 lib/rich/pluralization/inflector/inflections.rb
@@ -1,3 +1,4 @@
+require 'singleton'
module Rich
module Pluralization
View
12 locales/es.yml
@@ -6,22 +6,22 @@ es:
- rule: z$
replacement: ces
- - rule: | á([sn])$
+ - rule: á([sn])$
replacement: a\1es
- - rule: | í([sn])$
+ - rule: í([sn])$
replacement: i\1es
- - rule: | ó([sn])$
+ - rule: ó([sn])$
replacement: o\1es
- - rule: | ú([sn])$
+ - rule: ú([sn])$
replacement: u\1es
- - rule: | ([aeiou]s)$
+ - rule: ([aeiou]s)$
replacement: \1
- - rule: | ([^aeioué])$
+ - rule: ([^aeioué])$
replacement: \1es
- rule: $
View
36 locales/nl.yml
@@ -15,8 +15,8 @@ nl:
- rule: (c|m|n|t)us$
replacement: \1i
- exceptions: | abortus, anus
-
+ exceptions: abortus, anus
+
- rule: (c|d|e|i|t|tr|v)um$
replacement: \1a
exceptions: (anthu|aqua)rium
@@ -42,8 +42,12 @@ nl:
- rule: stad$
replacement: steden
+
+ - rule: (gave)$
+ replacement: \1n
- - rule: | abc, acme, acne, (a|ë|i|o|u|y)$
+ - rule: abc, acme, acne, (a|ë|i|o|u|y)$
+
replacement: \1's
exceptions: (ai|eau|ei|li|lieu|ooi|ou|shampoo|spray|vlo)$
@@ -67,10 +71,12 @@ nl:
- rule: (abort|act|acquisit|advis|amat|inspect)(eur)$
replacement: \1\2s
- - rule: | (gevoel)$
+ - rule: (gevoel)$
+
replacement: \1ens
- - rule: | (accent|agent)([-\s])(\w+)
+ - rule: (accent|agent)([-\s])(\w+)
+
replacement: \1s\2\3s
- rule: advocaat-(\w+)
@@ -79,12 +85,15 @@ nl:
- rule: (bike|borstel|distel|kabel|prikkel|winkel)$
replacement: \1s
- - rule: | abraham, account, act, addict, adoptiefzoon, ah, ai, air, airstrip, alligator, amant, ampersand, analysator, animator, anklet, antiquair, arbeidspool,
+ - rule: |
+ abraham, account, act, addict, adoptiefzoon, ah, ai, air, airstrip, alligator, amant, ampersand, analysator, animator, anklet, antiquair, arbeidspool,
(aar|aard|age|ah|bag|beignet|bike|chef|chon|club|e|é|eau|eër|el|em|en|eon|er|erd|festival|filet|film)$,
(foon|ie|ier|iër|kon|lation|lieu|lotion|marshal|nal|oir|oor|ose|ou|our|ount|pon|poo|prop|rak|rant|rn|sar|sion|sit|show|sor|spray)$,
(sun|tank|tant|test|um|view)$
+
replacement: \1s
- exceptions: | a-attest, aar, aardster, aarlenaar, acceptant, adoptant, afgifte, albe, alge, allofoon, amandel, amarant, ante, antifoon, antipode, aquarel, arelaar,
+ exceptions: |
+ a-attest, aar, aardster, aarlenaar, acceptant, adoptant, afgifte, albe, alge, allofoon, amandel, amarant, ante, antifoon, antipode, aquarel, arelaar,
((aan|ge|ver|voor).*de|afe|ate|bel|bier|cel|contractant|denkende|deur|dier|dienaar|dode|eem|een|eel|eer|einde)$,
(ene|engel|gezwel|gier|iel|iem|isme|ïsme|jaar|ke|kel|krant|lem|lier|maatregel|migrant)$,
(model|officier|oïde|oor|oen|oer|eose|penaar|rivale|schel|schijnsel|sien|spier|ste|stel|stem|taar|tenaar|tier|tride|uaar|vaar|valide|verwante|vrage|zijde)$
@@ -99,14 +108,18 @@ nl:
- rule: (ver|cijn)s$
replacement: \1zen
- - rule: | (a|e|o|u)\1([^aeiou])$
+ - rule: (a|e|o|u)\1([^aeiou])$
+
replacement: \1\2en
- - rule: | (aï|alia)(s),
+ - rule: |
+ (aï|alia)(s),
([^aeiou][aeiou])([^aeioux])$,
^([aeiou])([^aeioux])$
+
replacement: \1\2\2en
- exceptions: alcohol, amandel, apostel, dal, pad, slot, vat,
+ exceptions: |
+ alcohol, amandel, apostel, dal, pad, slot, vat,
(blad|dag|dak|engel|gat|god|hertog|ij|kel|oorlog|proton|regel|schijnsel|schot|slag|tor|weg)$
- rule: (de|ene)$
@@ -116,7 +129,8 @@ nl:
replacement: ven
exceptions: morf$
- - rule: | ([aeiou]|aar|eur|ij)s$
+ - rule: ([aeiou]|aar|eur|ij)s$
+
replacement: \1zen
exceptions: (kaars|kruis)$

0 comments on commit 57e66f0

Please sign in to comment.