summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-01-22 10:14:32 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2019-01-22 10:16:40 +0100
commitf0265cccf219068499ddd210ea573b29e47954ea (patch)
treed769ba9b628be7a53a8a775a2eddd2d609a65139
parentf31b82b8c94f9a9b32d9ad18c5d6ab7fba7eaec0 (diff)
downloadnextcloud-server-f0265cccf219068499ddd210ea573b29e47954ea.tar.gz
nextcloud-server-f0265cccf219068499ddd210ea573b29e47954ea.zip
Respect user locale in natural sort comparator
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r--core/js/js.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/core/js/js.js b/core/js/js.js
index e306e2a7369..fd6dcfcff6a 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -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());
}
}
}