Skip to content

Commit 5c958bc

Browse files
authored
Fix Tools > Board and Tools > Port labels (#558)
1 parent 11b75bd commit 5c958bc

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

Diff for: arduino-ide-extension/src/browser/contributions/board-selection.ts

+7-13
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,7 @@ PID: ${PID}`;
138138
// The board specific items, and the rest, have order with `z`. We needed something between `0` and `z` with natural-order.
139139
this.menuModelRegistry.registerSubmenu(
140140
boardsSubmenuPath,
141-
nls.localize('arduino/board/board', 'Board') + !!boardsSubmenuLabel
142-
? `: "${boardsSubmenuLabel}"`
143-
: '',
141+
nls.localize('arduino/board/board', 'Board{0}', !!boardsSubmenuLabel ? `: "${boardsSubmenuLabel}"` : ''),
144142
{ order: '100' }
145143
);
146144
this.toDisposeBeforeMenuRebuild.push(
@@ -157,9 +155,7 @@ PID: ${PID}`;
157155
const portsSubmenuLabel = config.selectedPort?.address;
158156
this.menuModelRegistry.registerSubmenu(
159157
portsSubmenuPath,
160-
nls.localize('arduino/board/port', 'Port') + portsSubmenuLabel
161-
? `: "${portsSubmenuLabel}"`
162-
: '',
158+
nls.localize('arduino/board/port', 'Port{0}', portsSubmenuLabel ? `: "${portsSubmenuLabel}"` : ''),
163159
{ order: '101' }
164160
);
165161
this.toDisposeBeforeMenuRebuild.push(
@@ -197,10 +193,9 @@ PID: ${PID}`;
197193

198194
const packageLabel =
199195
packageName +
200-
`${
201-
manuallyInstalled
202-
? nls.localize('arduino/board/inSketchbook', ' (in Sketchbook)')
203-
: ''
196+
`${manuallyInstalled
197+
? nls.localize('arduino/board/inSketchbook', ' (in Sketchbook)')
198+
: ''
204199
}`;
205200
// Platform submenu
206201
const platformMenuPath = [...boardsPackagesGroup, packageId];
@@ -273,9 +268,8 @@ PID: ${PID}`;
273268
});
274269
}
275270
for (const { name, fqbn } of boards) {
276-
const id = `arduino-select-port--${address}${
277-
fqbn ? `--${fqbn}` : ''
278-
}`;
271+
const id = `arduino-select-port--${address}${fqbn ? `--${fqbn}` : ''
272+
}`;
279273
const command = { id };
280274
const handler = {
281275
execute: () => {

0 commit comments

Comments
 (0)