Skip to content

Commit f5b81aa

Browse files
committed
chore: refresh language patch
1 parent bb6f3ee commit f5b81aa

File tree

1 file changed

+7
-23
lines changed

1 file changed

+7
-23
lines changed

patches/display-language.diff

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
1919
===================================================================
2020
--- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts
2121
+++ code-server/lib/vscode/src/vs/server/node/serverServices.ts
22-
@@ -212,6 +212,9 @@ export async function setupServerService
22+
@@ -209,6 +209,9 @@ export async function setupServerService
2323
const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority));
2424
socketServer.registerChannel('extensions', channel);
2525

@@ -39,11 +39,11 @@ Index: code-server/lib/vscode/src/vs/base/common/platform.ts
3939
*--------------------------------------------------------------------------------------------*/
4040
-import * as nls from 'vs/nls';
4141
-
42-
const LANGUAGE_DEFAULT = 'en';
42+
export const LANGUAGE_DEFAULT = 'en';
4343

4444
let _isWindows = false;
45-
@@ -81,17 +79,19 @@ if (typeof navigator === 'object' && !is
46-
_isLinux = _userAgent.indexOf('Linux') >= 0;
45+
@@ -83,17 +81,19 @@ if (typeof navigator === 'object' && !is
46+
_isMobile = _userAgent?.indexOf('Mobi') >= 0;
4747
_isWeb = true;
4848

4949
- const configuredLocale = nls.getConfiguredDefaultLocale(
@@ -216,7 +216,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
216216

217217
const workbenchWebConfiguration = {
218218
remoteAuthority,
219-
@@ -339,6 +342,7 @@ export class WebClientServer {
219+
@@ -336,6 +339,7 @@ export class WebClientServer {
220220
WORKBENCH_NLS_BASE_URL: vscodeBase + (nlsBaseUrl ? `${nlsBaseUrl}${!nlsBaseUrl.endsWith('/') ? '/' : ''}${this._productService.commit}/${this._productService.version}/` : ''),
221221
BASE: base,
222222
VS_BASE: vscodeBase,
@@ -236,7 +236,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
236236

237237
/* ----- server setup ----- */
238238

239-
@@ -97,6 +98,7 @@ export interface ServerParsedArgs {
239+
@@ -96,6 +97,7 @@ export interface ServerParsedArgs {
240240
'disable-update-check'?: boolean;
241241
'auth'?: string
242242
'disable-file-downloads'?: boolean;
@@ -248,7 +248,7 @@ Index: code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts
248248
===================================================================
249249
--- code-server.orig/lib/vscode/src/vs/workbench/workbench.web.main.ts
250250
+++ code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts
251-
@@ -122,8 +122,9 @@ import 'vs/workbench/contrib/logs/browse
251+
@@ -123,8 +123,9 @@ import 'vs/workbench/contrib/logs/browse
252252
// Explorer
253253
import 'vs/workbench/contrib/files/browser/files.web.contribution';
254254

@@ -314,19 +314,3 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/localization/electron-san
314314
await this.jsonEditingService.write(this.environmentService.argvResource, [{ path: ['locale'], value: locale }], true);
315315
return true;
316316
}
317-
Index: code-server/lib/vscode/src/vs/base/node/languagePacks.js
318-
===================================================================
319-
--- code-server.orig/lib/vscode/src/vs/base/node/languagePacks.js
320-
+++ code-server/lib/vscode/src/vs/base/node/languagePacks.js
321-
@@ -73,7 +73,10 @@
322-
function getLanguagePackConfigurations(userDataPath) {
323-
const configFile = path.join(userDataPath, 'languagepacks.json');
324-
try {
325-
- return nodeRequire(configFile);
326-
+ // This must not use Node's require otherwise it will be cached forever.
327-
+ // Code can get away with this since the process actually restarts but
328-
+ // that is not currently the case with code-server.
329-
+ return JSON.parse(fs.readFileSync(configFile, "utf8"));
330-
} catch (err) {
331-
// Do nothing. If we can't read the file we have no
332-
// language pack config.

0 commit comments

Comments
 (0)