Skip to content

Commit c51b3c7

Browse files
authored
Merge pull request #7703 from Cosifne/dev/shech/localizedOutputWindow
Localize all the string passed into CreateOutputChannel
2 parents fe404cc + 05241f7 commit c51b3c7

File tree

8 files changed

+13
-8
lines changed

8 files changed

+13
-8
lines changed

l10n/bundle.l10n.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
".NET Test Log": ".NET Test Log",
3+
".NET NuGet Restore": ".NET NuGet Restore",
24
"How to setup Remote Debugging": "How to setup Remote Debugging",
35
"The C# extension for Visual Studio Code is incompatible on {0} {1} with the VS Code Remote Extensions. To see avaliable workarounds, click on '{2}'.": "The C# extension for Visual Studio Code is incompatible on {0} {1} with the VS Code Remote Extensions. To see avaliable workarounds, click on '{2}'.",
46
"The C# extension for Visual Studio Code is incompatible on {0} {1}.": "The C# extension for Visual Studio Code is incompatible on {0} {1}.",
@@ -7,6 +9,7 @@
79
"Cannot create .NET debug configurations. The active C# project is not within folder '{0}'.": "Cannot create .NET debug configurations. The active C# project is not within folder '{0}'.",
810
"Does not contain .NET Core projects.": "Does not contain .NET Core projects.",
911
"pipeArgs must be a string or a string array type": "pipeArgs must be a string or a string array type",
12+
"remote-attach": "remote-attach",
1013
"Name not defined in current configuration.": "Name not defined in current configuration.",
1114
"Configuration \"{0}\" in launch.json does not have a {1} argument with {2} for remote process listing.": "Configuration \"{0}\" in launch.json does not have a {1} argument with {2} for remote process listing.",
1215
"Select the process to attach to": "Select the process to attach to",
@@ -145,6 +148,7 @@
145148
"dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change",
146149
"C# configuration has changed. Would you like to relaunch the Language Server with your changes?": "C# configuration has changed. Would you like to relaunch the Language Server with your changes?",
147150
"Restart Language Server": "Restart Language Server",
151+
"OmniSharp Log": "OmniSharp Log",
148152
"project.json is no longer a supported project format for .NET Core applications.": "project.json is no longer a supported project format for .NET Core applications.",
149153
"More Detail": "More Detail",
150154
"Some projects have trouble loading. Please review the output for more details.": "Some projects have trouble loading. Please review the output for more details.",
@@ -168,6 +172,7 @@
168172
"IntelliCode features will not be available, {0} failed to activate.": "IntelliCode features will not be available, {0} failed to activate.",
169173
"Go to output": "Go to output",
170174
"Suppress notification": "Suppress notification",
175+
"C# LSP Trace Logs": "C# LSP Trace Logs",
171176
"Restore {0}": "Restore {0}",
172177
"Restore already in progress": "Restore already in progress",
173178
"Sending request": "Sending request",

src/lsptoolshost/restore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function registerRestoreCommands(context: vscode.ExtensionContext, langua
2323
// We do not need to register restore commands if using C# devkit.
2424
return;
2525
}
26-
const restoreChannel = vscode.window.createOutputChannel('.NET NuGet Restore');
26+
const restoreChannel = vscode.window.createOutputChannel(vscode.l10n.t('.NET NuGet Restore'));
2727
context.subscriptions.push(
2828
vscode.commands.registerCommand('dotnet.restore.project', async (_request): Promise<void> => {
2929
return chooseProjectAndRestore(languageServer, restoreChannel);

src/lsptoolshost/roslynLanguageServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ export async function activateRoslynLanguageServer(
10701070
_channel = outputChannel;
10711071
// Create a separate channel for outputting trace logs - these are incredibly verbose and make other logs very difficult to see.
10721072
// The trace channel verbosity is controlled by the _channel verbosity.
1073-
_traceChannel = vscode.window.createOutputChannel('C# LSP Trace Logs');
1073+
_traceChannel = vscode.window.createOutputChannel(vscode.l10n.t('C# LSP Trace Logs'));
10741074

10751075
const hostExecutableResolver = new DotnetRuntimeExtensionResolver(
10761076
platformInfo,

src/lsptoolshost/unitTesting.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function registerUnitTestingCommands(context: vscode.ExtensionContext, la
1919
// If using C# devkit, we don't need to register any test commands.
2020
return;
2121
}
22-
const dotnetTestChannel = vscode.window.createOutputChannel('.NET Test Log');
22+
const dotnetTestChannel = vscode.window.createOutputChannel(vscode.l10n.t('.NET Test Log'));
2323
context.subscriptions.push(
2424
vscode.commands.registerCommand(
2525
'dotnet.test.run',

src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ export async function activate(
144144
);
145145
} else {
146146
// activate language services
147-
const dotnetTestChannel = vscode.window.createOutputChannel('.NET Test Log');
148-
const dotnetChannel = vscode.window.createOutputChannel('.NET NuGet Restore');
147+
const dotnetTestChannel = vscode.window.createOutputChannel(vscode.l10n.t('.NET Test Log'));
148+
const dotnetChannel = vscode.window.createOutputChannel(vscode.l10n.t('.NET NuGet Restore'));
149149
omnisharpLangServicePromise = activateOmniSharpLanguageServer(
150150
context,
151151
platformInfo,

src/omnisharp/omnisharpLanguageServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export async function activateOmniSharpLanguageServer(
8989
eventStream.subscribe(dotnetTestChannelObserver.post);
9090
eventStream.subscribe(dotnetTestLoggerObserver.post);
9191

92-
const omnisharpChannel = vscode.window.createOutputChannel('OmniSharp Log');
92+
const omnisharpChannel = vscode.window.createOutputChannel(vscode.l10n.t('OmniSharp Log'));
9393
const omnisharpLogObserver = new OmnisharpLoggerObserver(omnisharpChannel, platformInfo);
9494
const omnisharpChannelObserver = new OmnisharpChannelObserver(omnisharpChannel);
9595
eventStream.subscribe(omnisharpLogObserver.post);

src/razor/src/razorLogger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class RazorLogger implements vscodeAdapter.Disposable {
2525
this.onLogEmitter = eventEmitterFactory.create<string>();
2626
this.onTraceLevelChangeEmitter = eventEmitterFactory.create<LogLevel>();
2727

28-
this.outputChannel = vscode.window.createOutputChannel(RazorLogger.logName);
28+
this.outputChannel = vscode.window.createOutputChannel(vscode.l10n.t('Razor Log'));
2929

3030
this.logRazorInformation();
3131
this.setupToStringOverrides();

src/shared/processPicker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export class RemoteAttachPicker {
222222
): Promise<AttachItem | undefined> {
223223
// Create remote attach output channel for errors.
224224
if (RemoteAttachPicker._channel === undefined) {
225-
RemoteAttachPicker._channel = vscode.window.createOutputChannel('remote-attach');
225+
RemoteAttachPicker._channel = vscode.window.createOutputChannel(vscode.l10n.t('remote-attach'));
226226
} else {
227227
RemoteAttachPicker._channel.clear();
228228
}

0 commit comments

Comments
 (0)