Skip to content

Commit 52804a5

Browse files
committed
Add missing i18n for UI strings
The text of the Arduino IDE user interface has been localized to 12 languages. Before localization can be accomplished, internationalization must be done in the application's code base: - Set up infrastructure to export localization data - Pass all target strings to that infrastructure While the first of these tasks is completed, the second was not completed for several strings which are part of the user interface. Those outstanding strings are hereby internationalized and will be made available for localization.
1 parent 3ec6264 commit 52804a5

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

Diff for: arduino-ide-extension/src/browser/boards/boards-config.tsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,10 @@ export class BoardsConfig extends React.Component<
306306
type="search"
307307
value={query}
308308
className="theia-input"
309-
placeholder="SEARCH BOARD"
309+
placeholder={nls.localize(
310+
'arduino/board/searchBoard',
311+
'SEARCH BOARD'
312+
)}
310313
onChange={this.updateBoards}
311314
ref={this.focusNodeSet}
312315
/>
@@ -344,7 +347,9 @@ export class BoardsConfig extends React.Component<
344347
});
345348
}
346349
return !ports.length ? (
347-
<div className="loading noselect">No ports discovered</div>
350+
<div className="loading noselect">
351+
{nls.localize('arduino/board/noPortsDiscovered', 'No ports discovered')}
352+
</div>
348353
) : (
349354
<div className="ports list">
350355
{ports.map((port) => (

Diff for: arduino-ide-extension/src/browser/dialogs/user-fields/user-fields-component.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ export const UserFieldsComponent = ({
6565
type={field.secret ? 'password' : 'text'}
6666
value={field.value}
6767
className="theia-input"
68-
placeholder={'Enter ' + field.label}
68+
placeholder={nls.localize(
69+
'arduino/userFields/enterField',
70+
'Enter {0}',
71+
field.label
72+
)}
6973
onChange={updateUserField(index)}
7074
/>
7175
</div>

Diff for: arduino-ide-extension/src/node/boards-service-impl.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import {
4242
} from './cli-protocol/cc/arduino/cli/commands/v1/upload_pb';
4343
import { ExecuteWithProgress } from './grpc-progressible';
4444
import { ServiceError } from './service-error';
45+
import { nls } from '@theia/core/lib/common';
4546

4647
@injectable()
4748
export class BoardsServiceImpl
@@ -319,7 +320,10 @@ export class BoardsServiceImpl
319320
.join(', '),
320321
installable: true,
321322
deprecated: platform.getDeprecated(),
322-
summary: 'Boards included in this package:',
323+
summary: nls.localize(
324+
'arduino/component/boardsIncluded',
325+
'Boards included in this package:'
326+
),
323327
installedVersion,
324328
boards: platform
325329
.getBoardsList()

Diff for: i18n/en.json

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"installManually": "Install Manually",
1818
"installNow": "The \"{0} {1}\" core has to be installed for the currently selected \"{2}\" board. Do you want to install it now?",
1919
"noFQBN": "The FQBN is not available for the selected board \"{0}\". Do you have the corresponding core installed?",
20+
"noPortsDiscovered": "No ports discovered",
2021
"noPortsSelected": "No ports selected for board: '{0}'.",
2122
"noneSelected": "No boards selected.",
2223
"openBoardsConfig": "Select other board and port…",
@@ -26,6 +27,7 @@
2627
"portLabel": "Port: {0}",
2728
"programmer": "Programmer",
2829
"reselectLater": "Reselect later",
30+
"searchBoard": "SEARCH BOARD",
2931
"selectBoard": "Select Board",
3032
"selectBoardForInfo": "Please select a board to obtain board info.",
3133
"selectPortForInfo": "Please select a port to obtain board info.",
@@ -115,6 +117,7 @@
115117
"error": "Compilation error: {0}"
116118
},
117119
"component": {
120+
"boardsIncluded": "Boards included in this package:",
118121
"by": "by",
119122
"filterSearch": "Filter your search...",
120123
"install": "INSTALL",
@@ -344,6 +347,7 @@
344347
},
345348
"userFields": {
346349
"cancel": "Cancel",
350+
"enterField": "Enter {0}",
347351
"upload": "Upload"
348352
}
349353
},

0 commit comments

Comments
 (0)