File tree 3 files changed +22
-1
lines changed
arduino-ide-extension/src
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
10
10
import { DisposableCollection } from '@theia/core/lib/common/disposable' ;
11
11
import {
12
12
AdditionalUrls ,
13
+ CompilerWarnings ,
13
14
CompilerWarningLiterals ,
14
15
Network ,
15
16
ProxySettings ,
@@ -260,7 +261,7 @@ export class SettingsComponent extends React.Component<
260
261
>
261
262
{ CompilerWarningLiterals . map ( ( value ) => (
262
263
< option key = { value } value = { value } >
263
- { value }
264
+ { CompilerWarnings . labelOf ( value ) }
264
265
</ option >
265
266
) ) }
266
267
</ select >
Original file line number Diff line number Diff line change
1
+ import { nls } from '@theia/core/lib/common/nls' ;
1
2
import { ApplicationError } from '@theia/core/lib/common/application-error' ;
2
3
import type {
3
4
Location ,
@@ -18,6 +19,17 @@ export const CompilerWarningLiterals = [
18
19
'All' ,
19
20
] as const ;
20
21
export 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
+ }
21
33
export namespace CoreError {
22
34
export interface ErrorLocationRef {
23
35
readonly message : string ;
Original file line number Diff line number Diff line change 157
157
},
158
158
"replaceTitle" : " Replace"
159
159
},
160
+ "core" : {
161
+ "compilerWarnings" : {
162
+ "all" : " All" ,
163
+ "default" : " Default" ,
164
+ "more" : " More" ,
165
+ "none" : " None"
166
+ }
167
+ },
160
168
"coreContribution" : {
161
169
"copyError" : " Copy error messages" ,
162
170
"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