From 560229ddb5295f33ed27345c982ffaee0a8d7632 Mon Sep 17 00:00:00 2001 From: Miguel Angel Mulero Martinez Date: Wed, 7 Aug 2019 10:23:13 +0200 Subject: [PATCH] Fix ordering locale with underscore --- src/js/tabs/osd.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/tabs/osd.js b/src/js/tabs/osd.js index 81885dd8..e11e38da 100644 --- a/src/js/tabs/osd.js +++ b/src/js/tabs/osd.js @@ -2120,8 +2120,9 @@ TABS.osd.initialize = function (callback) { fieldList.append(field); } else { let added = false; + let currentLocale = i18n.getCurrentLocale().replace('_', '-'); fieldList.children().each(function() { - if ($(this).text().localeCompare(field.text(), i18n.getCurrentLocale(), { sensitivity: 'base' }) > 0) { + if ($(this).text().localeCompare(field.text(), currentLocale, { sensitivity: 'base' }) > 0) { $(this).before(field); added = true; return false;