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.
This commit is contained in:
per1234 2022-08-20 20:24:11 -07:00
parent 3ec62642dd
commit 52804a5b52
4 changed files with 21 additions and 4 deletions

View File

@ -306,7 +306,10 @@ export class BoardsConfig extends React.Component<
type="search" type="search"
value={query} value={query}
className="theia-input" className="theia-input"
placeholder="SEARCH BOARD" placeholder={nls.localize(
'arduino/board/searchBoard',
'SEARCH BOARD'
)}
onChange={this.updateBoards} onChange={this.updateBoards}
ref={this.focusNodeSet} ref={this.focusNodeSet}
/> />
@ -344,7 +347,9 @@ export class BoardsConfig extends React.Component<
}); });
} }
return !ports.length ? ( return !ports.length ? (
<div className="loading noselect">No ports discovered</div> <div className="loading noselect">
{nls.localize('arduino/board/noPortsDiscovered', 'No ports discovered')}
</div>
) : ( ) : (
<div className="ports list"> <div className="ports list">
{ports.map((port) => ( {ports.map((port) => (

View File

@ -65,7 +65,11 @@ export const UserFieldsComponent = ({
type={field.secret ? 'password' : 'text'} type={field.secret ? 'password' : 'text'}
value={field.value} value={field.value}
className="theia-input" className="theia-input"
placeholder={'Enter ' + field.label} placeholder={nls.localize(
'arduino/userFields/enterField',
'Enter {0}',
field.label
)}
onChange={updateUserField(index)} onChange={updateUserField(index)}
/> />
</div> </div>

View File

@ -42,6 +42,7 @@ import {
} from './cli-protocol/cc/arduino/cli/commands/v1/upload_pb'; } from './cli-protocol/cc/arduino/cli/commands/v1/upload_pb';
import { ExecuteWithProgress } from './grpc-progressible'; import { ExecuteWithProgress } from './grpc-progressible';
import { ServiceError } from './service-error'; import { ServiceError } from './service-error';
import { nls } from '@theia/core/lib/common';
@injectable() @injectable()
export class BoardsServiceImpl export class BoardsServiceImpl
@ -319,7 +320,10 @@ export class BoardsServiceImpl
.join(', '), .join(', '),
installable: true, installable: true,
deprecated: platform.getDeprecated(), deprecated: platform.getDeprecated(),
summary: 'Boards included in this package:', summary: nls.localize(
'arduino/component/boardsIncluded',
'Boards included in this package:'
),
installedVersion, installedVersion,
boards: platform boards: platform
.getBoardsList() .getBoardsList()

View File

@ -17,6 +17,7 @@
"installManually": "Install Manually", "installManually": "Install Manually",
"installNow": "The \"{0} {1}\" core has to be installed for the currently selected \"{2}\" board. Do you want to install it now?", "installNow": "The \"{0} {1}\" core has to be installed for the currently selected \"{2}\" board. Do you want to install it now?",
"noFQBN": "The FQBN is not available for the selected board \"{0}\". Do you have the corresponding core installed?", "noFQBN": "The FQBN is not available for the selected board \"{0}\". Do you have the corresponding core installed?",
"noPortsDiscovered": "No ports discovered",
"noPortsSelected": "No ports selected for board: '{0}'.", "noPortsSelected": "No ports selected for board: '{0}'.",
"noneSelected": "No boards selected.", "noneSelected": "No boards selected.",
"openBoardsConfig": "Select other board and port…", "openBoardsConfig": "Select other board and port…",
@ -26,6 +27,7 @@
"portLabel": "Port: {0}", "portLabel": "Port: {0}",
"programmer": "Programmer", "programmer": "Programmer",
"reselectLater": "Reselect later", "reselectLater": "Reselect later",
"searchBoard": "SEARCH BOARD",
"selectBoard": "Select Board", "selectBoard": "Select Board",
"selectBoardForInfo": "Please select a board to obtain board info.", "selectBoardForInfo": "Please select a board to obtain board info.",
"selectPortForInfo": "Please select a port to obtain board info.", "selectPortForInfo": "Please select a port to obtain board info.",
@ -115,6 +117,7 @@
"error": "Compilation error: {0}" "error": "Compilation error: {0}"
}, },
"component": { "component": {
"boardsIncluded": "Boards included in this package:",
"by": "by", "by": "by",
"filterSearch": "Filter your search...", "filterSearch": "Filter your search...",
"install": "INSTALL", "install": "INSTALL",
@ -344,6 +347,7 @@
}, },
"userFields": { "userFields": {
"cancel": "Cancel", "cancel": "Cancel",
"enterField": "Enter {0}",
"upload": "Upload" "upload": "Upload"
} }
}, },