Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missed i18n strings #7388

Merged
merged 1 commit into from Dec 2, 2020

Conversation

yaacov
Copy link
Member

@yaacov yaacov commented Dec 2, 2020

Add missing translations in:
Template Details page:
screenshot-localhost_9000-2020 12 02-14_16_47

VM GA Alert and VM Inventory cards:
screenshot-localhost_9000-2020 12 02-14_17_21

@openshift-ci-robot openshift-ci-robot added the component/kubevirt Related to kubevirt-plugin label Dec 2, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 2, 2020
@yaacov
Copy link
Member Author

yaacov commented Dec 2, 2020

@rawagner @pcbailey please review

@@ -116,7 +116,7 @@ export const VMInventoryCard: React.FC<VMInventoryCardProps> = () => {
{diskCount > 0 && (
<InventoryItem
isLoading={isLoading}
title={DiskType.DISK.toString()}
title={t('kubevirt-plugin~Disk')}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: not using plural translation here because the InventoryItem does none i18n pluralization and adds s, it we pluralize using i18n we will get an extra s <translated plural>s that comes from InventoryItem

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can pass titlePlural

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added titlePlural

@rawagner
Copy link
Contributor

rawagner commented Dec 2, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 2, 2020
@yaacov
Copy link
Member Author

yaacov commented Dec 2, 2020

/retest

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Dec 2, 2020
const { t } = useTranslation();
return (
<AlertsBody>
{vmi &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we extract these conditions into two variables?

const guestAgentNotSupported = vmi && vmi.status && isGuestAgentVersionNotSupported(vmi);
const guestAgentNotInstalled = vmi && vmi.status && !isGuestAgentInstalled(vmi) && !isGuestAgentVersionNotSupported(vmi);

It would be even cleaner if we use optional chaining.

const guestAgentNotSupported = vmi?.status && isGuestAgentVersionNotSupported(vmi);
const guestAgentNotInstalled = vmi?.status && !isGuestAgentInstalled(vmi) && !isGuestAgentVersionNotSupported(vmi);

@pcbailey
Copy link
Contributor

pcbailey commented Dec 2, 2020

/lgtm

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pcbailey, rawagner, yaacov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 2, 2020
@yaacov
Copy link
Member Author

yaacov commented Dec 2, 2020

/retest

4 similar comments
@yaacov
Copy link
Member Author

yaacov commented Dec 2, 2020

/retest

@yaacov
Copy link
Member Author

yaacov commented Dec 2, 2020

/retest

@yaacov
Copy link
Member Author

yaacov commented Dec 2, 2020

/retest

@yaacov
Copy link
Member Author

yaacov commented Dec 2, 2020

/retest

@openshift-merge-robot openshift-merge-robot merged commit b00236c into openshift:master Dec 2, 2020
@spadgett spadgett added this to the v4.7 milestone Dec 9, 2020
@spadgett spadgett added the kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated label Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/kubevirt Related to kubevirt-plugin kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants