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

fix(admin-ui): sort supported languages alphabetically #5479

Merged

Conversation

VariableVic
Copy link
Contributor

What?

Added sorting to the supportedLanguages array in packages/admin-ui/ui/src/i18n/index.ts. This makes sure the languages in the dropdown are sorted alphabetically.

image

Why?

As we're supporting more languages in the admin UI, this list was getting messy.

How?

By using sort() and localeCompare() on array declaration.

Testing

Go to Medusa Admin locally, login and navigate to Settings > Personal information to test the language dropdown.

@VariableVic VariableVic requested a review from a team as a code owner October 26, 2023 13:08
@changeset-bot
Copy link

changeset-bot bot commented Oct 26, 2023

🦋 Changeset detected

Latest commit: fc63e42

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@medusajs/admin-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Oct 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Visit Preview Nov 14, 2023 2:49pm
docs-ui ⬜️ Ignored (Inspect) Visit Preview Nov 14, 2023 2:49pm
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Nov 14, 2023 2:49pm

@its-kunal
Copy link
Contributor

its-kunal commented Oct 27, 2023

Is this issue still open, I would like to contribute.

@VariableVic
Copy link
Contributor Author

@its-kunal what would you like to add?

@kasperkristensen kasperkristensen requested a review from a team as a code owner November 14, 2023 14:49
Copy link
Contributor

@kasperkristensen kasperkristensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kodiakhq kodiakhq bot merged commit 3f016d8 into develop Nov 14, 2023
15 checks passed
@kodiakhq kodiakhq bot deleted the fix/admin-ui-sort-supported-languages-alphabetically branch November 14, 2023 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants