Skip to content

Commit

Permalink
refactor(app): clean up json v6 command text in run log components (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader authored Jul 29, 2022
1 parent 3bd4b3a commit 701212f
Show file tree
Hide file tree
Showing 5 changed files with 264 additions and 343 deletions.
40 changes: 40 additions & 0 deletions app/src/assets/localization/en/commands_run_log.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"pickup_tip": "Picking up tip from {{well_name}} of {{labware}} in {{labware_location}}",
"drop_tip": "Dropping tip in {{well_name}} of {{labware}} in {{labware_location}}",
"engaging_magnetic_module": "Engaging Magnetic Module",
"disengaging_magnetic_module": "Disengaging Magnetic Module",
"setting_temperature_module_temp": "Setting Temperature Module to {{temp}}°C (rounded to nearest integer)",
"deactivate_temperature_module": "Deactivating Temperature Module",
"waiting_to_reach_temp_module": "Waiting for Temperature Module to reach {{temp}}°C (rounded to nearest integer)",
"setting_thermocycler_block_temp": "Setting Thermocycler block temperature to {{temp}}°C",
"setting_thermocycler_lid_temp": "Setting Thermocycler lid temperature to {{temp}}°C",
"waiting_for_tc_lid_to_reach": "Waiting for Thermocycler lid to reach target temperature",
"waiting_for_tc_block_to_reach": "Waiting for Thermocycler block to reach target temperature",
"opening_tc_lid": "Opening Thermocycler lid",
"closing_tc_lid": "Closing Thermocycler lid",
"deactivating_tc_block": "Deactivating Thermocycler block",
"deactivating_tc_lid": "Deactivating Thermocycler lid",
"tc_starting_profile": "Thermocycler starting {{repetitions}} repetitions of cycle composed of the following steps:",
"tc_awaiting_for_duration": "Waiting for Thermocycler profile to complete",
"setting_hs_temp": "Setting Target Temperature of Heater-Shaker to {{temp}}°C",
"waiting_for_hs_to_reach": "Waiting for Heater-Shaker to reach target temperature",
"set_and_await_hs_shake": "Setting Heater-Shaker to shake at {{rpm}} rpm and waiting until reached",
"deactivating_hs_heater": "Deactivating heater",
"unlatching_hs_latch": "Unlatching labware on Heater-Shaker",
"latching_hs_latch": "Latching labware on Heater-Shaker",
"deactivate_hs_shake": "Deactivating shaker",
"wait_for_duration": "Pausing for {{seconds}} seconds. {{message}}",
"tc_run_profile_steps": "temperature: {{celsius}}°C, seconds: {{seconds}}",
"aspirate": "Aspirating {{volume}} uL from {{well_name}} of {{labware}} in {{labware_location}} at {{flow_rate}} uL/sec",
"dispense": "Dispensing {{volume}} uL into {{well_name}} of {{labware}} in {{labware_location}} at {{flow_rate}} uL/sec",
"blowout": "Blowing out at {{well_name}} of {{labware}} in {{labware_location}} at {{flow_rate}} uL/sec",
"touch_tip": "Touching tip",
"move_to_slot": "Moving to {{slot_name}}",
"move_to_well": "Moving to {{well_name}} of {{labware}} in {{labware_location}}",
"move_relative": "Moving {{distance}} mm along {{axis}} axis",
"move_to_coordinates": "Moving to (X: {{x}}, Y: {{y}}, Z: {{z}})",
"home_gantry": "Homing all gantry, pipette, and plunger axes",
"save_position": "Saving position",
"comment": "Comment",
"wait_for_resume": "Pausing protocol"
}
2 changes: 2 additions & 0 deletions app/src/assets/localization/en/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import shared from './shared.json'
import app_settings from './app_settings.json'
import commands_run_log from './commands_run_log.json'
import device_details from './device_details.json'
import device_settings from './device_settings.json'
import devices_landing from './devices_landing.json'
Expand All @@ -25,6 +26,7 @@ import top_navigation from './top_navigation.json'
export const en = {
shared,
app_settings,
commands_run_log,
device_details,
device_settings,
devices_landing,
Expand Down
37 changes: 1 addition & 36 deletions app/src/assets/localization/en/run_details.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"drop_tip": "Dropping tip in {{well_name}} of {{labware}} in {{labware_location}}",
"end_of_protocol": "End of protocol",
"comment": "Comment",
"wait_for_resume": "Pausing protocol",
"anticipated": "Anticipated steps",
"protocol_steps": "Protocol steps",
"protocol_run_failed": "Protocol run failed",
Expand Down Expand Up @@ -105,39 +104,5 @@
"analysis_failure_on_robot": "An error occurred while attempting to analyze {{protocolName}} on {{robotName}}. Fix the following error and try running this protocol again.",
"protocol_analysis_failure": "Protocol analysis failure",
"protocol_analysis_failed": "Protocol analysis failed.",
"view_analysis_error_details": "View <errorLink>error details</errorLink>",
"engaging_magnetic_module": "Engaging Magnetic Module",
"disengaging_magnetic_module": "Disengaging Magnetic Module",
"setting_temperature_module_temp": "Setting Temperature Module to {{temp}}°C (rounded to nearest integer)",
"deactivate_temperature_module": "Deactivating Temperature Module",
"waiting_to_reach_temp_module": "Waiting for Temperature Module to reach {{temp}}°C (rounded to nearest integer)",
"setting_thermocycler_block_temp": "Setting Thermocycler block temperature to {{temp}}°C",
"setting_thermocycler_lid_temp": "Setting Thermocycler lid temperature to {{temp}}°C",
"waiting_for_tc_lid_to_reach": "Waiting for Thermocycler lid to reach target temperature",
"waiting_for_tc_block_to_reach": "Waiting for Thermocycler block to reach target temperature",
"opening_tc_lid": "Opening Thermocycler lid",
"closing_tc_lid": "Closing Thermocycler lid",
"deactivating_tc_block": "Deactivating Thermocycler block",
"deactivating_tc_lid": "Deactivating Thermocycler lid",
"tc_starting_profile": "Thermocycler starting {{repetitions}} repetitions of cycle composed of the following steps:",
"tc_awaiting_for_duration": "Waiting for Thermocycler profile to complete",
"setting_hs_temp": "Setting Target Temperature of Heater-Shaker to {{temp}}°C",
"waiting_for_hs_to_reach": "Waiting for Heater-Shaker to reach target temperature",
"set_and_await_hs_shake": "Setting Heater-Shaker to shake at {{rpm}} rpm and waiting until reached",
"deactivating_hs_heater": "Deactivating heater",
"unlatching_hs_latch": "Unlatching labware on Heater-Shaker",
"latching_hs_latch": "Latching labware on Heater-Shaker",
"deactivate_hs_shake": "Deactivating shaker",
"wait_for_duration": "Pause for {{seconds}} seconds",
"tc_run_profile_steps": "temperature: {{celsius}}°C, seconds: {{seconds}}",
"aspirate": "Aspirating {{volume}} uL from {{well_name}} of {{labware}} in {{labware_location}} at {{flow_rate}} uL/sec",
"dispense": "Dispensing {{volume}} uL into {{well_name}} of {{labware}} in {{labware_location}} at {{flow_rate}} uL/sec",
"blowout": "Blowing out at {{well_name}} of {{labware}} in {{labware_location}} at {{flow_rate}} uL/sec",
"touch_tip": "Touching tip",
"move_to_slot": "Moving to {{slot_name}}",
"move_to_well": "Moving to {{well_name}} of {{labware}} in {{labware_location}}",
"move_relative": "Moving {{distance}} mm along {{axis}} axis",
"move_to_coordinates": "Moving to (X: {{x}}, Y: {{y}}, Z: {{z}})",
"home_gantry": "Homing all gantry, pipette, and plunger axes",
"save_position": "Saving position"
"view_analysis_error_details": "View <errorLink>error details</errorLink>"
}
9 changes: 6 additions & 3 deletions app/src/organisms/Devices/ProtocolRun/StepText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ interface Props {
}
export function StepText(props: Props): JSX.Element | null {
const { analysisCommand, robotName, runCommand, runId } = props
const { t } = useTranslation('run_details')
const { t } = useTranslation('commands_run_log')
const { protocolData } = useProtocolDetailsForRun(runId)
const labwareRenderInfoById = useLabwareRenderInfoForRunById(runId)

Expand Down Expand Up @@ -234,8 +234,11 @@ export function StepText(props: Props): JSX.Element | null {
break
}
case 'waitForDuration': {
const { seconds } = displayCommand.params
messageNode = t('wait_for_duration', { seconds: seconds })
const { seconds, message } = displayCommand.params
messageNode = t('wait_for_duration', {
seconds: seconds,
message: message,
})
break
}
case 'aspirate': {
Expand Down
Loading

0 comments on commit 701212f

Please sign in to comment.