Add locale option and sort using locale (closes #349)
What: Sorting is made to be locale aware
Why: sorting of non-ACII languages does not work correctly, see #349
How:
contributorsSortLocaleoption is added to CLI to control which locale is going to be used for alphabetic sorting- alphabetic sorting is done using
String.localeCompareinstead of_.sortByto enable locale aware sorting
Checklist:
- [ ] Documentation
- [ ] Tests
- [ ] Ready to be merged
- [ ] Added myself to contributors table
TODOs:
- husky git hook forces some whitespace changes by running prettier, is that correct?
- can't find the documentation to add this into, is it meant to do another PR for the website?
- there is a test for sorting already, is that enough, or should I create a special test for different locale?
husky git hook forces some whitespace changes by running prettier, is that correct?
Nope, aside from when the lines are too long (since there's a max length for rows).
can't find the documentation to add this into, is it meant to do another PR for the website?
Yeah, the docs are in https://github.com/all-contributors/all-contributors.
there is a test for sorting already, is that enough, or should I create a special test for different locale?
Yes, please.
Thanks, I will have a look into this next month, this one is too full already ;)