Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8eddd1f

Browse files
author
Akos Kitta
committed
translate compiler warnings.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent cb48b33 commit 8eddd1f

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

‎arduino-ide-extension/src/browser/dialogs/settings/settings-component.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { FileDialogService } from '@theia/filesystem/lib/browser/file-dialog/fil
1010
import { DisposableCollection } from '@theia/core/lib/common/disposable';
1111
import {
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>

‎arduino-ide-extension/src/common/protocol/core-service.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { nls } from '@theia/core/lib/common/nls';
12
import { ApplicationError } from '@theia/core/lib/common/application-error';
23
import type {
34
Location,
@@ -18,6 +19,17 @@ export const CompilerWarningLiterals = [
1819
'All',
1920
] as const;
2021
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+
}
2133
export namespace CoreError {
2234
export interface ErrorLocationRef {
2335
readonly message: string;

‎i18n/en.json‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,14 @@
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."

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /