mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-21 23:41:01 +00:00
Fix translate into sort order
This commit is contained in:
parent
87322de964
commit
e5258d0cb6
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue