Skip to content

Commit a9438a2

Browse files
authored
fix(app): Fix instrument title casing on the Devices page (#21683)
Closes RQA-5473 We were not enforcing proper title casing for the instrument names on the Devices page. After syncing with Design, we do want title casing here. The fix cleans up some improper interpolation, too.
1 parent 34a304e commit a9438a2

5 files changed

Lines changed: 11 additions & 8 deletions

File tree

app/src/assets/localization/en/device_details.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"attach_gripper": "Attach gripper",
1717
"attach_pipette": "Attach pipette",
1818
"bad_run": "run could not be loaded",
19-
"both_mounts": "Both Mounts",
19+
"both_mounts": "Left+Right Mounts",
2020
"bundle_firmware_file_not_found": "Bundled fw file not found for module of type: {{module}}",
2121
"calibrate_gripper": "Calibrate gripper",
2222
"calibrate_now": "Calibrate now",
@@ -72,6 +72,7 @@
7272
"estop_disconnected": "E-stop disconnected. Robot movement is halted.",
7373
"estop_disengaged": "E-stop disengaged, but robot operation still halted.",
7474
"estop_pressed": "E-stop pressed. Robot movement is halted.",
75+
"extension_mount": "Extension Mount",
7576
"failed": "failed",
7677
"files": "Files",
7778
"firmware_update_available": "Firmware update available",
@@ -98,6 +99,7 @@
9899
"labware_bottom": "Labware Bottom",
99100
"last_run_time": "last run {{number}}",
100101
"left": "left",
102+
"left_mount": "Left Mount",
101103
"left_right": "Left + Right Mounts",
102104
"lights": "Lights",
103105
"link_firmware_update": "View Firmware Update",
@@ -187,6 +189,7 @@
187189
"reset_estop": "Reset E-stop",
188190
"resume_operation": "Resume operation",
189191
"right": "right",
192+
"right_mount": "Right Mount",
190193
"robot_control_not_available": "Some robot controls are not available when run is in progress",
191194
"robot_initializing": "Initializing...",
192195
"run": "Run",

app/src/organisms/Desktop/Devices/GripperCard/__tests__/GripperCard.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe('GripperCard', () => {
5555
expect(image.getAttribute('src')).toEqual(
5656
'/app/src/assets/images/flex_gripper.png'
5757
)
58-
screen.getByText('extension mount')
58+
screen.getByText('Extension Mount')
5959
screen.getByText('Flex Gripper')
6060
const overflowButton = screen.getByRole('button', {
6161
name: /overflow/i,

app/src/organisms/Desktop/Devices/GripperCard/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export function GripperCard({
140140
) : null
141141
}
142142
isGripperAttached={attachedGripper != null}
143-
label={t('shared:extension_mount')}
143+
label={t('extension_mount')}
144144
menuOverlayItems={menuOverlayItems as MenuOverlayItemProps[]}
145145
isEstopNotDisengaged={isEstopNotDisengaged}
146146
/>

app/src/organisms/Desktop/Devices/PipetteCard/FlexPipetteCard.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ export function FlexPipetteCard({
205205
label={
206206
attachedPipetteIs96Channel
207207
? t('both_mounts')
208-
: t('mount', {
209-
side: mount === LEFT ? t('left') : t('right'),
210-
})
208+
: mount === LEFT
209+
? t('left_mount')
210+
: t('right_mount')
211211
}
212212
menuOverlayItems={menuOverlayItems as MenuOverlayItemProps[]}
213213
isEstopNotDisengaged={isEstopNotDisengaged}

app/src/organisms/Desktop/Devices/PipetteCard/__tests__/FlexPipetteCard.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe('FlexPipetteCard', () => {
7575

7676
it('renders correct info when gripper is attached', () => {
7777
render(props)
78-
screen.getByText('left Mount')
78+
screen.getByText('Left Mount')
7979
screen.getByText('Left Pipette')
8080
const overflowButton = screen.getByRole('button', {
8181
name: /overflow/i,
@@ -114,7 +114,7 @@ describe('FlexPipetteCard', () => {
114114
isEstopNotDisengaged: false,
115115
}
116116
render(props)
117-
screen.getByText('Both Mounts')
117+
screen.getByText('Left+Right Mounts')
118118
screen.getByText('Left Pipette')
119119
})
120120
it('renders recalibrate banner when no calibration data is present', () => {

0 commit comments

Comments
 (0)