emberjs/ember-inflector

Problem with word "explosives"

Koka opened this issue · 2 comments

Koka commented

Hi, I've found incorrect and inconsistent handling of explosives word - see the following example:

var inflector = new Ember.Inflector(Ember.Inflector.defaultRules);
inflector.pluralize("explozive"); // => "explozives"
inflector.singularize("explozives"); // => "explozife"
inflector.singularize(inflector.pluralize("explozive")) == "explosive" // => false :(

@Koka the inconsistency is a bug

Rails:

'explozive'.pluralize # => "explozives"
'explozives'.singularize # => "explozife"
'explozive'.pluralize.singularize # => "explozife"

@Koka Is this an inconsistency between this repo and Rails inflector API?

If not, then it's better to use the API to make your own adjustments. The goal of this project is to provide a base-set that mirrors Rails inflector API.