@@ -14,6 +14,8 @@ We can remove this once upstream supports all language packs.
14
14
one but is worse because it does not handle non-existent or empty files.
15
15
7. Replace some caching and Node requires because code-server does not restart
16
16
when changing the language unlike native Code.
17
+ 8. Make language extensions installable like normal rather than using the
18
+ special set/clear language actions.
17
19
18
20
Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
19
21
===================================================================
@@ -322,3 +324,53 @@ Index: code-server/lib/vscode/src/vs/workbench/services/localization/electron-sa
322
324
await this.jsonEditingService.write(this.environmentService.argvResource, [{ path: ['locale'], value: locale }], true);
323
325
return true;
324
326
}
327
+ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts
328
+ ===================================================================
329
+ --- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts
330
+ +++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts
331
+ @@ -318,9 +318,6 @@ export abstract class AbstractInstallAct
332
+ if (this.extension.isBuiltin) {
333
+ return;
334
+ }
335
+ - if (this.extensionsWorkbenchService.canSetLanguage(this.extension)) {
336
+ - return;
337
+ - }
338
+ if (this.extension.state === ExtensionState.Uninstalled && await this.extensionsWorkbenchService.canInstall(this.extension)) {
339
+ this.enabled = this.installPreReleaseVersion ? this.extension.hasPreReleaseVersion : this.extension.hasReleaseVersion;
340
+ this.updateLabel();
341
+ @@ -1785,17 +1782,6 @@ export class SetLanguageAction extends E
342
+ update(): void {
343
+ this.enabled = false;
344
+ this.class = SetLanguageAction.DisabledClass;
345
+ - if (!this.extension) {
346
+ - return;
347
+ - }
348
+ - if (!this.extensionsWorkbenchService.canSetLanguage(this.extension)) {
349
+ - return;
350
+ - }
351
+ - if (this.extension.gallery && language === getLocale(this.extension.gallery)) {
352
+ - return;
353
+ - }
354
+ - this.enabled = true;
355
+ - this.class = SetLanguageAction.EnabledClass;
356
+ }
357
+
358
+ override async run(): Promise<any> {
359
+ @@ -1822,17 +1808,6 @@ export class ClearLanguageAction extends
360
+ update(): void {
361
+ this.enabled = false;
362
+ this.class = ClearLanguageAction.DisabledClass;
363
+ - if (!this.extension) {
364
+ - return;
365
+ - }
366
+ - if (!this.extensionsWorkbenchService.canSetLanguage(this.extension)) {
367
+ - return;
368
+ - }
369
+ - if (this.extension.gallery && language !== getLocale(this.extension.gallery)) {
370
+ - return;
371
+ - }
372
+ - this.enabled = true;
373
+ - this.class = ClearLanguageAction.EnabledClass;
374
+ }
375
+
376
+ override async run(): Promise<any> {
0 commit comments