mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-09 20:36:32 +00:00
Fix Tools > Board and Tools > Port labels (#558)
This commit is contained in:
parent
11b75bd610
commit
5c958bc6c7
@ -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.
|
// The board specific items, and the rest, have order with `z`. We needed something between `0` and `z` with natural-order.
|
||||||
this.menuModelRegistry.registerSubmenu(
|
this.menuModelRegistry.registerSubmenu(
|
||||||
boardsSubmenuPath,
|
boardsSubmenuPath,
|
||||||
nls.localize('arduino/board/board', 'Board') + !!boardsSubmenuLabel
|
nls.localize('arduino/board/board', 'Board{0}', !!boardsSubmenuLabel ? `: "${boardsSubmenuLabel}"` : ''),
|
||||||
? `: "${boardsSubmenuLabel}"`
|
|
||||||
: '',
|
|
||||||
{ order: '100' }
|
{ order: '100' }
|
||||||
);
|
);
|
||||||
this.toDisposeBeforeMenuRebuild.push(
|
this.toDisposeBeforeMenuRebuild.push(
|
||||||
@ -157,9 +155,7 @@ PID: ${PID}`;
|
|||||||
const portsSubmenuLabel = config.selectedPort?.address;
|
const portsSubmenuLabel = config.selectedPort?.address;
|
||||||
this.menuModelRegistry.registerSubmenu(
|
this.menuModelRegistry.registerSubmenu(
|
||||||
portsSubmenuPath,
|
portsSubmenuPath,
|
||||||
nls.localize('arduino/board/port', 'Port') + portsSubmenuLabel
|
nls.localize('arduino/board/port', 'Port{0}', portsSubmenuLabel ? `: "${portsSubmenuLabel}"` : ''),
|
||||||
? `: "${portsSubmenuLabel}"`
|
|
||||||
: '',
|
|
||||||
{ order: '101' }
|
{ order: '101' }
|
||||||
);
|
);
|
||||||
this.toDisposeBeforeMenuRebuild.push(
|
this.toDisposeBeforeMenuRebuild.push(
|
||||||
@ -197,10 +193,9 @@ PID: ${PID}`;
|
|||||||
|
|
||||||
const packageLabel =
|
const packageLabel =
|
||||||
packageName +
|
packageName +
|
||||||
`${
|
`${manuallyInstalled
|
||||||
manuallyInstalled
|
? nls.localize('arduino/board/inSketchbook', ' (in Sketchbook)')
|
||||||
? nls.localize('arduino/board/inSketchbook', ' (in Sketchbook)')
|
: ''
|
||||||
: ''
|
|
||||||
}`;
|
}`;
|
||||||
// Platform submenu
|
// Platform submenu
|
||||||
const platformMenuPath = [...boardsPackagesGroup, packageId];
|
const platformMenuPath = [...boardsPackagesGroup, packageId];
|
||||||
@ -273,9 +268,8 @@ PID: ${PID}`;
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
for (const { name, fqbn } of boards) {
|
for (const { name, fqbn } of boards) {
|
||||||
const id = `arduino-select-port--${address}${
|
const id = `arduino-select-port--${address}${fqbn ? `--${fqbn}` : ''
|
||||||
fqbn ? `--${fqbn}` : ''
|
}`;
|
||||||
}`;
|
|
||||||
const command = { id };
|
const command = { id };
|
||||||
const handler = {
|
const handler = {
|
||||||
execute: () => {
|
execute: () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user