mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-17 04:50:11 +01:00
Fix translate into sort order
This commit is contained in:
parent
87322de964
commit
e5258d0cb6
@ -155,7 +155,11 @@ document.addEventListener('DOMContentLoaded', function(){
|
|||||||
else{
|
else{
|
||||||
var lang = this.langs.find(l => l.code === this.sourceLang);
|
var lang = this.langs.find(l => l.code === this.sourceLang);
|
||||||
if (!lang) return this.langs;
|
if (!lang) return this.langs;
|
||||||
return lang.targets.map(t => this.langs.find(l => l.code === t));
|
var tgtLangs = lang.targets.map(t => this.langs.find(l => l.code === t));
|
||||||
|
tgtLangs.sort(function(a, b){
|
||||||
|
return a.name.localeCompare(b.name);
|
||||||
|
});
|
||||||
|
return tgtLangs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user