mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-26 01:35:28 +03:00
Fix ordering locale with underscore (#1561)
Fix ordering locale with underscore
This commit is contained in:
commit
11de751a5d
1 changed files with 2 additions and 1 deletions
|
@ -2120,8 +2120,9 @@ TABS.osd.initialize = function (callback) {
|
||||||
fieldList.append(field);
|
fieldList.append(field);
|
||||||
} else {
|
} else {
|
||||||
let added = false;
|
let added = false;
|
||||||
|
let currentLocale = i18n.getCurrentLocale().replace('_', '-');
|
||||||
fieldList.children().each(function() {
|
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);
|
$(this).before(field);
|
||||||
added = true;
|
added = true;
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue