From aa7cccad940725599dfbf4c3ba9a67248d421a28 Mon Sep 17 00:00:00 2001 From: Veronica Musso Date: Fri, 6 Jun 2014 01:52:44 -0300 Subject: [PATCH] Country names in capital letters Use of capwords function to format country names in user setting screen. Change-Id: Ic96c1e0ccfda4101f34c014b9ff5d2f0231c6709 Closes-Bug: #1325688 --- openstack_dashboard/dashboards/settings/user/forms.py | 2 ++ 1 file changed, 2 insertions(+) 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