-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Comments
I think that is why there is:
so that both scenarios are covered
and
Other scenarios to consider: Don’t use a comma before and when one of the clauses it’s connecting is a dependent clause.
Leave the comma out as long as the two independent clauses are very short and closely connected.
Etc. So a flexible solution is necessary .... |
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:
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. |
that's what's called the Oxford comma, isn't it?
|
Hum, it seems like it's tolerated in en-US while it's not in en-UK: 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:
Regarding probable usages and the "word" meaning of the key, this seems irrelevant to me. |
Link to the to_sentence() documentation: They are arguing about this issue over there as well. See the argument about the strippers, JFK, and Stalin. |
Using clauses with to_sentence() seems a valid use case to me:
it rained in London, it snowed in Geneva, and it was sunny in Madrid |
Then why removing this comma when you have only 2 clauses? |
Because that’s the usage? You would write |
No actually, I'm not native, but that's what all the sources I find say: |
Your source also says that:
Moreover, since the default texts in Rails use a serial comma, rails-i18n should not change that. |
Hello, according to https://www.businessinsider.fr/us/a-guide-to-proper-comma-use-2013-9
A comma
,
beforeand
is required only if it links two independent sentences, that is not the case for atwo_words_connector
So the 12 occurrences of
last_word_connector: ", and "
should belast_word_connector: " and "
The text was updated successfully, but these errors were encountered: