Bug 1992730 - Dynamic Plugins: localization does not work for plugin
Summary: Dynamic Plugins: localization does not work for plugin
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.9
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.9.0
Assignee: Yadan Pei
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-11 16:40 UTC by cvogt
Modified: 2021-10-18 17:46 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-18 17:45:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
plugin pesudo translation (511.13 KB, image/png)
2021-08-31 09:34 UTC, Yadan Pei
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 9791 0 None None None 2021-08-11 20:51:01 UTC
Red Hat Product Errata RHSA-2021:3759 0 None None None 2021-10-18 17:46:14 UTC

Description cvogt 2021-08-11 16:40:13 UTC
Description of problem:
https://github.com/openshift/console/issues/9748

Follow the guide to enable the localization of my dynamic plugin, then I find it does not work.
https://github.com/openshift/enhancements/blob/master/enhancements/console/dynamic-plugins.md#localization

After investigation, function HandleI18nResources does not receive the request to process dynamic plugin url. It only receives static plugin related requests.
Further investigation shows similar function HandlePluginAssets works well with dynamic plugin.


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

How reproducible:


Steps to Reproduce:
1. build a dynamic plugin
2. follow these steps to add localization to the plugin https://github.com/openshift/enhancements/blob/master/enhancements/console/dynamic-plugins.md#localization
3. test deploying and loading the plugin in console

Actual results:

Plugin strings are not translated.

Expected results:

Localization of plugin strings should load the plugin locale file.

Additional info:

Comment 4 Yadan Pei 2021-08-31 09:34:10 UTC
Created attachment 1819317 [details]
plugin pesudo translation

1. Build dynamic plugin image following step in https://github.com/openshift/console/tree/master/frontend/dynamic-demo-plugin#docker-image

2. Replace the image in oc-manifest.yaml and then deploy the plugin to the cluster
oc apply -f oc-manifest.yaml

3. enable the plugin
$ oc get console.operator cluster -o json | jq .spec.plugins
[
  "console-demo-plugin"
]

4. Visit /test-consumer?pseudolocalization=true&lng=en, we can see 

Extensions of type Console.flag/Model is pesudo translated
Model Flag value and Model Group are also pesudo translated too

Moving to VERIFIED 4.9.0-0.nightly-2021-08-30-192239

Let me know if checks are wrong

Comment 5 Samuel Padgett 2021-08-31 12:16:36 UTC
Steps to reproduce look perfect, thank you!

Comment 8 errata-xmlrpc 2021-10-18 17:45:58 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


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