Skip to content

Commit

Permalink
Fix Tools > Board and Tools > Port labels (#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
silvanocerza authored Oct 18, 2021
1 parent 11b75bd commit 5c958bc
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions arduino-ide-extension/src/browser/contributions/board-selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,7 @@ PID: ${PID}`;
// The board specific items, and the rest, have order with `z`. We needed something between `0` and `z` with natural-order.
this.menuModelRegistry.registerSubmenu(
boardsSubmenuPath,
nls.localize('arduino/board/board', 'Board') + !!boardsSubmenuLabel
? `: "${boardsSubmenuLabel}"`
: '',
nls.localize('arduino/board/board', 'Board{0}', !!boardsSubmenuLabel ? `: "${boardsSubmenuLabel}"` : ''),
{ order: '100' }
);
this.toDisposeBeforeMenuRebuild.push(
Expand All @@ -157,9 +155,7 @@ PID: ${PID}`;
const portsSubmenuLabel = config.selectedPort?.address;
this.menuModelRegistry.registerSubmenu(
portsSubmenuPath,
nls.localize('arduino/board/port', 'Port') + portsSubmenuLabel
? `: "${portsSubmenuLabel}"`
: '',
nls.localize('arduino/board/port', 'Port{0}', portsSubmenuLabel ? `: "${portsSubmenuLabel}"` : ''),
{ order: '101' }
);
this.toDisposeBeforeMenuRebuild.push(
Expand Down Expand Up @@ -197,10 +193,9 @@ PID: ${PID}`;

const packageLabel =
packageName +
`${
manuallyInstalled
? nls.localize('arduino/board/inSketchbook', ' (in Sketchbook)')
: ''
`${manuallyInstalled
? nls.localize('arduino/board/inSketchbook', ' (in Sketchbook)')
: ''
}`;
// Platform submenu
const platformMenuPath = [...boardsPackagesGroup, packageId];
Expand Down Expand Up @@ -273,9 +268,8 @@ PID: ${PID}`;
});
}
for (const { name, fqbn } of boards) {
const id = `arduino-select-port--${address}${
fqbn ? `--${fqbn}` : ''
}`;
const id = `arduino-select-port--${address}${fqbn ? `--${fqbn}` : ''
}`;
const command = { id };
const handler = {
execute: () => {
Expand Down

0 comments on commit 5c958bc

Please sign in to comment.