Skip to content

Commit fe31d15

Browse files
author
Alberto Iannaccone
authored
Localize commands (arduino#1196)
- "check for updates" - "open serial plotter"
1 parent 99664ee commit fe31d15

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

Diff for: arduino-ide-extension/src/browser/ide-updater/ide-updater-commands.ts

+8-5
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
}

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

+9-7
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
}

Diff for: i18n/en.json

+2
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@
192192
"visit": "Visit Arduino.cc"
193193
},
194194
"ide-updater": {
195+
"checkForUpdates": "Check for Arduino IDE updates",
195196
"closeAndInstallButton": "Close and Install",
196197
"closeToInstallNotice": "Close the software and install the update on your machine.",
197198
"downloadButton": "Download",
@@ -297,6 +298,7 @@
297298
"newLineCarriageReturn": "Both NL & CR",
298299
"noLineEndings": "No Line Ending",
299300
"notConnected": "Not connected. Select a board and a port to connect automatically.",
301+
"openSerialPlotter": "Serial Plotter",
300302
"timestamp": "Timestamp",
301303
"toggleTimestamp": "Toggle Timestamp"
302304
},

0 commit comments

Comments
 (0)