emberjs / ember-inflector

ember-inflector goal is to be rails compatible.
MIT License
106 stars 81 forks source link

Add test watch-mode and 'software' in uncountable words #500

Closed abhijeetjha0 closed 2 months ago

abhijeetjha0 commented 3 months ago

What is added ? ember test --server in the package.json file as a pnpm command. We can now run it by executing pnpm run test:watch.

What is fixed ? 'Software' was being pluralized as Softwares whereas it is an uncountable Noun. Fixed that.

NullVoxPopuli commented 2 months ago

any chance you'd be willing to rebase? Sorry I missed this PR!! <3

abhijeetjha0 commented 2 months ago

any chance you'd be willing to rebase? Sorry I missed this PR!! <3

Done ✅ @NullVoxPopuli

abhijeetjha0 commented 2 months ago

The goal of this library is not to offer a definitive set of inflections and irregular/uncountable words but to offer the primitives that an app may use to define these as it so needs.

The existing built-in list of irregular and uncountable words is only there as a very brief reference.

Adding new words like software to the list of uncountable words should be done by the consuming app

Thank you @runspired, I thought it should be added as it is a very common uncountable term widely used in the industry. Should I go ahead and undo the changes then ?

NullVoxPopuli commented 2 months ago

@runspired makes a good point, and we don't really want to change the behaviors of this library, since it could have unexpected consequences (imagine a bug out there where someone is relying on the pluralization of "software")

To add software to ones own app, one could do:

import Inflector from 'ember-inflector';

Inflector.inflector.uncountable('software');

In some place, like app/app.js.

I appreciate your contribution @abhijeetjha0 <3 You forced some good discussion about how we want to handle maintenance for this library.

abhijeetjha0 commented 2 months ago

@runspired makes a good point, and we don't really want to change the behaviors of this library, since it could have unexpected consequences (imagine a bug out there where someone is relying on the pluralization of "software")

To add software to ones own app, one could do:


import Inflector from 'ember-inflector';

Inflector.inflector.uncountable('software');

In some place, like app/app.js.

I appreciate your contribution @abhijeetjha0 <3

You forced some good discussion about how we want to handle maintenance for this library.

Should I reopen this PR with watch mode test command changes only ? It is already in Readme file. @NullVoxPopuli

NullVoxPopuli commented 2 months ago

ah yeah, a fix to our documentation / making the documentation correct would be very welcome. thanks!