summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-01-22 10:14:32 +0100
committerBackportbot <backportbot-noreply@rullzer.com>2019-01-23 11:20:56 +0000
commitaafc32ecca5b883bfe760f36d5f52047b25e967a (patch)
tree005dfb55dd0a0f0c30e9280c58707001e7d20972
parent5c6a1f70cb9d04a58fc5ac42a04c35fb093cb2b5 (diff)
downloadnextcloud-server-aafc32ecca5b883bfe760f36d5f52047b25e967a.tar.gz
nextcloud-server-aafc32ecca5b883bfe760f36d5f52047b25e967a.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 8d79311002e..e69c05b14a1 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -2133,12 +2133,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());
}
}
}