1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-23 22:36:32 +02:00

Desktop: Fixes #10077: Special characters in notebooks and tags are not sorted alphabetically (#10085)

Co-authored-by: Martin Dörfelt <martin.d@andix.de>
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
This commit is contained in:
cagnusmarlsen
2024-03-20 16:47:46 +05:30
committed by GitHub
parent ea29cf4e13
commit e9ebd845b9
7 changed files with 70 additions and 12 deletions

View File

@@ -0,0 +1,12 @@
import { currentLocale, languageCodeOnly } from '../../locale';
function getCollator(locale: string = getCollatorLocale()) {
return new Intl.Collator(locale, { numeric: true, sensitivity: 'accent' });
}
function getCollatorLocale() {
const collatorLocale = languageCodeOnly(currentLocale());
return collatorLocale;
}
export { getCollator, getCollatorLocale };