Skip to content

Commit

Permalink
fix(app): fix module calibration wizard copy (#14192)
Browse files Browse the repository at this point in the history
* fix(app): fix module calibration wizard copy
  • Loading branch information
koji authored Dec 13, 2023
1 parent 4c76d5f commit fcbe7f5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
9 changes: 6 additions & 3 deletions app/src/assets/localization/en/module_wizard_flows.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
"error_during_calibration": "Error during calibration",
"error_prepping_module": "Error prepping module for calibration",
"exit": "Exit",
"firmware_updated": "{{module}} firmware updated!",
"firmware_up_to_date": "{{module}} firmware up to date.",
"firmware_updated": "{{module}} firmware updated!",
"get_started": "<block>To get started, remove labware from the deck and clean up the working area to make the calibration easier. Also gather the needed equipment shown to the right.</block><block>The calibration adapter came with your module. The pipette probe came with your Flex pipette.</block>",
"install_adapter": "Place calibration adapter in {{module}}",
"install_calibration_adapter": "Install calibration adapter",
"module_calibrating": "Stand back, {{moduleName}} is calibrating",
"module_calibration_failed": "The module calibration could not be completed. Contact customer support for assistance.",
"module_calibration": "Module calibration",
Expand All @@ -30,14 +32,15 @@
"move_gantry_to_front": "Move gantry to front",
"next": "Next",
"pipette_probe": "Pipette probe",
"install_adapter": "Place calibration adapter in {{module}}",
"place_flush_heater_shaker": "Place the adapter flush on the top of the module. Secure the adapter to the module with a thermal adapter screw and T10 Torx screwdriver.",
"place_flush_thermocycler": "Ensure the Thermocycler lid is open and place the adapter flush on top of the module where the labware would normally go. ",
"place_flush": "Place the adapter flush on top of the module.",
"prepping_module": "Prepping {{module}} for module calibration",
"recalibrate": "Recalibrate",
"select_location": "Select module location",
"select_the_slot": "Select the slot where you installed the {{module}} on the deck map to the right. The location must be correct for successful calibration.",
"stand_back": "Stand back, calibration in progress",
"stand_back_exiting": "Stand back, robot is in motion",
"stand_back": "Stand back, calibration in progress",
"start_setup": "Start setup",
"successfully_calibrated": "{{module}} successfully calibrated"
}
24 changes: 19 additions & 5 deletions app/src/organisms/ModuleWizardFlows/PlaceAdapter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import {
CreateCommand,
getCalibrationAdapterLoadName,
getModuleDisplayName,
HEATERSHAKER_MODULE_TYPE,
THERMOCYCLER_MODULE_TYPE,
} from '@opentrons/shared-data'

import { StyledText } from '../../atoms/text'
Expand Down Expand Up @@ -59,7 +61,6 @@ export const PlaceAdapter = (props: PlaceAdapterProps): JSX.Element | null => {
isRobotMoving,
} = props
const { t } = useTranslation('module_wizard_flows')
const moduleName = getModuleDisplayName(attachedModule.moduleModel)
const mount = attachedPipette.mount
const handleOnClick = (): void => {
const calibrationAdapterLoadName = getCalibrationAdapterLoadName(
Expand Down Expand Up @@ -109,9 +110,18 @@ export const PlaceAdapter = (props: PlaceAdapterProps): JSX.Element | null => {
.catch((e: Error) => setErrorMessage(e.message))
}

const bodyText = (
<StyledText css={BODY_STYLE}>{t('place_flush', { moduleName })}</StyledText>
)
const moduleType = attachedModule.moduleType
let bodyText = <StyledText css={BODY_STYLE}>{t('place_flush')}</StyledText>
if (moduleType === HEATERSHAKER_MODULE_TYPE) {
bodyText = (
<StyledText css={BODY_STYLE}>{t('place_flush_heater_shaker')}</StyledText>
)
}
if (moduleType === THERMOCYCLER_MODULE_TYPE) {
bodyText = (
<StyledText css={BODY_STYLE}>{t('place_flush_thermocycler')}</StyledText>
)
}

const moduleDisplayName = getModuleDisplayName(attachedModule.moduleModel)
const isInLeftSlot = LEFT_SLOTS.some(slot => slot === slotName)
Expand Down Expand Up @@ -171,7 +181,11 @@ export const PlaceAdapter = (props: PlaceAdapterProps): JSX.Element | null => {
)
return (
<GenericWizardTile
header={t('install_adapter', { module: moduleDisplayName })}
header={
moduleType === HEATERSHAKER_MODULE_TYPE
? t('install_calibration_adapter')
: t('install_adapter', { module: moduleDisplayName })
}
rightHandBody={placeAdapterVid}
bodyText={bodyText}
proceedButtonText={t('confirm_placement')}
Expand Down

0 comments on commit fcbe7f5

Please sign in to comment.