Skip to content

Commit

Permalink
Merge pull request #1139 from sgratch/rephrase-preserveStaticIPs-text…
Browse files Browse the repository at this point in the history
…-label

🧼 ephrase the text label for the preserveStaticIPs flag
  • Loading branch information
yaacov authored May 6, 2024
2 parents cc02eac + 9284dc7 commit 6c017da
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
"Details": "Details",
"Determines the frequency with which the system checks the status of snapshot creation or removal during oVirt warm migration. The default value is 10 seconds.": "Determines the frequency with which the system checks the status of snapshot creation or removal during oVirt warm migration. The default value is 10 seconds.",
"Disk Transfer": "Disk Transfer",
"Do not try to preserve the static IPs of VMs with Windows guest operating system from vSphere.": "Do not try to preserve the static IPs of VMs with Windows guest operating system from vSphere.",
"Domain": "Domain",
"Domain name": "Domain name",
"Drag and drop a file or upload one": "Drag and drop a file or upload one",
Expand Down Expand Up @@ -336,7 +337,7 @@
"Preserve CPU model": "Preserve CPU model",
"Preserve static IPs": "Preserve static IPs",
"Preserve the CPU model and flags the VM runs with in its oVirt cluster.": "Preserve the CPU model and flags the VM runs with in its oVirt cluster.",
"Preserve the static IPs that the VM runs with in vSphere provider's environment.": "Preserve the static IPs that the VM runs with in vSphere provider's environment.",
"Preserve the static IPs of VMs with Windows guest operating system from vSphere.": "Preserve the static IPs of VMs with Windows guest operating system from vSphere.",
"Product": "Product",
"Project": "Project",
"Project ID": "Project ID",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const PreserveStaticIPsDetailsItem: React.FC<PlanDetailsItemProps> = ({
const { showModal } = useModal();

const defaultHelpContent = t(
`Preserve the static IPs that the VM runs with in vSphere provider's environment.`,
`Preserve the static IPs of VMs with Windows guest operating system from vSphere.`,
);

const trueLabel = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ interface SwitchRendererProps {
}

const PreserveStaticIPsInputFactory: () => ModalInputComponentType = () => {
const { t } = useForkliftTranslation();

const SwitchRenderer: React.FC<SwitchRendererProps> = ({ value, onChange }) => {
const onChangeInternal = (v) => {
onChange(v ? 'true' : 'false');
Expand All @@ -46,8 +48,12 @@ const PreserveStaticIPsInputFactory: () => ModalInputComponentType = () => {
return (
<Switch
id="simple-switch"
label="Preserve the static IPs that the VM runs with in vSphere provider's environment."
labelOff="Do not try to preserve the static IPs that the VM runs with in vSphere provider's environment."
label={t(
'Preserve the static IPs of VMs with Windows guest operating system from vSphere.',
)}
labelOff={t(
'Do not try to preserve the static IPs of VMs with Windows guest operating system from vSphere.',
)}
isChecked={value === 'true'}
onChange={onChangeInternal}
/>
Expand All @@ -68,7 +74,7 @@ const EditPlanPreserveStaticIPs_: React.FC<EditPlanPreserveStaticIPsProps> = (pr
label={props?.label || t('Whether to preserve the static IPs')}
model={PlanModel}
onConfirmHook={onConfirm}
body={t(`Preserve the static IPs that the VM runs with in vSphere provider's environment.`)}
body={t(`Preserve the static IPs of VMs with Windows guest operating system from vSphere.`)}
InputComponent={PreserveStaticIPsInputFactory()}
/>
);
Expand Down

0 comments on commit 6c017da

Please sign in to comment.