From 6e5e6ef28ef46cb474a632a353bdb4f3e4d11582 Mon Sep 17 00:00:00 2001 From: kanu Date: Fri, 12 Apr 2013 12:36:57 +0200 Subject: [PATCH] fixed lang_sel view picking the wrong file. --- rosetta/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rosetta/views.py b/rosetta/views.py index 80fd4c6..618c497 100644 --- a/rosetta/views.py +++ b/rosetta/views.py @@ -371,7 +371,7 @@ def lang_sel(request, langid, idx): third_party_apps = rosetta_i18n_catalog_filter in ('all', 'third-party') django_apps = rosetta_i18n_catalog_filter in ('all', 'django') project_apps = rosetta_i18n_catalog_filter in ('all', 'project') - file_ = find_pos(langid, project_apps=project_apps, django_apps=django_apps, third_party_apps=third_party_apps)[int(idx)] + file_ = sorted(find_pos(langid, project_apps=project_apps, django_apps=django_apps, third_party_apps=third_party_apps), key=get_app_name)[int(idx)] storage.set('rosetta_i18n_lang_code', langid) storage.set('rosetta_i18n_lang_name', six.text_type([l[1] for l in settings.LANGUAGES if l[0] == langid][0]))