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

Check whether the locale data should use locale aware sorting #2905

Open
ST-DDT opened this issue May 16, 2024 · 3 comments · May be fixed by #2906
Open

Check whether the locale data should use locale aware sorting #2905

ST-DDT opened this issue May 16, 2024 · 3 comments · May be fixed by #2906
Assignees
Labels
c: infra Changes to our infrastructure or project setup c: locale Permutes locale definitions p: 1-normal Nothing urgent s: on hold Blocked by something or frozen to avoid conflicts
Milestone

Comments

@ST-DDT
Copy link
Member

ST-DDT commented May 16, 2024

We should check whether the locale data should be sorted with their original locale in mind.

.sort() as T

@ST-DDT ST-DDT added p: 1-normal Nothing urgent c: locale Permutes locale definitions c: infra Changes to our infrastructure or project setup labels May 16, 2024
@ST-DDT ST-DDT added this to the v9.0 milestone May 16, 2024
@ST-DDT
Copy link
Member Author

ST-DDT commented May 16, 2024

Blocked by the initial sorting of the locale data after #2265

@ST-DDT ST-DDT added the s: on hold Blocked by something or frozen to avoid conflicts label May 16, 2024
@xDivisionByZerox
Copy link
Member

Potentially relevant implementation details in #2265 (comment).

Same as with the language aware letters. I can extend the previos compare function to be numeric aware:

const arr = ['B', 'A', 'Å', 'Å9', 'Å11']
const sorted = arr.toSorted((a,b) => a.localeCompare(b, undefined, { numeric: true }));
console.log(sorted); // ['A', 'Å', 'Å9', 'Å11', 'B']

@matthewmayer matthewmayer linked a pull request May 17, 2024 that will close this issue
@matthewmayer
Copy link
Contributor

i tried a draft implementation at #2906 - this is imperfect, but gives you an idea of the scope of the likely changes if this is done.

@ST-DDT ST-DDT linked a pull request May 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: infra Changes to our infrastructure or project setup c: locale Permutes locale definitions p: 1-normal Nothing urgent s: on hold Blocked by something or frozen to avoid conflicts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants