Sort translators in import filepicker drop-down
This commit is contained in:
parent
04516af552
commit
0e72ee3305
1 changed files with 5 additions and 2 deletions
|
@ -224,8 +224,11 @@ var Zotero_File_Interface = new function() {
|
|||
fp.init(window, Zotero.getString("fileInterface.import"), nsIFilePicker.modeOpen);
|
||||
|
||||
fp.appendFilters(nsIFilePicker.filterAll);
|
||||
for(var i in translators) {
|
||||
fp.appendFilter(translators[i].label, "*."+translators[i].target);
|
||||
|
||||
var collation = Zotero.getLocaleCollation();
|
||||
translators.sort((a, b) => collation.compareString(1, a.label, b.label))
|
||||
for (let translator of translators) {
|
||||
fp.appendFilter(translator.label, "*." + translator.target);
|
||||
}
|
||||
|
||||
var rv = fp.show();
|
||||
|
|
Loading…
Reference in a new issue