Fix pluralize helper to properly handle minus one #6533

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
6 participants
@jaimeiniesta
Contributor

jaimeiniesta commented May 29, 2012

Here is a good explanation:
http://neilwhitfield.wordpress.com/2007/10/31/good-question-are-fractions-and-decimals-singular-or-plural/

'If the number one is used, whether it is +/-1, the following noun will be
singular. So it would be -1 apple. We’re talking grammar, not logic; and yes we
say zero apples, probably because zero is thought of as a number that is not
one, even though zero is neither singular nor plural logically.'

Fix pluralize helper to properly handle minus one
Here is a good explanation:
http://neilwhitfield.wordpress.com/2007/10/31/good-question-are-fractions-and-decimals-singular-or-plural/

'If the number one is used, whether it is +/-1, the following noun will be
singular. So it would be -1 apple. We’re talking grammar, not logic; and yes we
say zero apples, probably because zero is thought of as a number that is not
one, even though zero is neither singular nor plural logically.'

@ghost ghost assigned fxn May 29, 2012

@jaimeiniesta

This comment has been minimized.

Show comment
Hide comment
@jaimeiniesta

jaimeiniesta May 31, 2012

Contributor

Here's the real scenario that motivated this change: I've got an app where users have credits, that they can spend and recharge. There's a credit transaction log that shows these additions and substractions, like this:

 +100 credits --- initial setup
   -1 credit  --- a single action
  -25 credits --- a big action
+1000 credits --- recharged

Another possible scenario would be a twitter-like text area where you've got a count of the remaining characters. If you show the word and not just number, it should go like...

140 characters
 25 characters
  0 characters
 -1 character
 -2 characters
-30 characters
Contributor

jaimeiniesta commented May 31, 2012

Here's the real scenario that motivated this change: I've got an app where users have credits, that they can spend and recharge. There's a credit transaction log that shows these additions and substractions, like this:

 +100 credits --- initial setup
   -1 credit  --- a single action
  -25 credits --- a big action
+1000 credits --- recharged

Another possible scenario would be a twitter-like text area where you've got a count of the remaining characters. If you show the word and not just number, it should go like...

140 characters
 25 characters
  0 characters
 -1 character
 -2 characters
-30 characters
@steveklabnik

This comment has been minimized.

Show comment
Hide comment
Member

steveklabnik commented Sep 16, 2012

/cc @fxn

@carlosantoniodasilva

This comment has been minimized.

Show comment
Hide comment
@carlosantoniodasilva

carlosantoniodasilva Nov 22, 2012

Member

@fxn hey, mind taking a look? :)

@fxn hey, mind taking a look? :)

@fxn

This comment has been minimized.

Show comment
Hide comment
@fxn

fxn Nov 22, 2012

Member

ACK!

Member

fxn commented Nov 22, 2012

ACK!

@fxn

This comment has been minimized.

Show comment
Hide comment
@fxn

fxn Nov 22, 2012

Member

Yeah, I did research in the past and my conclusion was there's no right answer. You can say some sounds more natural to you than the other, but there is no authoritative English grammar about this that I am aware of.

Forums and opinion of people in the Internet is not enough, you'll find both points of view being argued, and you can also find people convinced that Elvis is alive :).

The use case you mention isn't determinant because natural language does not follow logic. for example you say two hundred, not two hundreds. Why? Because that is the way it is. Same with 0 degrees, or 0.1 grams.

So, I believe the inflector should remain the same (same resolution would have gone in the opposite situation), and your app should customize it.

Member

fxn commented Nov 22, 2012

Yeah, I did research in the past and my conclusion was there's no right answer. You can say some sounds more natural to you than the other, but there is no authoritative English grammar about this that I am aware of.

Forums and opinion of people in the Internet is not enough, you'll find both points of view being argued, and you can also find people convinced that Elvis is alive :).

The use case you mention isn't determinant because natural language does not follow logic. for example you say two hundred, not two hundreds. Why? Because that is the way it is. Same with 0 degrees, or 0.1 grams.

