Added change to locFunc and preinstall (#23680)

* Added change to locFunc and preinstall

* added correct spacing and locations

* Fixed locFunc
This commit is contained in:
Alex Ma
2023-07-07 09:28:45 -07:00
committed by GitHub
parent beed27ee6d
commit d685205b2a
3 changed files with 16 additions and 34 deletions

File diff suppressed because one or more lines are too long

View File

@@ -184,27 +184,21 @@ const textFields = {
const VSCODEExtensions = [ const VSCODEExtensions = [
"bat", "bat",
"configuration-editing", "configuration-editing",
"csharp",
"dart",
"docker", "docker",
"fsharp",
"git", "git",
"git-base", "git-base",
"github", "github",
"github-authentication", "github-authentication",
"html",
"image-preview", "image-preview",
"ipynb", "ipynb",
"javascript",
"json", "json",
"json-language-features", "json-language-features",
"julia",
"markdown-basics", "markdown-basics",
"markdown-language-features", "markdown-language-features",
"markdown-math", "markdown-math",
"media-preview",
"merge-conflict", "merge-conflict",
"microsoft-authentication", "microsoft-authentication",
"notebook-renderers",
"powershell", "powershell",
"python", "python",
"r", "r",
@@ -218,7 +212,7 @@ const VSCODEExtensions = [
"theme-monokai-dimmed", "theme-monokai-dimmed",
"theme-quietlight", "theme-quietlight",
"theme-red", "theme-red",
"theme-seti", "vscode-theme-seti",
"theme-solarized-dark", "theme-solarized-dark",
"theme-solarized-light", "theme-solarized-light",
"theme-tomorrow-night-blue", "theme-tomorrow-night-blue",
@@ -324,10 +318,6 @@ export function refreshLangpacks(): Promise<void> {
let nonExistantExtensions = []; let nonExistantExtensions = [];
for (let curr of localization.translations) { for (let curr of localization.translations) {
try { try {
if (curr.id === 'vscode.theme-seti') {
//handle edge case where 'theme-seti' has a different id.
curr.id = 'vscode.vscode-theme-seti';
}
fs.statSync(path.join(translationDataFolder, curr.path.replace('./translations', ''))); fs.statSync(path.join(translationDataFolder, curr.path.replace('./translations', '')));
} }
catch { catch {
@@ -403,8 +393,9 @@ export function renameVscodeLangpacks(): Promise<void> {
let totalExtensions = fs.readdirSync(path.join(translationDataFolder, 'extensions')); let totalExtensions = fs.readdirSync(path.join(translationDataFolder, 'extensions'));
for (let extensionTag in totalExtensions) { for (let extensionTag in totalExtensions) {
let extensionFileName = totalExtensions[extensionTag]; let extensionFileName = totalExtensions[extensionTag];
let xlfPath = path.join(xlfFolder, `${langId}`, extensionFileName.replace('.i18n.json', '.xlf')); let shortExtensionFileName = extensionFileName.replace('ms-vscode.', 'vscode.').replace('vscode.', '');
if (!(fs.existsSync(xlfPath) || VSCODEExtensions.indexOf(extensionFileName.replace('.i18n.json', '')) !== -1)) { let xlfPath = path.join(xlfFolder, `${langId}`, shortExtensionFileName.replace('.i18n.json', '.xlf'));
if (!(fs.existsSync(xlfPath) || VSCODEExtensions.indexOf(shortExtensionFileName.replace('.i18n.json', '')) !== -1)) {
let filePath = path.join(translationDataFolder, 'extensions', extensionFileName); let filePath = path.join(translationDataFolder, 'extensions', extensionFileName);
rimraf.sync(filePath); rimraf.sync(filePath);
} }

View File

@@ -10,11 +10,11 @@ const minorNodeVersion = parseInt(nodeVersion[2]);
const patchNodeVersion = parseInt(nodeVersion[3]); const patchNodeVersion = parseInt(nodeVersion[3]);
if (majorNodeVersion < 16 || (majorNodeVersion === 16 && minorNodeVersion < 17)) { if (majorNodeVersion < 16 || (majorNodeVersion === 16 && minorNodeVersion < 17)) {
console.error('\033[1;31m*** Please use node.js versions >=16.17.x and <17.\033[0;0m'); console.error('\x1b[1;31m*** Please use node.js versions >=16.17.x and <17.\x1b[0;0m');
err = true; err = true;
} }
if (majorNodeVersion >= 17) { if (majorNodeVersion >= 17) {
console.warn('\033[1;31m*** Warning: Versions of node.js >= 17 have not been tested.\033[0;0m') console.warn('\x1b[1;31m*** Warning: Versions of node.js >= 17 have not been tested.\x1b[0;0m')
} }
const path = require('path'); const path = require('path');
@@ -33,18 +33,18 @@ if (
) || ) ||
majorYarnVersion >= 2 majorYarnVersion >= 2
) { ) {
console.error('\033[1;31m*** Please use yarn >=1.10.1 and <2.\033[0;0m'); console.error('\x1b[1;31m*** Please use yarn >=1.10.1 and <2.\x1b[0;0m');
err = true; err = true;
} }
if (!/yarn[\w-.]*\.c?js$|yarnpkg$/.test(process.env['npm_execpath'])) { if (!/yarn[\w-.]*\.c?js$|yarnpkg$/.test(process.env['npm_execpath'])) {
console.error('\033[1;31m*** Please use yarn to install dependencies.\033[0;0m'); console.error('\x1b[1;31m*** Please use yarn to install dependencies.\x1b[0;0m');
err = true; err = true;
} }
if (process.platform === 'win32') { if (process.platform === 'win32') {
if (!hasSupportedVisualStudioVersion()) { if (!hasSupportedVisualStudioVersion()) {
console.error('\033[1;31m*** Invalid C/C++ Compiler Toolchain. Please check https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites.\033[0;0m'); console.error('\x1b[1;31m*** Invalid C/C++ Compiler Toolchain. Please check https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites.\x1b[0;0m');
err = true; err = true;
} }
if (!err) { if (!err) {