defaults.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // Default inflections
  2. module.exports = function (inflect) {
  3. inflect.plural(/$/, 's');
  4. inflect.plural(/s$/i, 's');
  5. inflect.plural(/(ax|test)is$/i, '$1es');
  6. inflect.plural(/(octop|vir)us$/i, '$1i');
  7. inflect.plural(/(octop|vir)i$/i, '$1i');
  8. inflect.plural(/(alias|status)$/i, '$1es');
  9. inflect.plural(/(bu)s$/i, '$1ses');
  10. inflect.plural(/(buffal|tomat)o$/i, '$1oes');
  11. inflect.plural(/([ti])um$/i, '$1a');
  12. inflect.plural(/([ti])a$/i, '$1a');
  13. inflect.plural(/sis$/i, 'ses');
  14. inflect.plural(/(?:([^fa])fe|(?:(oa)f)|([lr])f)$/i, '$1ves');
  15. inflect.plural(/(hive)$/i, '$1s');
  16. inflect.plural(/([^aeiouy]|qu)y$/i, '$1ies');
  17. inflect.plural(/(x|ch|ss|sh)$/i, '$1es');
  18. inflect.plural(/(matr|vert|ind)(?:ix|ex)$/i, '$1ices');
  19. inflect.plural(/([m|l])ouse$/i, '$1ice');
  20. inflect.plural(/([m|l])ice$/i, '$1ice');
  21. inflect.plural(/^(ox)$/i, '$1en');
  22. inflect.plural(/^(oxen)$/i, '$1');
  23. inflect.plural(/(quiz)$/i, '$1zes');
  24. inflect.singular(/s$/i, '');
  25. inflect.singular(/(n)ews$/i, '$1ews');
  26. inflect.singular(/([ti])a$/i, '$1um');
  27. inflect.singular(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i, '$1sis');
  28. inflect.singular(/(^analy)ses$/i, '$1sis');
  29. inflect.singular(/([^f])ves$/i, '$1fe');
  30. inflect.singular(/(hive)s$/i, '$1');
  31. inflect.singular(/(tive)s$/i, '$1');
  32. inflect.singular(/(oave)s$/i, 'oaf');
  33. inflect.singular(/([lr])ves$/i, '$1f');
  34. inflect.singular(/([^aeiouy]|qu)ies$/i, '$1y');
  35. inflect.singular(/(s)eries$/i, '$1eries');
  36. inflect.singular(/(m)ovies$/i, '$1ovie');
  37. inflect.singular(/(x|ch|ss|sh)es$/i, '$1');
  38. inflect.singular(/([m|l])ice$/i, '$1ouse');
  39. inflect.singular(/(bus)es$/i, '$1');
  40. inflect.singular(/(o)es$/i, '$1');
  41. inflect.singular(/(shoe)s$/i, '$1');
  42. inflect.singular(/(cris|ax|test)es$/i, '$1is');
  43. inflect.singular(/(octop|vir)i$/i, '$1us');
  44. inflect.singular(/(alias|status)es$/i, '$1');
  45. inflect.singular(/^(ox)en/i, '$1');
  46. inflect.singular(/(vert|ind)ices$/i, '$1ex');
  47. inflect.singular(/(matr)ices$/i, '$1ix');
  48. inflect.singular(/(quiz)zes$/i, '$1');
  49. inflect.singular(/(database)s$/i, '$1');
  50. inflect.irregular('child', 'children');
  51. inflect.irregular('person', 'people');
  52. inflect.irregular('man', 'men');
  53. inflect.irregular('child', 'children');
  54. inflect.irregular('sex', 'sexes');
  55. inflect.irregular('move', 'moves');
  56. inflect.irregular('cow', 'kine');
  57. inflect.irregular('zombie', 'zombies');
  58. inflect.irregular('oaf', 'oafs', true);
  59. inflect.irregular('jefe', 'jefes');
  60. inflect.irregular('save', 'saves');
  61. inflect.irregular('safe', 'safes');
  62. inflect.irregular('fife', 'fifes');
  63. inflect.uncountable([
  64. 'equipment',
  65. 'information',
  66. 'rice',
  67. 'money',
  68. 'species',
  69. 'series',
  70. 'fish',
  71. 'sheep',
  72. 'jeans',
  73. 'sushi',
  74. ]);
  75. };