-
Notifications
You must be signed in to change notification settings - Fork 965
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
Extra comma in Collection list #390
Comments
It's actually ok to be there. It's called an Oxford comma or serial comma (http://en.wikipedia.org/wiki/Serial_comma). Whether it is included or not depends on a couple factors described in the Wikipedia article. Since there is no universal decision I do not think it is a bug. |
I will admit that I took a slightly opinionated stance in regards to the Oxford comma since, in my experience, it more often reduces ambiguity than introduces it. It could be made optional(and that probably wouldn't take much work after #386), but like I said I was feeling a little opinionated that day. |
Thanks for the discussion guys. Closing this thread now. |
Actually we need to do a research on usage of serial comma by English speaking country and implement this feature as regional differences: en-US, en-GB, en-AU, en-NZ, etc |
Hazzik is correct. The unfortunately named 'Oxford' comma is frequently used by Americans but is generally regarded as a gramatical error in British English, although it has it's uses in certain edge-case scenarios. (see: http://www.grammar-monster.com/lessons/commas_in_lists.htm) |
I think we need to be able to specify conjunction word, something like this: new { 1, 2, 3, 4, 5}.Humanize(", and");
new { 1, 2, 3, 4, 5}.Humanize(", or");
new { 1, 2, 3, 4, 5}.Humanize("и"); |
Good point @hazzik. Agreed. We could also provide a configuration point for the separator or CollectionFormatter. If the config and the separator on the method call are both missing, we could then fall back to a collection formatter configured per locale. |
Any updates on this? Is this still a general to-do? Should this be in for 2.0 or vNext? |
vNext |
There appears to be a slight bug in the humanised collections which includes an extra comma:
the comma after Three should not be there.
The text was updated successfully, but these errors were encountered: