Bug 1924188 - Language selector dropdown doesn't always pre-select the language
Summary: Language selector dropdown doesn't always pre-select the language
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.7.0
Assignee: ralpert
QA Contact: Yanping Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-02 18:29 UTC by ralpert
Modified: 2021-02-24 15:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The react-i18next equivalent of i18next.language was being used. This value only returns the current active language. The language we display is more complicated since we default variants of languages (such as en-us) to the parent (en). This meant that en-us or a language we don't support, such as de, would never "match" and auto-select the value in the dropdown. Consequence: The language was not auto-selected in the dropdown. Fix: I updated the logic to compare the languages we support with i18next.languages, which returns an array of languages, including the detected language and defaults being used. Result: The language is auto-selected.
Clone Of:
Environment:
Last Closed: 2021-02-24 15:57:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 8009 0 None closed Bug 1924188: Update language selector modal dropdown 2021-02-08 14:52:24 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:58:06 UTC

Description ralpert 2021-02-02 18:29:36 UTC
Description of problem:
The language selector dropdown only works when the language is en, ja, or zh exactly. It doesn't handle languages we don't support or subsets of languages (such as country-specific en-us).

Version-Release number of selected component (if applicable):
4.7

How reproducible:
Always.

Steps to Reproduce:
1. Set browser language to en-us or es
2. Open Language preferences modal
3. English will not be pre-selected

Actual results:
The language isn't pre-selected.

Expected results:
The language is pre-selected.

Comment 2 Yanping Zhang 2021-02-04 10:48:07 UTC
Checked on ocp 4.7 cluster with payload 4.7.0-0.nightly-2021-02-03-165316.
1. Set browser language to en-us or German.(Clear browser cache)
2. Login console, and open Language preferences modal, The English language is pre-selected.

Comment 5 errata-xmlrpc 2021-02-24 15:57:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:5633


Note You need to log in before you can comment on or make changes to this bug.