So, I believe the inflector should remain the same (same resolution would have gone in the opposite situation), and your app should customize it.

@fxn fxn closed this Nov 22, 2012

@jaimeiniesta

This comment has been minimized.

Show comment
Hide comment
@jaimeiniesta

jaimeiniesta Nov 22, 2012

Contributor

You're right @fxn -- the above link was the best explanation I could find but it's not an authoritative source.

So let's keep it simple and have each app customize it if needed.

Thanks!

Contributor

jaimeiniesta commented Nov 22, 2012

You're right @fxn -- the above link was the best explanation I could find but it's not an authoritative source.

So let's keep it simple and have each app customize it if needed.

Thanks!

@jaimeiniesta

This comment has been minimized.

Show comment
Hide comment
@jaimeiniesta

jaimeiniesta Nov 22, 2012

Owner

Just for the record, although again not an authoritative source, this article on Wikipedia summarizes it well:

Negative numbers are usually treated the same as the corresponding positive ones: minus one degree, minus two degrees.

http://en.wikipedia.org/wiki/Plural#Usage_of_the_plural

It also talks about using the plural on decimal fractions, like 0.3 metres

I think its a simple explanation, "treat it the same as the corresponding positive ones", but as it says, it's usually treated this way, but there is no consensus.

Owner

jaimeiniesta commented on 74f6a92 Nov 22, 2012

Just for the record, although again not an authoritative source, this article on Wikipedia summarizes it well:

Negative numbers are usually treated the same as the corresponding positive ones: minus one degree, minus two degrees.

http://en.wikipedia.org/wiki/Plural#Usage_of_the_plural

It also talks about using the plural on decimal fractions, like 0.3 metres

I think its a simple explanation, "treat it the same as the corresponding positive ones", but as it says, it's usually treated this way, but there is no consensus.

@arsduo

This comment has been minimized.

Show comment
Hide comment
@arsduo

arsduo Nov 22, 2012

The weather example is a great real-world use case; it's how people do speak, at least in my experience in America. My opinion is of course no more authoritative than anyone else's, but the change proposed in the PR accords with how I'd expect pluralization to work (keyed off the number itself, not its sign).

arsduo commented Nov 22, 2012

The weather example is a great real-world use case; it's how people do speak, at least in my experience in America. My opinion is of course no more authoritative than anyone else's, but the change proposed in the PR accords with how I'd expect pluralization to work (keyed off the number itself, not its sign).

@palfvin

This comment has been minimized.

Show comment
Hide comment
@palfvin

palfvin Sep 27, 2013

@fxn Just read this thread and did some Google searches and while both sides of this argument are represented, the balance seems pretty solidly on the side of -1 being singular. Can you point to one or two references that you think are reasonable counters to http://english.stackexchange.com/questions/9735/is-1-singular-or-plural, Wikipedia and the totals of each from Google searches?

palfvin commented Sep 27, 2013

@fxn Just read this thread and did some Google searches and while both sides of this argument are represented, the balance seems pretty solidly on the side of -1 being singular. Can you point to one or two references that you think are reasonable counters to http://english.stackexchange.com/questions/9735/is-1-singular-or-plural, Wikipedia and the totals of each from Google searches?

@fxn

This comment has been minimized.

Show comment
Hide comment
@fxn

fxn Sep 28, 2013

Member

@palfvin The link you posted says:

"authority: as mentioned by Cawas, there is not ultimate authority on the English language, and while there are a number of references, I have not been able to identify a solid consensus on the subject."

And that was the result of my research. There is no consensus. We touch the inflector only in rare, very justified cases (actual bugs in the code and such).

Member

fxn commented Sep 28, 2013

@palfvin The link you posted says:

"authority: as mentioned by Cawas, there is not ultimate authority on the English language, and while there are a number of references, I have not been able to identify a solid consensus on the subject."

And that was the result of my research. There is no consensus. We touch the inflector only in rare, very justified cases (actual bugs in the code and such).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment