Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No comma before "and" #831

Open
kylekatarnls opened this issue Feb 22, 2019 · 10 comments
Open

No comma before "and" #831

kylekatarnls opened this issue Feb 22, 2019 · 10 comments

Comments

@kylekatarnls
Copy link
Contributor

Hello, according to https://www.businessinsider.fr/us/a-guide-to-proper-comma-use-2013-9

A comma , before and is required only if it links two independent sentences, that is not the case for a two_words_connector

So the 12 occurrences of last_word_connector: ", and " should be last_word_connector: " and "

@digitalfrost
Copy link
Collaborator

I think that is why there is:

last_word_connector: ", and "
two_words_connector: " and "

so that both scenarios are covered

It’s cold outside, and I can’t find my coat.

and

The potion included gobstoppers, chewing gum, bran flakes and coleslaw.

Other scenarios to consider:

Don’t use a comma before and when one of the clauses it’s connecting is a dependent clause.

Sam tossed the ball and watched the dog chase it.

Leave the comma out as long as the two independent clauses are very short and closely connected.

Arthur cooked and Melvin cleaned.

Etc.

So a flexible solution is necessary ....

@kylekatarnls
Copy link
Contributor Author

Your example does not match the key, "and" is not a last word connector in "It’s cold outside, and I can’t find my coat.".

We're talking about word connectors so just words and words are connected not disconnected as in the rules you mention. In such sentence, you will never use concatenation with stuff from rails-i18n, you will translate the whole phrase as you need it complete and you may transform and by many other words or formulas.

These 2 keys are both supposed to cover list usage, not sub-clauses. And the only difference between last_word_connector and two_words_connector is two_words_connector is for 2 words, last_word_connector is for more than 2 words:

apple and lemon // correct
apple, lemon, and blueberry // wrong, comma should not be there

If this key has been used as you describe, it's clearly a bad usage. And it looks like a poor excuse to keep a mistake that will produce way more incorrect results than correct ones.

@svenfuchs
Copy link
Owner

apple, lemon, and blueberry // wrong, comma should not be there

that's what's called the Oxford comma, isn't it?

For example, a list of three countries might be punctuated either as "France, Italy, and Spain" (with the serial comma), or as "France, Italy and Spain" (without the serial comma).
-- https://en.wikipedia.org/wiki/Serial_comma

@kylekatarnls
Copy link
Contributor Author

Hum, it seems like it's tolerated in en-US while it's not in en-UK:
https://www.grammar-monster.com/lessons/commas_in_lists.htm

I didn't know this as "Oxford comma" but it's still a mismatch to last_word_connector/two_words_connector.

"Oxford comma" assert list items can contain "and", but if so, this can also happen with only 2 items (two_words_connector), so if "Oxford comma" applies, it should apply to both:

last_word_connector: ", and "
two_words_connector: ", and "

Regarding probable usages and the "word" meaning of the key, this seems irrelevant to me.

@digitalfrost
Copy link
Collaborator

Link to the to_sentence() documentation:
https://apidock.com/rails/Array/to_sentence

They are arguing about this issue over there as well.

See the argument about the strippers, JFK, and Stalin.

@digitalfrost
Copy link
Collaborator

Using clauses with to_sentence() seems a valid use case to me:

['it rained in London', 'it snowed in Geneva', 'it was sunny in Madrid'].to_sentence

it rained in London, it snowed in Geneva, and it was sunny in Madrid

@kylekatarnls
Copy link
Contributor Author

Then why removing this comma when you have only 2 clauses?

@sunny
Copy link
Contributor

sunny commented Apr 19, 2023

Because that’s the usage? You would write I eat pears and apples or I eat pears, peaches, and apples. You wouldn’t write I eat pears, and apples.

@kylekatarnls
Copy link
Contributor Author

No actually, I eat pears, peaches, and apples is not correct, you would write I eat pears, peaches and apples as stated initially, comma before and is only when you have independent sentences not for a simple list.

I'm not native, but that's what all the sources I find say:
https://www.scribbr.com/commas/comma-before-or-after-and/#:~:text=In%20English%2C%20you%20must%20put,and%20Rebecca%20takes%20the%20bus.

@sunny
Copy link
Contributor

sunny commented Apr 20, 2023

Your source also says that:

The serial comma is optional—it’s not an error to leave it out or to include it. Different style guides and publishers have different recommendations, but academic style guides normally recommend using it.

Moreover, since the default texts in Rails use a serial comma, rails-i18n should not change that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants