From 82fd5e6e8a391c491f413a28b1692c32a88e01d9 Mon Sep 17 00:00:00 2001 From: bendikro Date: Mon, 9 May 2016 19:34:13 +0200 Subject: [PATCH] [UI] Fix sorting in ui/util/lang.py.get_languages() --- deluge/ui/util/lang.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deluge/ui/util/lang.py b/deluge/ui/util/lang.py index f7439d172..36558bfeb 100644 --- a/deluge/ui/util/lang.py +++ b/deluge/ui/util/lang.py @@ -44,11 +44,13 @@ def get_languages(): break lang = [] - for i, lang_code in enumerate(sorted(lang_dirs)): + for i, lang_code in enumerate(lang_dirs): name = "%s (Language name missing)" % lang_code if lang_code in languages.LANGUAGES: name = languages.LANGUAGES[lang_code] lang.append([lang_code, name]) + + lang = sorted(lang, key=lambda l: l[1]) return lang