Respect user locale in natural sort comparator
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
f31b82b8c9
commit
f0265cccf2
|
@ -2082,12 +2082,9 @@ OC.Util = {
|
||||||
if (aNum == aa[x] && bNum == bb[x]) {
|
if (aNum == aa[x] && bNum == bb[x]) {
|
||||||
return aNum - bNum;
|
return aNum - bNum;
|
||||||
} else {
|
} else {
|
||||||
// Forcing 'en' locale to match the server-side locale which is
|
// Note: This locale setting isn't supported by all browsers but for the ones
|
||||||
// always 'en'.
|
|
||||||
//
|
|
||||||
// Note: This setting isn't supported by all browsers but for the ones
|
|
||||||
// that do there will be more consistency between client-server sorting
|
// 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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue