@@ -985,10 +985,10 @@ index 0000000000..56331ff1fc
985985+ require('../../bootstrap-amd').load('vs/server/entry');
986986diff --git a/src/vs/server/ipc.d.ts b/src/vs/server/ipc.d.ts
987987new file mode 100644
988- index 0000000000..82566066ff
988+ index 0000000000..a0d1d0df54
989989--- /dev/null
990990+++ b/src/vs/server/ipc.d.ts
991- @@ -0,0 +1,106 @@
991+ @@ -0,0 +1,108 @@
992992+ /**
993993+ * External interfaces for integration into code-server over IPC. No vs imports
994994+ * should be made in this file.
@@ -1039,6 +1039,8 @@ index 0000000000..82566066ff
10391039+ 'extra-extensions-dir'?: string[];
10401040+ 'extra-builtin-extensions-dir'?: string[];
10411041+
1042+ + locale?: string
1043+ +
10421044+ log?: string;
10431045+ verbose?: boolean;
10441046+
@@ -1995,10 +1997,10 @@ index 0000000000..8956fc40d4
19951997+ };
19961998diff --git a/src/vs/server/node/nls.ts b/src/vs/server/node/nls.ts
19971999new file mode 100644
1998- index 0000000000..61c79d0d80
2000+ index 0000000000..3d428a57d3
19992001--- /dev/null
20002002+++ b/src/vs/server/node/nls.ts
2001- @@ -0,0 +1,86 @@
2003+ @@ -0,0 +1,88 @@
20022004+ import * as fs from 'fs';
20032005+ import * as path from 'path';
20042006+ import * as util from 'util';
@@ -2052,13 +2054,15 @@ index 0000000000..61c79d0d80
20522054+ };
20532055+
20542056+ export const getLocaleFromConfig = async (userDataPath: string): Promise<string> => {
2055- + let locale = 'en';
2056- + try {
2057- + const localeConfigUri = path.join(userDataPath, 'User/locale.json');
2058- + const content = stripComments(await util.promisify(fs.readFile)(localeConfigUri, 'utf8'));
2059- + locale = JSON.parse(content).locale;
2060- + } catch (error) { /* Ignore. */ }
2061- + return locale;
2057+ + const files = ['locale.json', 'argv.json'];
2058+ + for (let i = 0; i < files.length; ++i) {
2059+ + try {
2060+ + const localeConfigUri = path.join(userDataPath, 'User', files[i]);
2061+ + const content = stripComments(await util.promisify(fs.readFile)(localeConfigUri, 'utf8'));
2062+ + return JSON.parse(content).locale;
2063+ + } catch (error) { /* Ignore. */ }
2064+ + }
2065+ + return 'en';
20622066+ };
20632067+
20642068+ // Taken from src/main.js in the main VS Code source.
0 commit comments