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: sort the templates according to locale and enable numeric sorting #34

Merged
merged 1 commit into from
Aug 16, 2021

Conversation

nishantwrp
Copy link
Collaborator

Fixes #27.

@nishantwrp
Copy link
Collaborator Author

Also, Joplin stores locale as 'language-region' for example 'en-us'. The localeCompare function only wants the language ('en'). So you'll need to handle that.

Actually, as given here this function also accepts the locale as language-region and in Joplin it is stored as language_region. I've handled that.

@CalebJohn
Copy link
Collaborator

I've handled that.

Nice catch! It looks good to me. Thanks.

@nishantwrp nishantwrp merged commit 91a4d0c into master Aug 16, 2021
@nishantwrp nishantwrp deleted the template-sorting branch August 16, 2021 17:45
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.

Improve the templates sorting
2 participants