forked from microsoft/vscode
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathlocalizationsService.ts
28 lines (22 loc) · 1.16 KB
/
localizationsService.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*---------------------------------------------------------------------------------------------
* Copyright (c) Coder Technologies. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ProxyChannel } from 'vs/base/parts/ipc/common/ipc';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { ILocalizationsService } from 'vs/platform/localizations/common/localizations';
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
/**
* Add localizations service for the browser.
* @author coder
*/
// @ts-ignore: interface is implemented via proxy
export class LocalizationsService implements ILocalizationsService {
declare readonly _serviceBrand: undefined;
constructor(
@IRemoteAgentService remoteAgentService: IRemoteAgentService,
) {
return ProxyChannel.toService<ILocalizationsService>(remoteAgentService.getConnection()!.getChannel('localizations'));
}
}
registerSingleton(ILocalizationsService, LocalizationsService, true);