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

Add locale option and sort using locale (closes #349) #350

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SmallhillCZ
Copy link

@SmallhillCZ SmallhillCZ commented Jan 27, 2023

What: Sorting is made to be locale aware

Why: sorting of non-ACII languages does not work correctly, see #349

How:

  • contributorsSortLocale option is added to CLI to control which locale is going to be used for alphabetic sorting
  • alphabetic sorting is done using String.localeCompare instead of _.sortBy to enable locale aware sorting

Checklist:

  • Documentation
  • Tests
  • Ready to be merged
  • Added myself to contributors table

TODOs:

  1. husky git hook forces some whitespace changes by running prettier, is that correct?
  2. can't find the documentation to add this into, is it meant to do another PR for the website?
  3. there is a test for sorting already, is that enough, or should I create a special test for different locale?

@SmallhillCZ SmallhillCZ requested a review from a team as a code owner January 27, 2023 13:02
@Berkmann18
Copy link
Member

Berkmann18 commented May 19, 2023

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.

@SmallhillCZ
Copy link
Author

Thanks, I will have a look into this next month, this one is too full already ;)

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

Successfully merging this pull request may close these issues.

2 participants