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
Add missed i18n strings #7388
Conversation
@@ -116,7 +116,7 @@ export const VMInventoryCard: React.FC<VMInventoryCardProps> = () => { | |||
{diskCount > 0 && ( | |||
<InventoryItem | |||
isLoading={isLoading} | |||
title={DiskType.DISK.toString()} | |||
title={t('kubevirt-plugin~Disk')} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can pass titlePlural
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added titlePlural
e4577a9
to
1ddf85d
Compare
/lgtm |
/retest |
1ddf85d
to
73520fb
Compare
const { t } = useTranslation(); | ||
return ( | ||
<AlertsBody> | ||
{vmi && |
There was a problem hiding this comment.
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);
73520fb
to
4018256
Compare
/lgtm |
[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 |
/retest |
4 similar comments
/retest |
/retest |
/retest |
/retest |
Add missing translations in:
Template Details page:
VM GA Alert and VM Inventory cards: