Skip to content

Commit 12c2339

Browse files
author
Alberto Iannaccone
committed
Localize commands
- "check for updates" - "open serial plotter"
1 parent 46fcc71 commit 12c2339

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

arduino-ide-extension/src/browser/ide-updater/ide-updater-commands.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,12 @@ export class IDEUpdaterCommands implements CommandContribution {
5252
}
5353
}
5454
export namespace IDEUpdaterCommands {
55-
export const CHECK_FOR_UPDATES: Command = {
56-
id: 'arduino-ide-check-for-updates',
57-
category: 'Arduino',
58-
label: 'Check for Arduino IDE updates',
59-
};
55+
export const CHECK_FOR_UPDATES: Command = Command.toLocalizedCommand(
56+
{
57+
id: 'arduino-ide-check-for-updates',
58+
label: 'Check for Arduino IDE updates',
59+
category: 'Arduino',
60+
},
61+
'arduino/ide-updater/checkForUpdates'
62+
);
6063
}

arduino-ide-extension/src/browser/serial/plotter/plotter-frontend-contribution.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ const queryString = require('query-string');
1818

1919
export namespace SerialPlotterContribution {
2020
export namespace Commands {
21-
export const OPEN: Command = {
22-
id: 'serial-plotter-open',
23-
label: 'Serial Plotter',
24-
category: 'Arduino',
25-
};
21+
export const OPEN: Command = Command.toLocalizedCommand(
22+
{
23+
id: 'serial-plotter-open',
24+
label: 'Serial Plotter',
25+
category: 'Arduino',
26+
},
27+
'arduino/serial/openSerialPlotter'
28+
);
29+
2630
export const RESET: Command = {
2731
id: 'serial-plotter-reset',
28-
label: 'Reset Serial Plotter',
29-
category: 'Arduino',
3032
};
3133
}
3234
}

i18n/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@
190190
"visit": "Visit Arduino.cc"
191191
},
192192
"ide-updater": {
193+
"checkForUpdates": "Check for Arduino IDE updates",
193194
"closeAndInstallButton": "Close and Install",
194195
"closeToInstallNotice": "Close the software and install the update on your machine.",
195196
"downloadButton": "Download",
@@ -294,6 +295,7 @@
294295
"newLineCarriageReturn": "Both NL & CR",
295296
"noLineEndings": "No Line Ending",
296297
"notConnected": "Not connected. Select a board and a port to connect automatically.",
298+
"openSerialPlotter": "Serial Plotter",
297299
"timestamp": "Timestamp",
298300
"toggleTimestamp": "Toggle Timestamp"
299301
},

0 commit comments

Comments
 (0)