1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 16:55:24 +03:00

Fix ordering locale with underscore (#1561)

Fix ordering locale with underscore
This commit is contained in:
Michael Keller 2019-08-08 21:33:04 +12:00 committed by GitHub
commit 11de751a5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;