From d2df4bf640e17f101155b8d8c4b66e5679927369 Mon Sep 17 00:00:00 2001 From: smb2268 Date: Tue, 15 Oct 2024 17:00:14 -0400 Subject: [PATCH] add reference wavelength to command text if it exits --- .../assets/localization/en/protocol_command_text.json | 3 ++- .../utils/getAbsorbanceReaderCommandText.ts | 11 +++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/src/assets/localization/en/protocol_command_text.json b/app/src/assets/localization/en/protocol_command_text.json index 0315d25dd7d..5640f3306a5 100644 --- a/app/src/assets/localization/en/protocol_command_text.json +++ b/app/src/assets/localization/en/protocol_command_text.json @@ -90,5 +90,6 @@ "waiting_for_tc_block_to_reach": "Waiting for Thermocycler block to reach target temperature and holding for specified time", "waiting_for_tc_lid_to_reach": "Waiting for Thermocycler lid to reach target temperature", "waiting_to_reach_temp_module": "Waiting for Temperature Module to reach {{temp}}", - "waste_chute": "Waste Chute" + "waste_chute": "Waste Chute", + "with_reference_of": "with reference of {{wavelength}} nm" } diff --git a/app/src/molecules/Command/hooks/useCommandTextString/utils/getAbsorbanceReaderCommandText.ts b/app/src/molecules/Command/hooks/useCommandTextString/utils/getAbsorbanceReaderCommandText.ts index 8fcd01db884..b9e7107b569 100644 --- a/app/src/molecules/Command/hooks/useCommandTextString/utils/getAbsorbanceReaderCommandText.ts +++ b/app/src/molecules/Command/hooks/useCommandTextString/utils/getAbsorbanceReaderCommandText.ts @@ -37,10 +37,17 @@ export const getAbsorbanceReaderCommandText = ({ const wavelengths = command.params.sampleWavelengths.join(' nm, ') + ` nm` const mode = command.params.measureMode === 'multi' ? t('multiple') : t('single') - return t('absorbance_reader_initialize', { + + return `${t('absorbance_reader_initialize', { mode, wavelengths, - }) + })} ${ + command.params.referenceWavelength != null + ? t('with_reference_of', { + wavelength: command.params.referenceWavelength, + }) + : '' + }` } return t(KEYS_BY_COMMAND_TYPE[command.commandType]) }