Commit e94b1a5c by Diana Huang Committed by Julia Hansbrough

If we run into issues with languages, use default

parent a6f147af
...@@ -471,27 +471,35 @@ def dashboard(request): ...@@ -471,27 +471,35 @@ def dashboard(request):
denied_banner = any(item.display for item in reverifications["denied"]) denied_banner = any(item.display for item in reverifications["denied"])
language_options = DarkLangConfig.current().released_languages_list language_options = DarkLangConfig.current().released_languages_list
current_language = translation.get_language_info(translation.get_language())
if not language_options:
context = {'course_enrollment_pairs': course_enrollment_pairs, language_options = [settings.LANGUAGE_CODE]
'course_optouts': course_optouts,
'message': message, try:
'external_auth_map': external_auth_map, current_language = translation.get_language_info(translation.get_language())
'staff_access': staff_access, except KeyError:
'errored_courses': errored_courses, current_language = translation.get_language_info(settings.LANGUAGE_CODE)
'show_courseware_links_for': show_courseware_links_for,
'all_course_modes': course_modes, context = {
'cert_statuses': cert_statuses, 'course_enrollment_pairs': course_enrollment_pairs,
'show_email_settings_for': show_email_settings_for, 'course_optouts': course_optouts,
'reverifications': reverifications, 'message': message,
'verification_status': verification_status, 'external_auth_map': external_auth_map,
'verification_msg': verification_msg, 'staff_access': staff_access,
'show_refund_option_for': show_refund_option_for, 'errored_courses': errored_courses,
'denied_banner': denied_banner, 'show_courseware_links_for': show_courseware_links_for,
'billing_email': settings.PAYMENT_SUPPORT_EMAIL, 'all_course_modes': course_modes,
'language_options': language_options, 'cert_statuses': cert_statuses,
'current_language': current_language, 'show_email_settings_for': show_email_settings_for,
} 'reverifications': reverifications,
'verification_status': verification_status,
'verification_msg': verification_msg,
'show_refund_option_for': show_refund_option_for,
'denied_banner': denied_banner,
'billing_email': settings.PAYMENT_SUPPORT_EMAIL,
'language_options': language_options,
'current_language': current_language,
}
return render_to_response('dashboard.html', context) return render_to_response('dashboard.html', context)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment