forked from microsoft/vscode
-
Notifications
You must be signed in to change notification settings - Fork 12
Restore display language support #34
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,10 @@ import { AuthType } from 'vs/base/common/auth'; | |
export const serverOptions: OptionDescriptions<ServerParsedArgs> = { | ||
//#region @coder | ||
'auth': { type: 'string' }, | ||
'port': { type: 'string' }, | ||
'locale': { type: 'string' }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this mean you can pass There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, gonna add it back on the code-server side. |
||
//#endregion | ||
|
||
'port': { type: 'string' }, | ||
'pick-port': { type: 'string' }, | ||
'connectionToken': { type: 'string' }, // deprecated in favor of `--connection-token` | ||
'connection-token': { type: 'string', description: nls.localize('connection-token', "A secret that must be included by the web client with all requests.") }, | ||
|
@@ -72,6 +73,7 @@ export const serverOptions: OptionDescriptions<ServerParsedArgs> = { | |
export interface ServerParsedArgs { | ||
//#region | ||
auth?: AuthType; | ||
'locale'?: string | ||
//#endregion | ||
|
||
port?: string; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/vs/workbench/services/localizations/browser/localizationsService.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly is this? I know you said taken from
src/main
so I guess I'll have to look there when reviewing this from a computer.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the file can contain comments so they remove them since
JSON.parse
will choke otherwise.