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

bugfix/12709 Added localization for some phrases #12710

Closed
wants to merge 2 commits into from
Closed
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
8 changes: 4 additions & 4 deletions packages/debug/src/browser/debug-session-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import { DebugProtocol } from '@vscode/debugprotocol';
import { Deferred } from '@theia/core/lib/common/promise-util';
import { Event, Emitter, DisposableCollection, Disposable, MaybePromise } from '@theia/core';
import { Event, Emitter, DisposableCollection, Disposable, MaybePromise, nls } from '@theia/core';
import { OutputChannel } from '@theia/output/lib/browser/output-channel';

import { DebugChannel } from '../common/debug-service';
Expand Down Expand Up @@ -153,7 +153,7 @@ export class DebugSessionConnection implements Disposable {

protected checkDisposed(): void {
if (this.disposed) {
throw new Error('the debug session connection is disposed, id: ' + this.sessionId);
throw new Error(nls.localize('theia/debug/connectionClosed', 'Debug connection unexpectedly closed'));
}
}

Expand Down Expand Up @@ -197,15 +197,15 @@ export class DebugSessionConnection implements Disposable {

protected cancelPendingRequests(): void {
this.pendingRequests.forEach((deferred, requestId) => {
deferred.reject(new Error(`Request ${requestId} cancelled on connection close`));
deferred.reject(new Error(nls.localize('theia/debug/connectionClosed', 'Debug connection unexpectedly closed')));
});
}

protected doSendRequest<K extends DebugProtocol.Response>(command: string, args?: any, timeout?: number): Promise<K> {
const result = new Deferred<K>();

if (this.isClosed) {
result.reject(new Error('Connection is closed'));
result.reject(new Error(nls.localize('theia/debug/connectionClosed', 'Debug connection unexpectedly closed')));
} else {
const request: DebugProtocol.Request = {
seq: this.sequence++,
Expand Down
Loading