Bug 1900010 - Fix internationalized sentence fragments in BuildImageSelector.tsx
Summary: Fix internationalized sentence fragments in BuildImageSelector.tsx
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.7
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.7.0
Assignee: Yadan Pei
QA Contact: Yadan Pei
Depends On:
TreeView+ depends on / blocked
Reported: 2020-11-20 15:27 UTC by ralpert
Modified: 2021-02-24 15:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-02-24 15:35:07 UTC
Target Upstream Version:

Attachments (Terms of Use)
Import from Git - pseudolocalized (107.18 KB, image/png)
2020-11-23 15:45 UTC, ralpert
no flags Details
Deploy Image - pseudolocalized (266.59 KB, image/png)
2020-11-23 15:46 UTC, ralpert
no flags Details
Import from Git - translated (359.98 KB, image/png)
2020-11-25 03:33 UTC, Yadan Pei
no flags Details

System ID Private Priority Status Summary Last Updated
Github openshift console pull 7285 0 None closed Bug 1900010: Fix i18n sentence fragment 2020-11-25 01:28:07 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:35:33 UTC

Description ralpert 2020-11-20 15:27:49 UTC
Description of problem:
Translation came back to us with questions about an internationalized sentence fragment "Recommended builder images are represented by" in Developer console. I looked for it and found it in packages/dev-console/src/components/import/builder/BuilderImageSelector.tsx. We should be using the <Trans> component there instead of breaking the sentence up into fragments.

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

How reproducible:

Actual results:
Sentence is broken into fragments that are hard to translate.

Expected results:
It should be a complete sentence wrapped by the Trans component.

Comment 2 Yadan Pei 2020-11-23 07:19:13 UTC
Hi Rebecca,

I checked openshift/console#7284 and openshift/console#7285 on 4.7.0-0.nightly-2020-11-22-123106

Here are my steps to verify them:

To verify bug 1900008, I visited <console_route>/deploy-image/ns/openshift-console?pseudolocalization=true&lng=en but the sentence `To deploy an image from a private repository, you must create an image pull secret with your image registry credentials.` is not translated 

To verify bug 1900010, I visited <console_route>/import/ns/openshift-console?pseudolocalization=true&lng=en, search https://github.com/openshift/ruby-hello-world Git Repo, but sentence `Recommended builder images are represented by (star) icon.` is not translated

How can I check the pseudolocalization internationalization of these sentences?

Comment 3 Yadan Pei 2020-11-23 07:20:24 UTC
# oc adm release info registry.svc.ci.openshift.org/ocp/release:4.7.0-0.nightly-2020-11-22-123106 --pullspecs | grep console
  console                                        quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:39c1286b4552b31f179ce098dc7c91bf01ce372fe263c6504275caf2689a75f7
  console-operator                               quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:5bcae624f433b7e55cd3e6d3840f86bdee8461c9956336a149d3152ac9bfb266

# oc image info quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:39c1286b4552b31f179ce098dc7c91bf01ce372fe263c6504275caf2689a75f7 | grep commit

# git log 6427365dac7d0cdadeb487c6b7fdec34a562d157 | grep '#7284'
    Merge pull request #7284 from rebeccaalpert/fix-translation

# git log 6427365dac7d0cdadeb487c6b7fdec34a562d157 | grep '#7285'
    Merge pull request #7285 from rebeccaalpert/i18n-fix-fragment

4.7.0-0.nightly-2020-11-22-123106 already contains the two fix PRs

Comment 4 ralpert 2020-11-23 15:45:42 UTC
Created attachment 1732610 [details]
Import from Git - pseudolocalized

Comment 5 ralpert 2020-11-23 15:46:18 UTC
Created attachment 1732611 [details]
Deploy Image - pseudolocalized

Comment 6 ralpert 2020-11-23 15:48:15 UTC
Hey @yapei - I followed your instructions and was able to see the text pseudolocalized (see attachments). I'm wondering if this isn't a bug with the query parameter.

Comment 7 Yadan Pei 2020-11-25 03:33:16 UTC
Created attachment 1733247 [details]
Import from Git - translated

Thank you Rebecca,

I tried today on 4.7.0-0.nightly-2020-11-24-151855 and all working as expected.

`Recommended builder images are represented by (star) icon.` sentence is wrapped in `<Trans>` component and they are translated, see my screenshot

Comment 10 errata-xmlrpc 2021-02-24 15:35:07 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.


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