1 // ========================================================================== 2 // Project: SproutCore - JavaScript Application Framework 3 // Copyright: ©2006-2011 Strobe Inc. and contributors. 4 // Portions ©2008-2011 Apple Inc. All rights reserved. 5 // License: Licensed under MIT license (see license.js) 6 // ========================================================================== 7 8 /** @private 9 Active Support style inflection constants 10 */ 11 SC.hashesForLocale('en', 'inflectionConstants', { 12 /** @private */ 13 PLURAL: [ 14 [/(quiz)$/i, "$1zes" ], 15 [/^(ox)$/i, "$1en" ], 16 [/([m|l])ouse$/i, "$1ice" ], 17 [/(matr|vert|ind)ix|ex$/i, "$1ices" ], 18 [/(x|ch|ss|sh)$/i, "$1es" ], 19 [/([^aeiouy]|qu)y$/i, "$1ies" ], 20 [/(hive)$/i, "$1s" ], 21 [/(?:([^f])fe|([lr])f)$/i, "$1$2ves"], 22 [/sis$/i, "ses" ], 23 [/([ti])um$/i, "$1a" ], 24 [/(buffal|tomat)o$/i, "$1oes" ], 25 [/(bu)s$/i, "$1ses" ], 26 [/(alias|status)$/i, "$1es" ], 27 [/(octop|vir)us$/i, "$1i" ], 28 [/(ax|test)is$/i, "$1es" ], 29 [/s$/i, "s" ], 30 [/$/, "s" ] 31 ], 32 33 /** @private */ 34 SINGULAR: [ 35 [/(quiz)zes$/i, "$1" ], 36 [/(matr)ices$/i, "$1ix" ], 37 [/(vert|ind)ices$/i, "$1ex" ], 38 [/^(ox)en/i, "$1" ], 39 [/(alias|status)es$/i, "$1" ], 40 [/(octop|vir)i$/i, "$1us" ], 41 [/(cris|ax|test)es$/i, "$1is" ], 42 [/(shoe)s$/i, "$1" ], 43 [/(o)es$/i, "$1" ], 44 [/(bus)es$/i, "$1" ], 45 [/([m|l])ice$/i, "$1ouse" ], 46 [/(x|ch|ss|sh)es$/i, "$1" ], 47 [/(m)ovies$/i, "$1ovie" ], 48 [/(s)eries$/i, "$1eries"], 49 [/([^aeiouy]|qu)ies$/i, "$1y" ], 50 [/([lr])ves$/i, "$1f" ], 51 [/(tive)s$/i, "$1" ], 52 [/(hive)s$/i, "$1" ], 53 [/([^f])ves$/i, "$1fe" ], 54 [/(^analy)ses$/i, "$1sis" ], 55 [/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i, "$1$2sis"], 56 [/([ti])a$/i, "$1um" ], 57 [/(n)ews$/i, "$1ews" ], 58 [/s$/i, "" ] 59 ], 60 61 /** @private */ 62 IRREGULAR: [ 63 ['move', 'moves' ], 64 ['sex', 'sexes' ], 65 ['child', 'children'], 66 ['man', 'men' ], 67 ['person', 'people' ], 68 ['woman', 'women' ], 69 ['self', 'selves' ] 70 ], 71 72 /** @private */ 73 UNCOUNTABLE: [ 74 "sheep", 75 "fish", 76 "series", 77 "species", 78 "money", 79 "rice", 80 "information", 81 "info", 82 "equipment" 83 ] 84 });