Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localize all the string passed into CreateOutputChannel #7703

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
".NET Test Log": ".NET Test Log",
".NET NuGet Restore": ".NET NuGet Restore",
"How to setup Remote Debugging": "How to setup Remote Debugging",
"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}'.",
"The C# extension for Visual Studio Code is incompatible on {0} {1}.": "The C# extension for Visual Studio Code is incompatible on {0} {1}.",
Expand All @@ -7,6 +9,7 @@
"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}'.",
"Does not contain .NET Core projects.": "Does not contain .NET Core projects.",
"pipeArgs must be a string or a string array type": "pipeArgs must be a string or a string array type",
"remote-attach": "remote-attach",
"Name not defined in current configuration.": "Name not defined in current configuration.",
"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.",
"Select the process to attach to": "Select the process to attach to",
Expand Down Expand Up @@ -145,6 +148,7 @@
"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",
"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?",
"Restart Language Server": "Restart Language Server",
"OmniSharp Log": "OmniSharp Log",
"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.",
"More Detail": "More Detail",
"Some projects have trouble loading. Please review the output for more details.": "Some projects have trouble loading. Please review the output for more details.",
Expand All @@ -168,6 +172,7 @@
"IntelliCode features will not be available, {0} failed to activate.": "IntelliCode features will not be available, {0} failed to activate.",
"Go to output": "Go to output",
"Suppress notification": "Suppress notification",
"C# LSP Trace Logs": "C# LSP Trace Logs",
"Restore {0}": "Restore {0}",
"Restore already in progress": "Restore already in progress",
"Sending request": "Sending request",
Expand Down
2 changes: 1 addition & 1 deletion src/lsptoolshost/restore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function registerRestoreCommands(context: vscode.ExtensionContext, langua
// We do not need to register restore commands if using C# devkit.
return;
}
const restoreChannel = vscode.window.createOutputChannel('.NET NuGet Restore');
const restoreChannel = vscode.window.createOutputChannel(vscode.l10n.t('.NET NuGet Restore'));
context.subscriptions.push(
vscode.commands.registerCommand('dotnet.restore.project', async (_request): Promise<void> => {
return chooseProjectAndRestore(languageServer, restoreChannel);
Expand Down
2 changes: 1 addition & 1 deletion src/lsptoolshost/roslynLanguageServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ export async function activateRoslynLanguageServer(
_channel = outputChannel;
// Create a separate channel for outputting trace logs - these are incredibly verbose and make other logs very difficult to see.
// The trace channel verbosity is controlled by the _channel verbosity.
_traceChannel = vscode.window.createOutputChannel('C# LSP Trace Logs');
_traceChannel = vscode.window.createOutputChannel(vscode.l10n.t('C# LSP Trace Logs'));

const hostExecutableResolver = new DotnetRuntimeExtensionResolver(
platformInfo,
Expand Down
2 changes: 1 addition & 1 deletion src/lsptoolshost/unitTesting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function registerUnitTestingCommands(context: vscode.ExtensionContext, la
// If using C# devkit, we don't need to register any test commands.
return;
}
const dotnetTestChannel = vscode.window.createOutputChannel('.NET Test Log');
const dotnetTestChannel = vscode.window.createOutputChannel(vscode.l10n.t('.NET Test Log'));
context.subscriptions.push(
vscode.commands.registerCommand(
'dotnet.test.run',
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ export async function activate(
);
} else {
// activate language services
const dotnetTestChannel = vscode.window.createOutputChannel('.NET Test Log');
const dotnetChannel = vscode.window.createOutputChannel('.NET NuGet Restore');
const dotnetTestChannel = vscode.window.createOutputChannel(vscode.l10n.t('.NET Test Log'));
const dotnetChannel = vscode.window.createOutputChannel(vscode.l10n.t('.NET NuGet Restore'));
omnisharpLangServicePromise = activateOmniSharpLanguageServer(
context,
platformInfo,
Expand Down
2 changes: 1 addition & 1 deletion src/omnisharp/omnisharpLanguageServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export async function activateOmniSharpLanguageServer(
eventStream.subscribe(dotnetTestChannelObserver.post);
eventStream.subscribe(dotnetTestLoggerObserver.post);

const omnisharpChannel = vscode.window.createOutputChannel('OmniSharp Log');
const omnisharpChannel = vscode.window.createOutputChannel(vscode.l10n.t('OmniSharp Log'));
const omnisharpLogObserver = new OmnisharpLoggerObserver(omnisharpChannel, platformInfo);
const omnisharpChannelObserver = new OmnisharpChannelObserver(omnisharpChannel);
eventStream.subscribe(omnisharpLogObserver.post);
Expand Down
2 changes: 1 addition & 1 deletion src/razor/src/razorLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class RazorLogger implements vscodeAdapter.Disposable {
this.onLogEmitter = eventEmitterFactory.create<string>();
this.onTraceLevelChangeEmitter = eventEmitterFactory.create<LogLevel>();

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

this.logRazorInformation();
this.setupToStringOverrides();
Expand Down
2 changes: 1 addition & 1 deletion src/shared/processPicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export class RemoteAttachPicker {
): Promise<AttachItem | undefined> {
// Create remote attach output channel for errors.
if (RemoteAttachPicker._channel === undefined) {
RemoteAttachPicker._channel = vscode.window.createOutputChannel('remote-attach');
RemoteAttachPicker._channel = vscode.window.createOutputChannel(vscode.l10n.t('remote-attach'));
} else {
RemoteAttachPicker._channel.clear();
}
Expand Down
Loading