File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed
arduino-ide-extension/src Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { FileDialogService } from '@theia/filesystem/lib/browser/file-dialog/fil
1010import { DisposableCollection } from '@theia/core/lib/common/disposable' ;
1111import {
1212 AdditionalUrls ,
13+ CompilerWarnings ,
1314 CompilerWarningLiterals ,
1415 Network ,
1516 ProxySettings ,
@@ -260,7 +261,7 @@ export class SettingsComponent extends React.Component<
260261 >
261262 { CompilerWarningLiterals . map ( ( value ) => (
262263 < option key = { value } value = { value } >
263- { value }
264+ { CompilerWarnings . labelOf ( value ) }
264265 </ option >
265266 ) ) }
266267 </ select >
Original file line number Diff line number Diff line change 1+ import { nls } from '@theia/core/lib/common/nls' ;
12import { ApplicationError } from '@theia/core/lib/common/application-error' ;
23import type {
34 Location ,
@@ -18,6 +19,17 @@ export const CompilerWarningLiterals = [
1819 'All' ,
1920] as const ;
2021export type CompilerWarnings = typeof CompilerWarningLiterals [ number ] ;
22+ export namespace CompilerWarnings {
23+ export function labelOf ( warning : CompilerWarnings ) : string {
24+ return CompilerWarningLabels [ warning ] ;
25+ }
26+ const CompilerWarningLabels : Record < CompilerWarnings , string > = {
27+ None : nls . localize ( 'arduino/core/compilerWarnings/none' , 'None' ) ,
28+ Default : nls . localize ( 'arduino/core/compilerWarnings/default' , 'Default' ) ,
29+ More : nls . localize ( 'arduino/core/compilerWarnings/more' , 'More' ) ,
30+ All : nls . localize ( 'arduino/core/compilerWarnings/all' , 'All' ) ,
31+ } ;
32+ }
2133export namespace CoreError {
2234 export interface ErrorLocationRef {
2335 readonly message : string ;
Original file line number Diff line number Diff line change 157157 },
158158 "replaceTitle" : " Replace"
159159 },
160+ "core" : {
161+ "compilerWarnings" : {
162+ "all" : " All" ,
163+ "default" : " Default" ,
164+ "more" : " More" ,
165+ "none" : " None"
166+ }
167+ },
160168 "coreContribution" : {
161169 "copyError" : " Copy error messages" ,
162170 "noBoardSelected" : " No board selected. Please select your Arduino board from the Tools > Board menu."
You can’t perform that action at this time.
0 commit comments