Merge pull request #13730 from nextcloud/fix/naturalsort-locale

Respect user locale in natural sort comparator
This commit is contained in:
Morris Jobke 2019-01-23 12:19:01 +01:00 committed by GitHub
commit d59de22525
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -2082,12 +2082,9 @@ OC.Util = {
if (aNum == aa[x] && bNum == bb[x]) {
return aNum - bNum;
} else {
// Forcing 'en' locale to match the server-side locale which is
// always 'en'.
//
// Note: This setting isn't supported by all browsers but for the ones
// Note: This locale setting isn't supported by all browsers but for the ones
// that do there will be more consistency between client-server sorting
return aa[x].localeCompare(bb[x], 'en');
return aa[x].localeCompare(bb[x], OC.getLanguage());
}
}
}