Bug 1970604

Summary: Add IDP menu items are not translated
Product: OpenShift Container Platform Reporter: Samuel Padgett <spadgett>
Component: Management ConsoleAssignee: Cyril <cajieh>
Status: CLOSED ERRATA QA Contact: Yanping Zhang <yanpzhan>
Severity: low Docs Contact:
Priority: low    
Version: 4.8CC: aos-bugs, jokerman, ralpert, yapei
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Incorrect code Consequence: The IDP menu items were not translated Fix: Split the keys from the displayed values using switch statement. Result: The IDP menu items are translated
Story Points: ---
Clone Of: Environment:
Version: 4.8.0-0.nightly-2021-06-10-045932 Cluster ID: b0ec356e-83e7-4588-82cd-db5006b16bd4 Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/89.0
Last Closed: 2021-10-18 17:33:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
ja translation file none

Description Samuel Padgett 2021-06-10 18:58:29 UTC
The IDP items on the OAuth config details page aren't properly enabled for translation. They will always show up as English. See the code here:

https://github.com/spadgett/console/blob/ded0de8063bec2e02a07defeb1a050f4c9bf0399/frontend/public/components/cluster-settings/oauth.tsx#L50-L89

`{{label}}` will always evaluate to the English value set in the map from just above.

Comment 1 Cyril 2021-06-16 20:34:54 UTC
ralpert The IDP menu items are missing translation for other languages. Could you please help to get the translation file updated?

Comment 2 Cyril 2021-06-16 20:37:34 UTC
Created attachment 1791596 [details]
ja translation file

Comment 3 ralpert 2021-06-17 13:58:16 UTC
Hey @cajieh - Sorry I missed this yesterday. I think the issue here is that even though we're generating keys with the comments (//t('public~Request Header') and so on), we don't actually internationalize the values in the application. We're just passing these hard-coded English values in.

Sometimes the translators will prefer to leave proper nouns like Google in English, but I can see that they did translate a few of the terms. With the way the code is now, we won't ever seem those.

Comment 5 Yanping Zhang 2021-06-23 09:02:44 UTC
Checked on ocp 4.9 cluster with payload 4.9.0-0.nightly-2021-06-22-193627, now the add idp menu are translated in Chinese/Japanese/Korean, but "OpenID Connect" string in menu and on adding page are not translated in Japanese. Will we add the translation for it?

Comment 8 ralpert 2021-06-23 13:32:21 UTC
Hey @yanpzhan - It looks like Aiko intentionally left that in English.

Comment 9 Cyril 2021-06-23 13:58:00 UTC
@ralpert Thanks for responding to the query.

Comment 10 Cyril 2021-06-28 14:26:13 UTC
@yanpzhan - Please retest this fix.

Comment 11 Yanping Zhang 2021-06-30 02:40:19 UTC
According to Comment 8, the "OpenID Connect" string is intentionally kept in English, there is no other doubts about the fix, so move the bug to Verified.

Comment 14 errata-xmlrpc 2021-10-18 17:33: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.9.0 bug fix and security 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-2021:3759