diff options
author | Radomir Dopieralski <openstack@sheep.art.pl> | 2019-03-05 16:43:06 +0100 |
---|---|---|
committer | Radomir Dopieralski <openstack@sheep.art.pl> | 2019-03-07 08:57:11 +0000 |
commit | 24b6534022b10618e5b4de8c7d8493fb372e1b06 (patch) | |
tree | 561ea6e4704f6d36b9a06204f3c2d435cb0bd38b | |
parent | e55af0c7a1b75b4d655845fb00d11a600906f7e4 (diff) | |
download | horizon-24b6534022b10618e5b4de8c7d8493fb372e1b06.tar.gz |
Don't use check_for_language in the user settings form
That function is buggy and can't handle the Chinese language codes.
Closes-Bug: #1818639
Change-Id: I6ea03949f3ad6db82f5965de3fa028a84edf6cf3
(cherry picked from commit 6372a689e20252e4a18a59a6ded8841bfa5ed004)
-rw-r--r-- | openstack_dashboard/dashboards/settings/user/forms.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/openstack_dashboard/dashboards/settings/user/forms.py b/openstack_dashboard/dashboards/settings/user/forms.py index ec9f02947..2e6cf249a 100644 --- a/openstack_dashboard/dashboards/settings/user/forms.py +++ b/openstack_dashboard/dashboards/settings/user/forms.py @@ -103,9 +103,8 @@ class UserSettingsForm(forms.SelfHandlingForm): response = shortcuts.redirect(request.build_absolute_uri()) lang_code = data['language'] - if lang_code and translation.check_for_language(lang_code): - response = functions.save_config_value( - request, response, settings.LANGUAGE_COOKIE_NAME, lang_code) + response = functions.save_config_value( + request, response, settings.LANGUAGE_COOKIE_NAME, lang_code) response = functions.save_config_value( request, response, 'django_timezone', |