mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2026-02-17 00:30:11 -05:00
Sort source langs
This commit is contained in:
parent
29ec5ca5b8
commit
4f6a9cc193
@ -155,6 +155,13 @@ document.addEventListener('DOMContentLoaded', function(){
|
||||
canSendSuggestion: function(){
|
||||
return this.translatedText.trim() !== "" && this.translatedText !== this.savedTanslatedText;
|
||||
},
|
||||
sourceLangs: function(){
|
||||
var srcLangs = JSON.parse(JSON.stringify(this.langs));
|
||||
srcLangs.sort(function(a, b){
|
||||
return a.name.localeCompare(b.name);
|
||||
});
|
||||
return srcLangs;
|
||||
},
|
||||
targetLangs: function(){
|
||||
if (!this.sourceLang) return this.langs;
|
||||
else{
|
||||
|
||||
@ -195,7 +195,7 @@
|
||||
<span id="sourceLangLabel">{{ _h("Translate from") }}</span>
|
||||
<span v-if="detectedLangText !== ''">[[ detectedLangText ]]</span>
|
||||
<select aria-labelledby="sourceLangLabel" class="browser-default" v-model="sourceLang" ref="sourceLangDropdown" @change="handleInput">
|
||||
<template v-for="option in langs">
|
||||
<template v-for="option in sourceLangs">
|
||||
<option :value="option.code">[[ option.name ]]</option>
|
||||
</template>
|
||||
</select>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user