diff --git a/openstack_dashboard/dashboards/settings/user/forms.py b/openstack_dashboard/dashboards/settings/user/forms.py index 5acbb4ff01..e953d88725 100644 --- a/openstack_dashboard/dashboards/settings/user/forms.py +++ b/openstack_dashboard/dashboards/settings/user/forms.py @@ -14,6 +14,7 @@ from datetime import datetime # noqa import pytz +import string from django.conf import settings from django import shortcuts @@ -49,6 +50,7 @@ class UserSettingsForm(forms.SelfHandlingForm): def get_language_display_name(code, desc): try: desc = translation.get_language_info(code)['name_local'] + desc = string.capwords(desc) except KeyError: # If a language is not defined in django.conf.locale.LANG_INFO # get_language_info raises KeyError