mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-16 20:40:10 +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{
|
||||
var lang = this.langs.find(l => l.code === this.sourceLang);
|
||||
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