From f0265cccf219068499ddd210ea573b29e47954ea Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Tue, 22 Jan 2019 10:14:32 +0100 Subject: [PATCH] Respect user locale in natural sort comparator Signed-off-by: Christoph Wurst --- core/js/js.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/js/js.js b/core/js/js.js index e306e2a736..fd6dcfcff6 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()); } } }