Merge remote-tracking branch 'upstream/master'

* upstream/master: (199 commits)
  update node-debug
  [snippets] avoid incomplete proposals
  [css/less/sass] improved word rules
  [monaco] incomplete completion list not working
  fix #8917
  better handling of error case, #8917
  Fix NPE in InlineViewZonesComputer when a diff editor is opened and zooming with mouse wheel zoom
  be a little more explicit about 'navigation' group, #9153
  [CSS] Current color indicator freezes on old color, fixes  #9132
  Use variable name hoverMessage instead of htmlMessage
  Fixes #9283: Regression: No longer able to see source preview in Ctrl+hover
  Update c/c++ grammar (May27)
  bring back editor actions for #7666
  group actions => editor actions
  menu item order, group order, #9153
  prevent bad cursor on scrollbar in tabs container
  fix activity action showing blue feedback on mouse click when showing badge
  'revealIfOpened' flag should start at active editor (fixes #9265)
  check on activeActions, fixes #8995
  mirror 'source' when cursor changes, #8093
  ...
This commit is contained in:
Don Jayamanne
2016-07-15 11:34:10 +10:00
612 changed files with 8594 additions and 6526 deletions
+5 -4
View File
@@ -1,9 +1,10 @@
{
"env": {
"node": true
"node": true,
"es6": true
},
"rules": {
"no-undef": 2,
"no-unused-vars": 1
}
"no-console": 0
},
"extends": "eslint:recommended"
}
+4 -1
View File
@@ -1,4 +1,7 @@
{
"maxReviewers": 2,
"userBlacklistForPR": ["alexandrudima", "aeschli", "weinand", "bpasero", "isidorn", "joaomoreno", "jrieken", "dbaeumer", "egamma"]
"requiredOrgs": ["Microsoft"],
"skipAlreadyAssignedPR": true,
"skipAlreadyMentionedPR": true,
"skipCollaboratorPR": true
}
+3 -3
View File
@@ -25,14 +25,14 @@
"absolute"
],
"pattern": {
"regexp": "^\\*\\*\\* Error: ([^(]+)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\): (.*)$",
"regexp": "Error: ([^(]+)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\): (.*)$",
"file": 1,
"location": 2,
"message": 3
},
"watching": {
"beginsPattern": "^\\*\\*\\* Starting\\.\\.\\.$",
"endsPattern": "^\\*\\*\\* Finished"
"beginsPattern": "Starting compilation",
"endsPattern": "Finished compilation"
}
}
},
+1 -1
View File
@@ -1,5 +1,5 @@
environment:
ELECTRON_RUN_AS_NODE: 1
ATOM_SHELL_INTERNAL_RUN_AS_NODE: 1
install:
- ps: Install-Product node 5.10.1 x64
+4 -14
View File
@@ -17,8 +17,6 @@ var util = require('./lib/util');
var i18n = require('./lib/i18n');
var gulpUtil = require('gulp-util');
var quiet = !!process.env['VSCODE_BUILD_QUIET'];
function log(prefix, message) {
gulpUtil.log(gulpUtil.colors.cyan('[' + prefix + ']'), message);
}
@@ -26,25 +24,17 @@ function log(prefix, message) {
var root = path.dirname(__dirname);
var commit = util.getVersion(root);
var tsOptions = {
target: 'ES5',
module: 'amd',
verbose: !quiet,
preserveConstEnums: true,
experimentalDecorators: true,
sourceMap: true,
rootDir: path.join(path.dirname(__dirname), 'src')
};
exports.loaderConfig = function (emptyPaths) {
var result = {
paths: {
'vs': 'out-build/vs',
'vscode': 'empty:'
},
nodeModules: emptyPaths||[]
nodeModules: emptyPaths||[],
};
result['vs/css'] = { inlineResources: true };
return result;
};
@@ -73,7 +63,7 @@ function loader(bundledFileHeader) {
.pipe(util.loadSourcemaps())
.pipe(concat('vs/loader.js'))
.pipe(es.mapSync(function (f) {
f.sourceMap.sourceRoot = util.toFileUri(tsOptions.rootDir);
f.sourceMap.sourceRoot = util.toFileUri(path.join(path.dirname(__dirname), 'src'));
return f;
}));
}
+20 -20
View File
@@ -19,7 +19,6 @@ var glob = require('glob');
var sourcemaps = require('gulp-sourcemaps');
var nlsDev = require('vscode-nls-dev');
var quiet = !!process.env['VSCODE_BUILD_QUIET'];
var extensionsPath = path.join(path.dirname(__dirname), 'extensions');
var compilations = glob.sync('**/tsconfig.json', {
@@ -34,7 +33,7 @@ var tasks = compilations.map(function(tsconfigFile) {
var relativeDirname = path.dirname(tsconfigFile);
var tsOptions = require(absolutePath).compilerOptions;
tsOptions.verbose = !quiet;
tsOptions.verbose = false;
tsOptions.sourceMap = true;
var name = relativeDirname.replace(/\//g, '-');
@@ -56,15 +55,15 @@ var tasks = compilations.map(function(tsconfigFile) {
var i18n = path.join(__dirname, '..', 'i18n');
function createPipeline(build) {
var reporter = quiet ? null : createReporter();
var reporter = createReporter();
tsOptions.inlineSources = !!build;
var compilation = tsb.create(tsOptions, null, null, quiet ? null : function (err) { reporter(err.toString()); });
var compilation = tsb.create(tsOptions, null, null, err => reporter(err.toString()));
return function () {
var input = es.through();
var tsFilter = filter(['**/*.ts', '!**/lib/lib*.d.ts', '!**/node_modules/**'], { restore: true });
var output = input
const input = es.through();
const tsFilter = filter(['**/*.ts', '!**/lib/lib*.d.ts', '!**/node_modules/**'], { restore: true });
const output = input
.pipe(tsFilter)
.pipe(util.loadSourcemaps())
.pipe(compilation())
@@ -73,27 +72,27 @@ var tasks = compilations.map(function(tsconfigFile) {
addComment: false,
includeContent: !!build,
sourceRoot: function(file) {
var levels = file.relative.split(path.sep).length;
const levels = file.relative.split(path.sep).length;
return '../'.repeat(levels) + 'src';
}
}))
.pipe(tsFilter.restore)
.pipe(build ? nlsDev.createAdditionalLanguageFiles(languages, i18n, out) : es.through())
.pipe(quiet ? es.through() : reporter.end());
.pipe(reporter.end());
return es.duplex(input, output);
};
};
}
var srcOpts = { cwd: path.dirname(__dirname), base: srcBase };
const srcOpts = { cwd: path.dirname(__dirname), base: srcBase };
gulp.task(clean, function (cb) {
rimraf(out, cb);
});
gulp.task(compile, [clean], function () {
var pipeline = createPipeline(false);
var input = gulp.src(src, srcOpts);
const pipeline = createPipeline(false);
const input = gulp.src(src, srcOpts);
return input
.pipe(pipeline())
@@ -101,9 +100,9 @@ var tasks = compilations.map(function(tsconfigFile) {
});
gulp.task(watch, [clean], function () {
var pipeline = createPipeline(false);
var input = gulp.src(src, srcOpts);
var watchInput = watcher(src, srcOpts);
const pipeline = createPipeline(false);
const input = gulp.src(src, srcOpts);
const watchInput = watcher(src, srcOpts);
return watchInput
.pipe(util.incremental(pipeline, input))
@@ -115,8 +114,8 @@ var tasks = compilations.map(function(tsconfigFile) {
});
gulp.task(compileBuild, [clean], function () {
var pipeline = createPipeline(true);
var input = gulp.src(src, srcOpts);
const pipeline = createPipeline(true);
const input = gulp.src(src, srcOpts);
return input
.pipe(pipeline())
@@ -124,8 +123,9 @@ var tasks = compilations.map(function(tsconfigFile) {
});
gulp.task(watchBuild, [clean], function () {
var input = gulp.src(src, srcOpts);
var watchInput = watcher(src, srcOpts);
const pipeline = createPipeline(true);
const input = gulp.src(src, srcOpts);
const watchInput = watcher(src, srcOpts);
return watchInput
.pipe(util.incremental(function () { return pipeline(true); }, input))
+284 -288
View File
@@ -1,288 +1,284 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
"use strict";
var path = require('path');
var fs = require('fs');
var event_stream_1 = require('event-stream');
var File = require('vinyl');
var Is = require('is');
var quiet = !!process.env['VSCODE_BUILD_QUIET'] && false;
var util = require('gulp-util');
function log(message) {
var rest = [];
for (var _i = 1; _i < arguments.length; _i++) {
rest[_i - 1] = arguments[_i];
}
if (quiet) {
return;
}
util.log.apply(util, [util.colors.cyan('[i18n]'), message].concat(rest));
}
var LocalizeInfo;
(function (LocalizeInfo) {
function is(value) {
var candidate = value;
return Is.defined(candidate) && Is.string(candidate.key) && (Is.undef(candidate.comment) || (Is.array(candidate.comment) && candidate.comment.every(function (element) { return Is.string(element); })));
}
LocalizeInfo.is = is;
})(LocalizeInfo || (LocalizeInfo = {}));
var BundledFormat;
(function (BundledFormat) {
function is(value) {
if (Is.undef(value)) {
return false;
}
var candidate = value;
var length = Object.keys(value).length;
return length === 3 && Is.defined(candidate.keys) && Is.defined(candidate.messages) && Is.defined(candidate.bundles);
}
BundledFormat.is = is;
})(BundledFormat || (BundledFormat = {}));
var vscodeLanguages = [
'chs',
'cht',
'jpn',
'kor',
'deu',
'fra',
'esn',
'rus',
'ita'
];
var iso639_3_to_2 = {
'chs': 'zh-cn',
'cht': 'zh-tw',
'csy': 'cs-cz',
'deu': 'de',
'enu': 'en',
'esn': 'es',
'fra': 'fr',
'hun': 'hu',
'ita': 'it',
'jpn': 'ja',
'kor': 'ko',
'nld': 'nl',
'plk': 'pl',
'ptb': 'pt-br',
'ptg': 'pt',
'rus': 'ru',
'sve': 'sv-se',
'trk': 'tr'
};
function sortLanguages(directoryNames) {
return directoryNames.map(function (dirName) {
var lower = dirName.toLowerCase();
return {
name: lower,
iso639_2: iso639_3_to_2[lower]
};
}).sort(function (a, b) {
if (!a.iso639_2 && !b.iso639_2) {
return 0;
}
if (!a.iso639_2) {
return -1;
}
if (!b.iso639_2) {
return 1;
}
return a.iso639_2 < b.iso639_2 ? -1 : (a.iso639_2 > b.iso639_2 ? 1 : 0);
});
}
function stripComments(content) {
/**
* First capturing group matches double quoted string
* Second matches single quotes string
* Third matches block comments
* Fourth matches line comments
*/
var regexp = /("(?:[^\\\"]*(?:\\.)?)*")|('(?:[^\\\']*(?:\\.)?)*')|(\/\*(?:\r?\n|.)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g;
var result = content.replace(regexp, function (match, m1, m2, m3, m4) {
// Only one of m1, m2, m3, m4 matches
if (m3) {
// A block comment. Replace with nothing
return '';
}
else if (m4) {
// A line comment. If it ends in \r?\n then keep it.
var length_1 = m4.length;
if (length_1 > 2 && m4[length_1 - 1] === '\n') {
return m4[length_1 - 2] === '\r' ? '\r\n' : '\n';
}
else {
return '';
}
}
else {
// We match a string
return match;
}
});
return result;
}
;
function escapeCharacters(value) {
var result = [];
for (var i = 0; i < value.length; i++) {
var ch = value.charAt(i);
switch (ch) {
case '\'':
result.push('\\\'');
break;
case '"':
result.push('\\"');
break;
case '\\':
result.push('\\\\');
break;
case '\n':
result.push('\\n');
break;
case '\r':
result.push('\\r');
break;
case '\t':
result.push('\\t');
break;
case '\b':
result.push('\\b');
break;
case '\f':
result.push('\\f');
break;
default:
result.push(ch);
}
}
return result.join('');
}
function processCoreBundleFormat(fileHeader, json, emitter) {
var keysSection = json.keys;
var messageSection = json.messages;
var bundleSection = json.bundles;
var statistics = Object.create(null);
var total = 0;
var defaultMessages = Object.create(null);
var modules = Object.keys(keysSection);
modules.forEach(function (module) {
var keys = keysSection[module];
var messages = messageSection[module];
if (!messages || keys.length !== messages.length) {
emitter.emit('error', "Message for module " + module + " corrupted. Mismatch in number of keys and messages.");
return;
}
var messageMap = Object.create(null);
defaultMessages[module] = messageMap;
keys.map(function (key, i) {
total++;
if (Is.string(key)) {
messageMap[key] = messages[i];
}
else {
messageMap[key.key] = messages[i];
}
});
});
var languageDirectory = path.join(__dirname, '..', '..', 'i18n');
var languages = sortLanguages(fs.readdirSync(languageDirectory).filter(function (item) { return fs.statSync(path.join(languageDirectory, item)).isDirectory(); }));
languages.forEach(function (language) {
if (!language.iso639_2) {
return;
}
log("Generating nls bundles for: " + language.iso639_2);
statistics[language.iso639_2] = 0;
var localizedModules = Object.create(null);
var cwd = path.join(languageDirectory, language.name, 'src');
modules.forEach(function (module) {
var order = keysSection[module];
var i18nFile = path.join(cwd, module) + '.i18n.json';
var messages = null;
if (fs.existsSync(i18nFile)) {
var content = stripComments(fs.readFileSync(i18nFile, 'utf8'));
messages = JSON.parse(content);
}
else {
// log(`No localized messages found for module ${module}. Using default messages.`);
messages = defaultMessages[module];
statistics[language.iso639_2] = statistics[language.iso639_2] + Object.keys(messages).length;
}
var localizedMessages = [];
order.forEach(function (keyInfo) {
var key = null;
if (Is.string(keyInfo)) {
key = keyInfo;
}
else {
key = keyInfo.key;
}
var message = messages[key];
if (!message) {
log("No localized message found for key " + key + " in module " + module + ". Using default message.");
message = defaultMessages[module][key];
statistics[language.iso639_2] = statistics[language.iso639_2] + 1;
}
localizedMessages.push(message);
});
localizedModules[module] = localizedMessages;
});
Object.keys(bundleSection).forEach(function (bundle) {
var modules = bundleSection[bundle];
var contents = [
fileHeader,
("define(\"" + bundle + ".nls." + language.iso639_2 + "\", {")
];
modules.forEach(function (module, index) {
contents.push("\t\"" + module + "\": [");
var messages = localizedModules[module];
if (!messages) {
emitter.emit('error', "Didn't find messages for module " + module + ".");
return;
}
messages.forEach(function (message, index) {
contents.push("\t\t\"" + escapeCharacters(message) + (index < messages.length ? '",' : '"'));
});
contents.push(index < modules.length - 1 ? '\t],' : '\t]');
});
contents.push('});');
emitter.emit('data', new File({ path: bundle + '.nls.' + language.iso639_2 + '.js', contents: new Buffer(contents.join('\n'), 'utf-8') }));
});
});
log("Statistics (total " + total + "):");
Object.keys(statistics).forEach(function (key) {
var value = statistics[key];
log("\t" + value + " untranslated strings for locale " + key + " found.");
});
vscodeLanguages.forEach(function (language) {
var iso639_2 = iso639_3_to_2[language];
if (!iso639_2) {
log("\tCouldn't find iso639 2 mapping for language " + language + ". Using default language instead.");
}
else {
var stats = statistics[iso639_2];
if (Is.undef(stats)) {
log("\tNo translations found for language " + language + ". Using default language instead.");
}
}
});
}
function processNlsFiles(opts) {
return event_stream_1.through(function (file) {
var fileName = path.basename(file.path);
if (fileName === 'nls.metadata.json') {
var json = null;
if (file.isBuffer()) {
json = JSON.parse(file.contents.toString('utf8'));
}
else {
this.emit('error', "Failed to read component file: " + file.relative);
}
if (BundledFormat.is(json)) {
processCoreBundleFormat(opts.fileHeader, json, this);
}
}
this.emit('data', file);
});
}
exports.processNlsFiles = processNlsFiles;
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
"use strict";
var path = require('path');
var fs = require('fs');
var event_stream_1 = require('event-stream');
var File = require('vinyl');
var Is = require('is');
var util = require('gulp-util');
function log(message) {
var rest = [];
for (var _i = 1; _i < arguments.length; _i++) {
rest[_i - 1] = arguments[_i];
}
util.log.apply(util, [util.colors.cyan('[i18n]'), message].concat(rest));
}
var LocalizeInfo;
(function (LocalizeInfo) {
function is(value) {
var candidate = value;
return Is.defined(candidate) && Is.string(candidate.key) && (Is.undef(candidate.comment) || (Is.array(candidate.comment) && candidate.comment.every(function (element) { return Is.string(element); })));
}
LocalizeInfo.is = is;
})(LocalizeInfo || (LocalizeInfo = {}));
var BundledFormat;
(function (BundledFormat) {
function is(value) {
if (Is.undef(value)) {
return false;
}
var candidate = value;
var length = Object.keys(value).length;
return length === 3 && Is.defined(candidate.keys) && Is.defined(candidate.messages) && Is.defined(candidate.bundles);
}
BundledFormat.is = is;
})(BundledFormat || (BundledFormat = {}));
var vscodeLanguages = [
'chs',
'cht',
'jpn',
'kor',
'deu',
'fra',
'esn',
'rus',
'ita'
];
var iso639_3_to_2 = {
'chs': 'zh-cn',
'cht': 'zh-tw',
'csy': 'cs-cz',
'deu': 'de',
'enu': 'en',
'esn': 'es',
'fra': 'fr',
'hun': 'hu',
'ita': 'it',
'jpn': 'ja',
'kor': 'ko',
'nld': 'nl',
'plk': 'pl',
'ptb': 'pt-br',
'ptg': 'pt',
'rus': 'ru',
'sve': 'sv-se',
'trk': 'tr'
};
function sortLanguages(directoryNames) {
return directoryNames.map(function (dirName) {
var lower = dirName.toLowerCase();
return {
name: lower,
iso639_2: iso639_3_to_2[lower]
};
}).sort(function (a, b) {
if (!a.iso639_2 && !b.iso639_2) {
return 0;
}
if (!a.iso639_2) {
return -1;
}
if (!b.iso639_2) {
return 1;
}
return a.iso639_2 < b.iso639_2 ? -1 : (a.iso639_2 > b.iso639_2 ? 1 : 0);
});
}
function stripComments(content) {
/**
* First capturing group matches double quoted string
* Second matches single quotes string
* Third matches block comments
* Fourth matches line comments
*/
var regexp = /("(?:[^\\\"]*(?:\\.)?)*")|('(?:[^\\\']*(?:\\.)?)*')|(\/\*(?:\r?\n|.)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g;
var result = content.replace(regexp, function (match, m1, m2, m3, m4) {
// Only one of m1, m2, m3, m4 matches
if (m3) {
// A block comment. Replace with nothing
return '';
}
else if (m4) {
// A line comment. If it ends in \r?\n then keep it.
var length_1 = m4.length;
if (length_1 > 2 && m4[length_1 - 1] === '\n') {
return m4[length_1 - 2] === '\r' ? '\r\n' : '\n';
}
else {
return '';
}
}
else {
// We match a string
return match;
}
});
return result;
}
;
function escapeCharacters(value) {
var result = [];
for (var i = 0; i < value.length; i++) {
var ch = value.charAt(i);
switch (ch) {
case '\'':
result.push('\\\'');
break;
case '"':
result.push('\\"');
break;
case '\\':
result.push('\\\\');
break;
case '\n':
result.push('\\n');
break;
case '\r':
result.push('\\r');
break;
case '\t':
result.push('\\t');
break;
case '\b':
result.push('\\b');
break;
case '\f':
result.push('\\f');
break;
default:
result.push(ch);
}
}
return result.join('');
}
function processCoreBundleFormat(fileHeader, json, emitter) {
var keysSection = json.keys;
var messageSection = json.messages;
var bundleSection = json.bundles;
var statistics = Object.create(null);
var total = 0;
var defaultMessages = Object.create(null);
var modules = Object.keys(keysSection);
modules.forEach(function (module) {
var keys = keysSection[module];
var messages = messageSection[module];
if (!messages || keys.length !== messages.length) {
emitter.emit('error', "Message for module " + module + " corrupted. Mismatch in number of keys and messages.");
return;
}
var messageMap = Object.create(null);
defaultMessages[module] = messageMap;
keys.map(function (key, i) {
total++;
if (Is.string(key)) {
messageMap[key] = messages[i];
}
else {
messageMap[key.key] = messages[i];
}
});
});
var languageDirectory = path.join(__dirname, '..', '..', 'i18n');
var languages = sortLanguages(fs.readdirSync(languageDirectory).filter(function (item) { return fs.statSync(path.join(languageDirectory, item)).isDirectory(); }));
languages.forEach(function (language) {
if (!language.iso639_2) {
return;
}
log("Generating nls bundles for: " + language.iso639_2);
statistics[language.iso639_2] = 0;
var localizedModules = Object.create(null);
var cwd = path.join(languageDirectory, language.name, 'src');
modules.forEach(function (module) {
var order = keysSection[module];
var i18nFile = path.join(cwd, module) + '.i18n.json';
var messages = null;
if (fs.existsSync(i18nFile)) {
var content = stripComments(fs.readFileSync(i18nFile, 'utf8'));
messages = JSON.parse(content);
}
else {
// log(`No localized messages found for module ${module}. Using default messages.`);
messages = defaultMessages[module];
statistics[language.iso639_2] = statistics[language.iso639_2] + Object.keys(messages).length;
}
var localizedMessages = [];
order.forEach(function (keyInfo) {
var key = null;
if (Is.string(keyInfo)) {
key = keyInfo;
}
else {
key = keyInfo.key;
}
var message = messages[key];
if (!message) {
log("No localized message found for key " + key + " in module " + module + ". Using default message.");
message = defaultMessages[module][key];
statistics[language.iso639_2] = statistics[language.iso639_2] + 1;
}
localizedMessages.push(message);
});
localizedModules[module] = localizedMessages;
});
Object.keys(bundleSection).forEach(function (bundle) {
var modules = bundleSection[bundle];
var contents = [
fileHeader,
("define(\"" + bundle + ".nls." + language.iso639_2 + "\", {")
];
modules.forEach(function (module, index) {
contents.push("\t\"" + module + "\": [");
var messages = localizedModules[module];
if (!messages) {
emitter.emit('error', "Didn't find messages for module " + module + ".");
return;
}
messages.forEach(function (message, index) {
contents.push("\t\t\"" + escapeCharacters(message) + (index < messages.length ? '",' : '"'));
});
contents.push(index < modules.length - 1 ? '\t],' : '\t]');
});
contents.push('});');
emitter.emit('data', new File({ path: bundle + '.nls.' + language.iso639_2 + '.js', contents: new Buffer(contents.join('\n'), 'utf-8') }));
});
});
log("Statistics (total " + total + "):");
Object.keys(statistics).forEach(function (key) {
var value = statistics[key];
log("\t" + value + " untranslated strings for locale " + key + " found.");
});
vscodeLanguages.forEach(function (language) {
var iso639_2 = iso639_3_to_2[language];
if (!iso639_2) {
log("\tCouldn't find iso639 2 mapping for language " + language + ". Using default language instead.");
}
else {
var stats = statistics[iso639_2];
if (Is.undef(stats)) {
log("\tNo translations found for language " + language + ". Using default language instead.");
}
}
});
}
function processNlsFiles(opts) {
return event_stream_1.through(function (file) {
var fileName = path.basename(file.path);
if (fileName === 'nls.metadata.json') {
var json = null;
if (file.isBuffer()) {
json = JSON.parse(file.contents.toString('utf8'));
}
else {
this.emit('error', "Failed to read component file: " + file.relative);
}
if (BundledFormat.is(json)) {
processCoreBundleFormat(opts.fileHeader, json, this);
}
}
this.emit('data', file);
});
}
exports.processNlsFiles = processNlsFiles;
-5
View File
@@ -11,13 +11,8 @@ import { ThroughStream } from 'through';
import File = require('vinyl');
import * as Is from 'is';
const quiet = !!process.env['VSCODE_BUILD_QUIET'] && false;
var util = require('gulp-util');
function log(message: any, ...rest: any[]): void {
if (quiet) {
return;
}
util.log(util.colors.cyan('[i18n]'), message, ...rest);
}
+350 -350
View File
@@ -1,350 +1,350 @@
"use strict";
var ts = require('./typescript/typescriptServices');
var lazy = require('lazy.js');
var event_stream_1 = require('event-stream');
var File = require('vinyl');
var sm = require('source-map');
var assign = require('object-assign');
var clone = require('clone');
var path = require('path');
var CollectStepResult;
(function (CollectStepResult) {
CollectStepResult[CollectStepResult["Yes"] = 0] = "Yes";
CollectStepResult[CollectStepResult["YesAndRecurse"] = 1] = "YesAndRecurse";
CollectStepResult[CollectStepResult["No"] = 2] = "No";
CollectStepResult[CollectStepResult["NoAndRecurse"] = 3] = "NoAndRecurse";
})(CollectStepResult || (CollectStepResult = {}));
function collect(node, fn) {
var result = [];
function loop(node) {
var stepResult = fn(node);
if (stepResult === CollectStepResult.Yes || stepResult === CollectStepResult.YesAndRecurse) {
result.push(node);
}
if (stepResult === CollectStepResult.YesAndRecurse || stepResult === CollectStepResult.NoAndRecurse) {
ts.forEachChild(node, loop);
}
}
loop(node);
return result;
}
function template(lines) {
var indent = '', wrap = '';
if (lines.length > 1) {
indent = '\t';
wrap = '\n';
}
return "/*---------------------------------------------------------\n * Copyright (C) Microsoft Corporation. All rights reserved.\n *--------------------------------------------------------*/\ndefine([], [" + (wrap + lines.map(function (l) { return indent + l; }).join(',\n') + wrap) + "]);";
}
/**
* Returns a stream containing the patched JavaScript and source maps.
*/
function nls() {
var input = event_stream_1.through();
var output = input.pipe(event_stream_1.through(function (f) {
var _this = this;
if (!f.sourceMap) {
return this.emit('error', new Error("File " + f.relative + " does not have sourcemaps."));
}
var source = f.sourceMap.sources[0];
if (!source) {
return this.emit('error', new Error("File " + f.relative + " does not have a source in the source map."));
}
var root = f.sourceMap.sourceRoot;
if (root) {
source = path.join(root, source);
}
var typescript = f.sourceMap.sourcesContent[0];
if (!typescript) {
return this.emit('error', new Error("File " + f.relative + " does not have the original content in the source map."));
}
nls.patchFiles(f, typescript).forEach(function (f) { return _this.emit('data', f); });
}));
return event_stream_1.duplex(input, output);
}
function isImportNode(node) {
return node.kind === 212 /* ImportDeclaration */ || node.kind === 211 /* ImportEqualsDeclaration */;
}
var nls;
(function (nls_1) {
function fileFrom(file, contents, path) {
if (path === void 0) { path = file.path; }
return new File({
contents: new Buffer(contents),
base: file.base,
cwd: file.cwd,
path: path
});
}
nls_1.fileFrom = fileFrom;
function mappedPositionFrom(source, lc) {
return { source: source, line: lc.line + 1, column: lc.character };
}
nls_1.mappedPositionFrom = mappedPositionFrom;
function lcFrom(position) {
return { line: position.line - 1, character: position.column };
}
nls_1.lcFrom = lcFrom;
var SingleFileServiceHost = (function () {
function SingleFileServiceHost(options, filename, contents) {
var _this = this;
this.options = options;
this.filename = filename;
this.getCompilationSettings = function () { return _this.options; };
this.getScriptFileNames = function () { return [_this.filename]; };
this.getScriptVersion = function () { return '1'; };
this.getScriptSnapshot = function (name) { return name === _this.filename ? _this.file : _this.lib; };
this.getCurrentDirectory = function () { return ''; };
this.getDefaultLibFileName = function () { return 'lib.d.ts'; };
this.file = ts.ScriptSnapshot.fromString(contents);
this.lib = ts.ScriptSnapshot.fromString('');
}
return SingleFileServiceHost;
}());
nls_1.SingleFileServiceHost = SingleFileServiceHost;
function isCallExpressionWithinTextSpanCollectStep(textSpan, node) {
if (!ts.textSpanContainsTextSpan({ start: node.pos, length: node.end - node.pos }, textSpan)) {
return CollectStepResult.No;
}
return node.kind === 160 /* CallExpression */ ? CollectStepResult.YesAndRecurse : CollectStepResult.NoAndRecurse;
}
function analyze(contents, options) {
if (options === void 0) { options = {}; }
var filename = 'file.ts';
var serviceHost = new SingleFileServiceHost(assign(clone(options), { noResolve: true }), filename, contents);
var service = ts.createLanguageService(serviceHost);
var sourceFile = service.getSourceFile(filename);
// all imports
var imports = lazy(collect(sourceFile, function (n) { return isImportNode(n) ? CollectStepResult.YesAndRecurse : CollectStepResult.NoAndRecurse; }));
// import nls = require('vs/nls');
var importEqualsDeclarations = imports
.filter(function (n) { return n.kind === 211 /* ImportEqualsDeclaration */; })
.map(function (n) { return n; })
.filter(function (d) { return d.moduleReference.kind === 222 /* ExternalModuleReference */; })
.filter(function (d) { return d.moduleReference.expression.getText() === '\'vs/nls\''; });
// import ... from 'vs/nls';
var importDeclarations = imports
.filter(function (n) { return n.kind === 212 /* ImportDeclaration */; })
.map(function (n) { return n; })
.filter(function (d) { return d.moduleSpecifier.kind === 8 /* StringLiteral */; })
.filter(function (d) { return d.moduleSpecifier.getText() === '\'vs/nls\''; })
.filter(function (d) { return !!d.importClause && !!d.importClause.namedBindings; });
var nlsExpressions = importEqualsDeclarations
.map(function (d) { return d.moduleReference.expression; })
.concat(importDeclarations.map(function (d) { return d.moduleSpecifier; }))
.map(function (d) { return ({
start: ts.getLineAndCharacterOfPosition(sourceFile, d.getStart()),
end: ts.getLineAndCharacterOfPosition(sourceFile, d.getEnd())
}); });
// `nls.localize(...)` calls
var nlsLocalizeCallExpressions = importDeclarations
.filter(function (d) { return d.importClause.namedBindings.kind === 214 /* NamespaceImport */; })
.map(function (d) { return d.importClause.namedBindings.name; })
.concat(importEqualsDeclarations.map(function (d) { return d.name; }))
.map(function (n) { return service.getReferencesAtPosition(filename, n.pos + 1); })
.flatten()
.filter(function (r) { return !r.isWriteAccess; })
.map(function (r) { return collect(sourceFile, function (n) { return isCallExpressionWithinTextSpanCollectStep(r.textSpan, n); }); })
.map(function (a) { return lazy(a).last(); })
.filter(function (n) { return !!n; })
.map(function (n) { return n; })
.filter(function (n) { return n.expression.kind === 158 /* PropertyAccessExpression */ && n.expression.name.getText() === 'localize'; });
// `localize` named imports
var allLocalizeImportDeclarations = importDeclarations
.filter(function (d) { return d.importClause.namedBindings.kind === 215 /* NamedImports */; })
.map(function (d) { return d.importClause.namedBindings.elements; })
.flatten();
// `localize` read-only references
var localizeReferences = allLocalizeImportDeclarations
.filter(function (d) { return d.name.getText() === 'localize'; })
.map(function (n) { return service.getReferencesAtPosition(filename, n.pos + 1); })
.flatten()
.filter(function (r) { return !r.isWriteAccess; });
// custom named `localize` read-only references
var namedLocalizeReferences = allLocalizeImportDeclarations
.filter(function (d) { return d.propertyName && d.propertyName.getText() === 'localize'; })
.map(function (n) { return service.getReferencesAtPosition(filename, n.name.pos + 1); })
.flatten()
.filter(function (r) { return !r.isWriteAccess; });
// find the deepest call expressions AST nodes that contain those references
var localizeCallExpressions = localizeReferences
.concat(namedLocalizeReferences)
.map(function (r) { return collect(sourceFile, function (n) { return isCallExpressionWithinTextSpanCollectStep(r.textSpan, n); }); })
.map(function (a) { return lazy(a).last(); })
.filter(function (n) { return !!n; })
.map(function (n) { return n; });
// collect everything
var localizeCalls = nlsLocalizeCallExpressions
.concat(localizeCallExpressions)
.map(function (e) { return e.arguments; })
.filter(function (a) { return a.length > 1; })
.sort(function (a, b) { return a[0].getStart() - b[0].getStart(); })
.map(function (a) { return ({
keySpan: { start: ts.getLineAndCharacterOfPosition(sourceFile, a[0].getStart()), end: ts.getLineAndCharacterOfPosition(sourceFile, a[0].getEnd()) },
key: a[0].getText(),
valueSpan: { start: ts.getLineAndCharacterOfPosition(sourceFile, a[1].getStart()), end: ts.getLineAndCharacterOfPosition(sourceFile, a[1].getEnd()) },
value: a[1].getText()
}); });
return {
localizeCalls: localizeCalls.toArray(),
nlsExpressions: nlsExpressions.toArray()
};
}
nls_1.analyze = analyze;
var TextModel = (function () {
function TextModel(contents) {
var regex = /\r\n|\r|\n/g;
var index = 0;
var match;
this.lines = [];
this.lineEndings = [];
while (match = regex.exec(contents)) {
this.lines.push(contents.substring(index, match.index));
this.lineEndings.push(match[0]);
index = regex.lastIndex;
}
if (contents.length > 0) {
this.lines.push(contents.substring(index, contents.length));
this.lineEndings.push('');
}
}
TextModel.prototype.get = function (index) {
return this.lines[index];
};
TextModel.prototype.set = function (index, line) {
this.lines[index] = line;
};
Object.defineProperty(TextModel.prototype, "lineCount", {
get: function () {
return this.lines.length;
},
enumerable: true,
configurable: true
});
/**
* Applies patch(es) to the model.
* Multiple patches must be ordered.
* Does not support patches spanning multiple lines.
*/
TextModel.prototype.apply = function (patch) {
var startLineNumber = patch.span.start.line;
var endLineNumber = patch.span.end.line;
var startLine = this.lines[startLineNumber] || '';
var endLine = this.lines[endLineNumber] || '';
this.lines[startLineNumber] = [
startLine.substring(0, patch.span.start.character),
patch.content,
endLine.substring(patch.span.end.character)
].join('');
for (var i = startLineNumber + 1; i <= endLineNumber; i++) {
this.lines[i] = '';
}
};
TextModel.prototype.toString = function () {
return lazy(this.lines).zip(this.lineEndings)
.flatten().toArray().join('');
};
return TextModel;
}());
nls_1.TextModel = TextModel;
function patchJavascript(patches, contents, moduleId) {
var model = new nls.TextModel(contents);
// patch the localize calls
lazy(patches).reverse().each(function (p) { return model.apply(p); });
// patch the 'vs/nls' imports
var firstLine = model.get(0);
var patchedFirstLine = firstLine.replace(/(['"])vs\/nls\1/g, "$1vs/nls!" + moduleId + "$1");
model.set(0, patchedFirstLine);
return model.toString();
}
nls_1.patchJavascript = patchJavascript;
function patchSourcemap(patches, rsm, smc) {
var smg = new sm.SourceMapGenerator({
file: rsm.file,
sourceRoot: rsm.sourceRoot
});
patches = patches.reverse();
var currentLine = -1;
var currentLineDiff = 0;
var source = null;
smc.eachMapping(function (m) {
var patch = patches[patches.length - 1];
var original = { line: m.originalLine, column: m.originalColumn };
var generated = { line: m.generatedLine, column: m.generatedColumn };
if (currentLine !== generated.line) {
currentLineDiff = 0;
}
currentLine = generated.line;
generated.column += currentLineDiff;
if (patch && m.generatedLine - 1 === patch.span.end.line && m.generatedColumn === patch.span.end.character) {
var originalLength = patch.span.end.character - patch.span.start.character;
var modifiedLength = patch.content.length;
var lengthDiff = modifiedLength - originalLength;
currentLineDiff += lengthDiff;
generated.column += lengthDiff;
patches.pop();
}
source = rsm.sourceRoot ? path.relative(rsm.sourceRoot, m.source) : m.source;
source = source.replace(/\\/g, '/');
smg.addMapping({ source: source, name: m.name, original: original, generated: generated });
}, null, sm.SourceMapConsumer.GENERATED_ORDER);
if (source) {
smg.setSourceContent(source, smc.sourceContentFor(source));
}
return JSON.parse(smg.toString());
}
nls_1.patchSourcemap = patchSourcemap;
function patch(moduleId, typescript, javascript, sourcemap) {
var _a = analyze(typescript), localizeCalls = _a.localizeCalls, nlsExpressions = _a.nlsExpressions;
if (localizeCalls.length === 0) {
return { javascript: javascript, sourcemap: sourcemap };
}
var nlsKeys = template(localizeCalls.map(function (lc) { return lc.key; }));
var nls = template(localizeCalls.map(function (lc) { return lc.value; }));
var smc = new sm.SourceMapConsumer(sourcemap);
var positionFrom = mappedPositionFrom.bind(null, sourcemap.sources[0]);
var i = 0;
// build patches
var patches = lazy(localizeCalls)
.map(function (lc) { return ([
{ range: lc.keySpan, content: '' + (i++) },
{ range: lc.valueSpan, content: 'null' }
]); })
.flatten()
.map(function (c) {
var start = lcFrom(smc.generatedPositionFor(positionFrom(c.range.start)));
var end = lcFrom(smc.generatedPositionFor(positionFrom(c.range.end)));
return { span: { start: start, end: end }, content: c.content };
})
.toArray();
javascript = patchJavascript(patches, javascript, moduleId);
// since imports are not within the sourcemap information,
// we must do this MacGyver style
if (nlsExpressions.length) {
javascript = javascript.replace(/^define\(.*$/m, function (line) {
return line.replace(/(['"])vs\/nls\1/g, "$1vs/nls!" + moduleId + "$1");
});
}
sourcemap = patchSourcemap(patches, sourcemap, smc);
return { javascript: javascript, sourcemap: sourcemap, nlsKeys: nlsKeys, nls: nls };
}
nls_1.patch = patch;
function patchFiles(javascriptFile, typescript) {
// hack?
var moduleId = javascriptFile.relative
.replace(/\.js$/, '')
.replace(/\\/g, '/');
var _a = patch(moduleId, typescript, javascriptFile.contents.toString(), javascriptFile.sourceMap), javascript = _a.javascript, sourcemap = _a.sourcemap, nlsKeys = _a.nlsKeys, nls = _a.nls;
var result = [fileFrom(javascriptFile, javascript)];
result[0].sourceMap = sourcemap;
if (nlsKeys) {
result.push(fileFrom(javascriptFile, nlsKeys, javascriptFile.path.replace(/\.js$/, '.nls.keys.js')));
}
if (nls) {
result.push(fileFrom(javascriptFile, nls, javascriptFile.path.replace(/\.js$/, '.nls.js')));
}
return result;
}
nls_1.patchFiles = patchFiles;
})(nls || (nls = {}));
module.exports = nls;
"use strict";
var ts = require('./typescript/typescriptServices');
var lazy = require('lazy.js');
var event_stream_1 = require('event-stream');
var File = require('vinyl');
var sm = require('source-map');
var assign = require('object-assign');
var clone = require('clone');
var path = require('path');
var CollectStepResult;
(function (CollectStepResult) {
CollectStepResult[CollectStepResult["Yes"] = 0] = "Yes";
CollectStepResult[CollectStepResult["YesAndRecurse"] = 1] = "YesAndRecurse";
CollectStepResult[CollectStepResult["No"] = 2] = "No";
CollectStepResult[CollectStepResult["NoAndRecurse"] = 3] = "NoAndRecurse";
})(CollectStepResult || (CollectStepResult = {}));
function collect(node, fn) {
var result = [];
function loop(node) {
var stepResult = fn(node);
if (stepResult === CollectStepResult.Yes || stepResult === CollectStepResult.YesAndRecurse) {
result.push(node);
}
if (stepResult === CollectStepResult.YesAndRecurse || stepResult === CollectStepResult.NoAndRecurse) {
ts.forEachChild(node, loop);
}
}
loop(node);
return result;
}
function template(lines) {
var indent = '', wrap = '';
if (lines.length > 1) {
indent = '\t';
wrap = '\n';
}
return "/*---------------------------------------------------------\n * Copyright (C) Microsoft Corporation. All rights reserved.\n *--------------------------------------------------------*/\ndefine([], [" + (wrap + lines.map(function (l) { return indent + l; }).join(',\n') + wrap) + "]);";
}
/**
* Returns a stream containing the patched JavaScript and source maps.
*/
function nls() {
var input = event_stream_1.through();
var output = input.pipe(event_stream_1.through(function (f) {
var _this = this;
if (!f.sourceMap) {
return this.emit('error', new Error("File " + f.relative + " does not have sourcemaps."));
}
var source = f.sourceMap.sources[0];
if (!source) {
return this.emit('error', new Error("File " + f.relative + " does not have a source in the source map."));
}
var root = f.sourceMap.sourceRoot;
if (root) {
source = path.join(root, source);
}
var typescript = f.sourceMap.sourcesContent[0];
if (!typescript) {
return this.emit('error', new Error("File " + f.relative + " does not have the original content in the source map."));
}
nls.patchFiles(f, typescript).forEach(function (f) { return _this.emit('data', f); });
}));
return event_stream_1.duplex(input, output);
}
function isImportNode(node) {
return node.kind === 212 /* ImportDeclaration */ || node.kind === 211 /* ImportEqualsDeclaration */;
}
var nls;
(function (nls_1) {
function fileFrom(file, contents, path) {
if (path === void 0) { path = file.path; }
return new File({
contents: new Buffer(contents),
base: file.base,
cwd: file.cwd,
path: path
});
}
nls_1.fileFrom = fileFrom;
function mappedPositionFrom(source, lc) {
return { source: source, line: lc.line + 1, column: lc.character };
}
nls_1.mappedPositionFrom = mappedPositionFrom;
function lcFrom(position) {
return { line: position.line - 1, character: position.column };
}
nls_1.lcFrom = lcFrom;
var SingleFileServiceHost = (function () {
function SingleFileServiceHost(options, filename, contents) {
var _this = this;
this.options = options;
this.filename = filename;
this.getCompilationSettings = function () { return _this.options; };
this.getScriptFileNames = function () { return [_this.filename]; };
this.getScriptVersion = function () { return '1'; };
this.getScriptSnapshot = function (name) { return name === _this.filename ? _this.file : _this.lib; };
this.getCurrentDirectory = function () { return ''; };
this.getDefaultLibFileName = function () { return 'lib.d.ts'; };
this.file = ts.ScriptSnapshot.fromString(contents);
this.lib = ts.ScriptSnapshot.fromString('');
}
return SingleFileServiceHost;
}());
nls_1.SingleFileServiceHost = SingleFileServiceHost;
function isCallExpressionWithinTextSpanCollectStep(textSpan, node) {
if (!ts.textSpanContainsTextSpan({ start: node.pos, length: node.end - node.pos }, textSpan)) {
return CollectStepResult.No;
}
return node.kind === 160 /* CallExpression */ ? CollectStepResult.YesAndRecurse : CollectStepResult.NoAndRecurse;
}
function analyze(contents, options) {
if (options === void 0) { options = {}; }
var filename = 'file.ts';
var serviceHost = new SingleFileServiceHost(assign(clone(options), { noResolve: true }), filename, contents);
var service = ts.createLanguageService(serviceHost);
var sourceFile = service.getSourceFile(filename);
// all imports
var imports = lazy(collect(sourceFile, function (n) { return isImportNode(n) ? CollectStepResult.YesAndRecurse : CollectStepResult.NoAndRecurse; }));
// import nls = require('vs/nls');
var importEqualsDeclarations = imports
.filter(function (n) { return n.kind === 211 /* ImportEqualsDeclaration */; })
.map(function (n) { return n; })
.filter(function (d) { return d.moduleReference.kind === 222 /* ExternalModuleReference */; })
.filter(function (d) { return d.moduleReference.expression.getText() === '\'vs/nls\''; });
// import ... from 'vs/nls';
var importDeclarations = imports
.filter(function (n) { return n.kind === 212 /* ImportDeclaration */; })
.map(function (n) { return n; })
.filter(function (d) { return d.moduleSpecifier.kind === 8 /* StringLiteral */; })
.filter(function (d) { return d.moduleSpecifier.getText() === '\'vs/nls\''; })
.filter(function (d) { return !!d.importClause && !!d.importClause.namedBindings; });
var nlsExpressions = importEqualsDeclarations
.map(function (d) { return d.moduleReference.expression; })
.concat(importDeclarations.map(function (d) { return d.moduleSpecifier; }))
.map(function (d) { return ({
start: ts.getLineAndCharacterOfPosition(sourceFile, d.getStart()),
end: ts.getLineAndCharacterOfPosition(sourceFile, d.getEnd())
}); });
// `nls.localize(...)` calls
var nlsLocalizeCallExpressions = importDeclarations
.filter(function (d) { return d.importClause.namedBindings.kind === 214 /* NamespaceImport */; })
.map(function (d) { return d.importClause.namedBindings.name; })
.concat(importEqualsDeclarations.map(function (d) { return d.name; }))
.map(function (n) { return service.getReferencesAtPosition(filename, n.pos + 1); })
.flatten()
.filter(function (r) { return !r.isWriteAccess; })
.map(function (r) { return collect(sourceFile, function (n) { return isCallExpressionWithinTextSpanCollectStep(r.textSpan, n); }); })
.map(function (a) { return lazy(a).last(); })
.filter(function (n) { return !!n; })
.map(function (n) { return n; })
.filter(function (n) { return n.expression.kind === 158 /* PropertyAccessExpression */ && n.expression.name.getText() === 'localize'; });
// `localize` named imports
var allLocalizeImportDeclarations = importDeclarations
.filter(function (d) { return d.importClause.namedBindings.kind === 215 /* NamedImports */; })
.map(function (d) { return d.importClause.namedBindings.elements; })
.flatten();
// `localize` read-only references
var localizeReferences = allLocalizeImportDeclarations
.filter(function (d) { return d.name.getText() === 'localize'; })
.map(function (n) { return service.getReferencesAtPosition(filename, n.pos + 1); })
.flatten()
.filter(function (r) { return !r.isWriteAccess; });
// custom named `localize` read-only references
var namedLocalizeReferences = allLocalizeImportDeclarations
.filter(function (d) { return d.propertyName && d.propertyName.getText() === 'localize'; })
.map(function (n) { return service.getReferencesAtPosition(filename, n.name.pos + 1); })
.flatten()
.filter(function (r) { return !r.isWriteAccess; });
// find the deepest call expressions AST nodes that contain those references
var localizeCallExpressions = localizeReferences
.concat(namedLocalizeReferences)
.map(function (r) { return collect(sourceFile, function (n) { return isCallExpressionWithinTextSpanCollectStep(r.textSpan, n); }); })
.map(function (a) { return lazy(a).last(); })
.filter(function (n) { return !!n; })
.map(function (n) { return n; });
// collect everything
var localizeCalls = nlsLocalizeCallExpressions
.concat(localizeCallExpressions)
.map(function (e) { return e.arguments; })
.filter(function (a) { return a.length > 1; })
.sort(function (a, b) { return a[0].getStart() - b[0].getStart(); })
.map(function (a) { return ({
keySpan: { start: ts.getLineAndCharacterOfPosition(sourceFile, a[0].getStart()), end: ts.getLineAndCharacterOfPosition(sourceFile, a[0].getEnd()) },
key: a[0].getText(),
valueSpan: { start: ts.getLineAndCharacterOfPosition(sourceFile, a[1].getStart()), end: ts.getLineAndCharacterOfPosition(sourceFile, a[1].getEnd()) },
value: a[1].getText()
}); });
return {
localizeCalls: localizeCalls.toArray(),
nlsExpressions: nlsExpressions.toArray()
};
}
nls_1.analyze = analyze;
var TextModel = (function () {
function TextModel(contents) {
var regex = /\r\n|\r|\n/g;
var index = 0;
var match;
this.lines = [];
this.lineEndings = [];
while (match = regex.exec(contents)) {
this.lines.push(contents.substring(index, match.index));
this.lineEndings.push(match[0]);
index = regex.lastIndex;
}
if (contents.length > 0) {
this.lines.push(contents.substring(index, contents.length));
this.lineEndings.push('');
}
}
TextModel.prototype.get = function (index) {
return this.lines[index];
};
TextModel.prototype.set = function (index, line) {
this.lines[index] = line;
};
Object.defineProperty(TextModel.prototype, "lineCount", {
get: function () {
return this.lines.length;
},
enumerable: true,
configurable: true
});
/**
* Applies patch(es) to the model.
* Multiple patches must be ordered.
* Does not support patches spanning multiple lines.
*/
TextModel.prototype.apply = function (patch) {
var startLineNumber = patch.span.start.line;
var endLineNumber = patch.span.end.line;
var startLine = this.lines[startLineNumber] || '';
var endLine = this.lines[endLineNumber] || '';
this.lines[startLineNumber] = [
startLine.substring(0, patch.span.start.character),
patch.content,
endLine.substring(patch.span.end.character)
].join('');
for (var i = startLineNumber + 1; i <= endLineNumber; i++) {
this.lines[i] = '';
}
};
TextModel.prototype.toString = function () {
return lazy(this.lines).zip(this.lineEndings)
.flatten().toArray().join('');
};
return TextModel;
}());
nls_1.TextModel = TextModel;
function patchJavascript(patches, contents, moduleId) {
var model = new nls.TextModel(contents);
// patch the localize calls
lazy(patches).reverse().each(function (p) { return model.apply(p); });
// patch the 'vs/nls' imports
var firstLine = model.get(0);
var patchedFirstLine = firstLine.replace(/(['"])vs\/nls\1/g, "$1vs/nls!" + moduleId + "$1");
model.set(0, patchedFirstLine);
return model.toString();
}
nls_1.patchJavascript = patchJavascript;
function patchSourcemap(patches, rsm, smc) {
var smg = new sm.SourceMapGenerator({
file: rsm.file,
sourceRoot: rsm.sourceRoot
});
patches = patches.reverse();
var currentLine = -1;
var currentLineDiff = 0;
var source = null;
smc.eachMapping(function (m) {
var patch = patches[patches.length - 1];
var original = { line: m.originalLine, column: m.originalColumn };
var generated = { line: m.generatedLine, column: m.generatedColumn };
if (currentLine !== generated.line) {
currentLineDiff = 0;
}
currentLine = generated.line;
generated.column += currentLineDiff;
if (patch && m.generatedLine - 1 === patch.span.end.line && m.generatedColumn === patch.span.end.character) {
var originalLength = patch.span.end.character - patch.span.start.character;
var modifiedLength = patch.content.length;
var lengthDiff = modifiedLength - originalLength;
currentLineDiff += lengthDiff;
generated.column += lengthDiff;
patches.pop();
}
source = rsm.sourceRoot ? path.relative(rsm.sourceRoot, m.source) : m.source;
source = source.replace(/\\/g, '/');
smg.addMapping({ source: source, name: m.name, original: original, generated: generated });
}, null, sm.SourceMapConsumer.GENERATED_ORDER);
if (source) {
smg.setSourceContent(source, smc.sourceContentFor(source));
}
return JSON.parse(smg.toString());
}
nls_1.patchSourcemap = patchSourcemap;
function patch(moduleId, typescript, javascript, sourcemap) {
var _a = analyze(typescript), localizeCalls = _a.localizeCalls, nlsExpressions = _a.nlsExpressions;
if (localizeCalls.length === 0) {
return { javascript: javascript, sourcemap: sourcemap };
}
var nlsKeys = template(localizeCalls.map(function (lc) { return lc.key; }));
var nls = template(localizeCalls.map(function (lc) { return lc.value; }));
var smc = new sm.SourceMapConsumer(sourcemap);
var positionFrom = mappedPositionFrom.bind(null, sourcemap.sources[0]);
var i = 0;
// build patches
var patches = lazy(localizeCalls)
.map(function (lc) { return ([
{ range: lc.keySpan, content: '' + (i++) },
{ range: lc.valueSpan, content: 'null' }
]); })
.flatten()
.map(function (c) {
var start = lcFrom(smc.generatedPositionFor(positionFrom(c.range.start)));
var end = lcFrom(smc.generatedPositionFor(positionFrom(c.range.end)));
return { span: { start: start, end: end }, content: c.content };
})
.toArray();
javascript = patchJavascript(patches, javascript, moduleId);
// since imports are not within the sourcemap information,
// we must do this MacGyver style
if (nlsExpressions.length) {
javascript = javascript.replace(/^define\(.*$/m, function (line) {
return line.replace(/(['"])vs\/nls\1/g, "$1vs/nls!" + moduleId + "$1");
});
}
sourcemap = patchSourcemap(patches, sourcemap, smc);
return { javascript: javascript, sourcemap: sourcemap, nlsKeys: nlsKeys, nls: nls };
}
nls_1.patch = patch;
function patchFiles(javascriptFile, typescript) {
// hack?
var moduleId = javascriptFile.relative
.replace(/\.js$/, '')
.replace(/\\/g, '/');
var _a = patch(moduleId, typescript, javascriptFile.contents.toString(), javascriptFile.sourceMap), javascript = _a.javascript, sourcemap = _a.sourcemap, nlsKeys = _a.nlsKeys, nls = _a.nls;
var result = [fileFrom(javascriptFile, javascript)];
result[0].sourceMap = sourcemap;
if (nlsKeys) {
result.push(fileFrom(javascriptFile, nlsKeys, javascriptFile.path.replace(/\.js$/, '.nls.keys.js')));
}
if (nls) {
result.push(fileFrom(javascriptFile, nls, javascriptFile.path.replace(/\.js$/, '.nls.js')));
}
return result;
}
nls_1.patchFiles = patchFiles;
})(nls || (nls = {}));
module.exports = nls;
+13 -7
View File
@@ -3,18 +3,23 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
var es = require('event-stream');
var _ = require('underscore');
'use strict';
var allErrors = [];
var count = 0;
const es = require('event-stream');
const _ = require('underscore');
const util = require('gulp-util');
const allErrors = [];
let startTime = null;
let count = 0;
function onStart() {
if (count++ > 0) {
return;
}
console.log('*** Starting...');
startTime = new Date().getTime();
util.log(util.colors.green('Starting compilation'));
}
function onEnd() {
@@ -23,8 +28,9 @@ function onEnd() {
}
var errors = _.flatten(allErrors);
errors.map(function (err) { console.error('*** Error:', err); });
console.log('*** Finished with', errors.length, 'errors.');
errors.map(err => util.log(`${ util.colors.red('Error') }: ${ err }`));
util.log(`${ util.colors.green('Finished compilation') } with ${ util.colors.red(errors.length + ' errors') } in ${ util.colors.blue((new Date().getTime() - startTime) + 'ms') }.`);
}
module.exports = function () {
+168 -168
View File
@@ -1,168 +1,168 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var ts = require('typescript');
var Lint = require('tslint/lib/lint');
/**
* Implementation of the no-unexternalized-strings rule.
*/
var Rule = (function (_super) {
__extends(Rule, _super);
function Rule() {
_super.apply(this, arguments);
}
Rule.prototype.apply = function (sourceFile) {
return this.applyWithWalker(new NoUnexternalizedStringsRuleWalker(sourceFile, this.getOptions()));
};
return Rule;
}(Lint.Rules.AbstractRule));
exports.Rule = Rule;
function isStringLiteral(node) {
return node && node.kind === ts.SyntaxKind.StringLiteral;
}
function isObjectLiteral(node) {
return node && node.kind === ts.SyntaxKind.ObjectLiteralExpression;
}
function isPropertyAssignment(node) {
return node && node.kind === ts.SyntaxKind.PropertyAssignment;
}
var NoUnexternalizedStringsRuleWalker = (function (_super) {
__extends(NoUnexternalizedStringsRuleWalker, _super);
function NoUnexternalizedStringsRuleWalker(file, opts) {
var _this = this;
_super.call(this, file, opts);
this.signatures = Object.create(null);
this.ignores = Object.create(null);
this.messageIndex = undefined;
this.keyIndex = undefined;
this.usedKeys = Object.create(null);
var options = this.getOptions();
var first = options && options.length > 0 ? options[0] : null;
if (first) {
if (Array.isArray(first.signatures)) {
first.signatures.forEach(function (signature) { return _this.signatures[signature] = true; });
}
if (Array.isArray(first.ignores)) {
first.ignores.forEach(function (ignore) { return _this.ignores[ignore] = true; });
}
if (typeof first.messageIndex !== 'undefined') {
this.messageIndex = first.messageIndex;
}
if (typeof first.keyIndex !== 'undefined') {
this.keyIndex = first.keyIndex;
}
}
}
NoUnexternalizedStringsRuleWalker.prototype.visitSourceFile = function (node) {
var _this = this;
_super.prototype.visitSourceFile.call(this, node);
Object.keys(this.usedKeys).forEach(function (key) {
var occurences = _this.usedKeys[key];
if (occurences.length > 1) {
occurences.forEach(function (occurence) {
_this.addFailure((_this.createFailure(occurence.key.getStart(), occurence.key.getWidth(), "Duplicate key " + occurence.key.getText() + " with different message value.")));
});
}
});
};
NoUnexternalizedStringsRuleWalker.prototype.visitStringLiteral = function (node) {
this.checkStringLiteral(node);
_super.prototype.visitStringLiteral.call(this, node);
};
NoUnexternalizedStringsRuleWalker.prototype.checkStringLiteral = function (node) {
var text = node.getText();
var doubleQuoted = text.length >= 2 && text[0] === NoUnexternalizedStringsRuleWalker.DOUBLE_QUOTE && text[text.length - 1] === NoUnexternalizedStringsRuleWalker.DOUBLE_QUOTE;
var info = this.findDescribingParent(node);
// Ignore strings in import and export nodes.
if (info && info.ignoreUsage) {
return;
}
var callInfo = info ? info.callInfo : null;
var functionName = callInfo ? callInfo.callExpression.expression.getText() : null;
if (functionName && this.ignores[functionName]) {
return;
}
if (doubleQuoted && (!callInfo || callInfo.argIndex === -1 || !this.signatures[functionName])) {
this.addFailure(this.createFailure(node.getStart(), node.getWidth(), "Unexternalized string found: " + node.getText()));
return;
}
// We have a single quoted string outside a localize function name.
if (!doubleQuoted && !this.signatures[functionName]) {
return;
}
// We have a string that is a direct argument into the localize call.
var keyArg = callInfo.argIndex === this.keyIndex
? callInfo.callExpression.arguments[this.keyIndex]
: null;
if (keyArg) {
if (isStringLiteral(keyArg)) {
this.recordKey(keyArg, this.messageIndex ? callInfo.callExpression.arguments[this.messageIndex] : undefined);
}
else if (isObjectLiteral(keyArg)) {
for (var i = 0; i < keyArg.properties.length; i++) {
var property = keyArg.properties[i];
if (isPropertyAssignment(property)) {
var name_1 = property.name.getText();
if (name_1 === 'key') {
var initializer = property.initializer;
if (isStringLiteral(initializer)) {
this.recordKey(initializer, this.messageIndex ? callInfo.callExpression.arguments[this.messageIndex] : undefined);
}
break;
}
}
}
}
}
var messageArg = callInfo.argIndex === this.messageIndex
? callInfo.callExpression.arguments[this.messageIndex]
: null;
if (messageArg && messageArg !== node) {
this.addFailure(this.createFailure(messageArg.getStart(), messageArg.getWidth(), "Message argument to '" + callInfo.callExpression.expression.getText() + "' must be a string literal."));
return;
}
};
NoUnexternalizedStringsRuleWalker.prototype.recordKey = function (keyNode, messageNode) {
var text = keyNode.getText();
var occurences = this.usedKeys[text];
if (!occurences) {
occurences = [];
this.usedKeys[text] = occurences;
}
if (messageNode) {
if (occurences.some(function (pair) { return pair.message ? pair.message.getText() === messageNode.getText() : false; })) {
return;
}
}
occurences.push({ key: keyNode, message: messageNode });
};
NoUnexternalizedStringsRuleWalker.prototype.findDescribingParent = function (node) {
var parent;
while ((parent = node.parent)) {
var kind = parent.kind;
if (kind === ts.SyntaxKind.CallExpression) {
var callExpression = parent;
return { callInfo: { callExpression: callExpression, argIndex: callExpression.arguments.indexOf(node) } };
}
else if (kind === ts.SyntaxKind.ImportEqualsDeclaration || kind === ts.SyntaxKind.ImportDeclaration || kind === ts.SyntaxKind.ExportDeclaration) {
return { ignoreUsage: true };
}
else if (kind === ts.SyntaxKind.VariableDeclaration || kind === ts.SyntaxKind.FunctionDeclaration || kind === ts.SyntaxKind.PropertyDeclaration
|| kind === ts.SyntaxKind.MethodDeclaration || kind === ts.SyntaxKind.VariableDeclarationList || kind === ts.SyntaxKind.InterfaceDeclaration
|| kind === ts.SyntaxKind.ClassDeclaration || kind === ts.SyntaxKind.EnumDeclaration || kind === ts.SyntaxKind.ModuleDeclaration
|| kind === ts.SyntaxKind.TypeAliasDeclaration || kind === ts.SyntaxKind.SourceFile) {
return null;
}
node = parent;
}
};
NoUnexternalizedStringsRuleWalker.DOUBLE_QUOTE = '"';
return NoUnexternalizedStringsRuleWalker;
}(Lint.RuleWalker));
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var ts = require('typescript');
var Lint = require('tslint/lib/lint');
/**
* Implementation of the no-unexternalized-strings rule.
*/
var Rule = (function (_super) {
__extends(Rule, _super);
function Rule() {
_super.apply(this, arguments);
}
Rule.prototype.apply = function (sourceFile) {
return this.applyWithWalker(new NoUnexternalizedStringsRuleWalker(sourceFile, this.getOptions()));
};
return Rule;
}(Lint.Rules.AbstractRule));
exports.Rule = Rule;
function isStringLiteral(node) {
return node && node.kind === ts.SyntaxKind.StringLiteral;
}
function isObjectLiteral(node) {
return node && node.kind === ts.SyntaxKind.ObjectLiteralExpression;
}
function isPropertyAssignment(node) {
return node && node.kind === ts.SyntaxKind.PropertyAssignment;
}
var NoUnexternalizedStringsRuleWalker = (function (_super) {
__extends(NoUnexternalizedStringsRuleWalker, _super);
function NoUnexternalizedStringsRuleWalker(file, opts) {
var _this = this;
_super.call(this, file, opts);
this.signatures = Object.create(null);
this.ignores = Object.create(null);
this.messageIndex = undefined;
this.keyIndex = undefined;
this.usedKeys = Object.create(null);
var options = this.getOptions();
var first = options && options.length > 0 ? options[0] : null;
if (first) {
if (Array.isArray(first.signatures)) {
first.signatures.forEach(function (signature) { return _this.signatures[signature] = true; });
}
if (Array.isArray(first.ignores)) {
first.ignores.forEach(function (ignore) { return _this.ignores[ignore] = true; });
}
if (typeof first.messageIndex !== 'undefined') {
this.messageIndex = first.messageIndex;
}
if (typeof first.keyIndex !== 'undefined') {
this.keyIndex = first.keyIndex;
}
}
}
NoUnexternalizedStringsRuleWalker.prototype.visitSourceFile = function (node) {
var _this = this;
_super.prototype.visitSourceFile.call(this, node);
Object.keys(this.usedKeys).forEach(function (key) {
var occurences = _this.usedKeys[key];
if (occurences.length > 1) {
occurences.forEach(function (occurence) {
_this.addFailure((_this.createFailure(occurence.key.getStart(), occurence.key.getWidth(), "Duplicate key " + occurence.key.getText() + " with different message value.")));
});
}
});
};
NoUnexternalizedStringsRuleWalker.prototype.visitStringLiteral = function (node) {
this.checkStringLiteral(node);
_super.prototype.visitStringLiteral.call(this, node);
};
NoUnexternalizedStringsRuleWalker.prototype.checkStringLiteral = function (node) {
var text = node.getText();
var doubleQuoted = text.length >= 2 && text[0] === NoUnexternalizedStringsRuleWalker.DOUBLE_QUOTE && text[text.length - 1] === NoUnexternalizedStringsRuleWalker.DOUBLE_QUOTE;
var info = this.findDescribingParent(node);
// Ignore strings in import and export nodes.
if (info && info.ignoreUsage) {
return;
}
var callInfo = info ? info.callInfo : null;
var functionName = callInfo ? callInfo.callExpression.expression.getText() : null;
if (functionName && this.ignores[functionName]) {
return;
}
if (doubleQuoted && (!callInfo || callInfo.argIndex === -1 || !this.signatures[functionName])) {
this.addFailure(this.createFailure(node.getStart(), node.getWidth(), "Unexternalized string found: " + node.getText()));
return;
}
// We have a single quoted string outside a localize function name.
if (!doubleQuoted && !this.signatures[functionName]) {
return;
}
// We have a string that is a direct argument into the localize call.
var keyArg = callInfo.argIndex === this.keyIndex
? callInfo.callExpression.arguments[this.keyIndex]
: null;
if (keyArg) {
if (isStringLiteral(keyArg)) {
this.recordKey(keyArg, this.messageIndex ? callInfo.callExpression.arguments[this.messageIndex] : undefined);
}
else if (isObjectLiteral(keyArg)) {
for (var i = 0; i < keyArg.properties.length; i++) {
var property = keyArg.properties[i];
if (isPropertyAssignment(property)) {
var name_1 = property.name.getText();
if (name_1 === 'key') {
var initializer = property.initializer;
if (isStringLiteral(initializer)) {
this.recordKey(initializer, this.messageIndex ? callInfo.callExpression.arguments[this.messageIndex] : undefined);
}
break;
}
}
}
}
}
var messageArg = callInfo.argIndex === this.messageIndex
? callInfo.callExpression.arguments[this.messageIndex]
: null;
if (messageArg && messageArg !== node) {
this.addFailure(this.createFailure(messageArg.getStart(), messageArg.getWidth(), "Message argument to '" + callInfo.callExpression.expression.getText() + "' must be a string literal."));
return;
}
};
NoUnexternalizedStringsRuleWalker.prototype.recordKey = function (keyNode, messageNode) {
var text = keyNode.getText();
var occurences = this.usedKeys[text];
if (!occurences) {
occurences = [];
this.usedKeys[text] = occurences;
}
if (messageNode) {
if (occurences.some(function (pair) { return pair.message ? pair.message.getText() === messageNode.getText() : false; })) {
return;
}
}
occurences.push({ key: keyNode, message: messageNode });
};
NoUnexternalizedStringsRuleWalker.prototype.findDescribingParent = function (node) {
var parent;
while ((parent = node.parent)) {
var kind = parent.kind;
if (kind === ts.SyntaxKind.CallExpression) {
var callExpression = parent;
return { callInfo: { callExpression: callExpression, argIndex: callExpression.arguments.indexOf(node) } };
}
else if (kind === ts.SyntaxKind.ImportEqualsDeclaration || kind === ts.SyntaxKind.ImportDeclaration || kind === ts.SyntaxKind.ExportDeclaration) {
return { ignoreUsage: true };
}
else if (kind === ts.SyntaxKind.VariableDeclaration || kind === ts.SyntaxKind.FunctionDeclaration || kind === ts.SyntaxKind.PropertyDeclaration
|| kind === ts.SyntaxKind.MethodDeclaration || kind === ts.SyntaxKind.VariableDeclarationList || kind === ts.SyntaxKind.InterfaceDeclaration
|| kind === ts.SyntaxKind.ClassDeclaration || kind === ts.SyntaxKind.EnumDeclaration || kind === ts.SyntaxKind.ModuleDeclaration
|| kind === ts.SyntaxKind.TypeAliasDeclaration || kind === ts.SyntaxKind.SourceFile) {
return null;
}
node = parent;
}
};
NoUnexternalizedStringsRuleWalker.DOUBLE_QUOTE = '"';
return NoUnexternalizedStringsRuleWalker;
}(Lint.RuleWalker));
+13
View File
@@ -274,4 +274,17 @@ exports.rebase = function (count) {
var parts = f.dirname.split(/[\/\\]/);
f.dirname = parts.slice(count).join(path.sep);
});
};
exports.filter = fn => {
const result = es.through(function(data) {
if (fn(data)) {
this.emit('data', data);
} else {
result.restore.push(data);
}
});
result.restore = es.through();
return result;
};
+1 -1
View File
@@ -202,7 +202,7 @@ function format(text) {
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false,
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: true,
PlaceOpenBraceOnNewLineForFunctions: false,
PlaceOpenBraceOnNewLineForControlBlocks: false
PlaceOpenBraceOnNewLineForControlBlocks: false,
};
}
}
+6 -5
View File
@@ -14,11 +14,12 @@
"hxx",
"h++",
"inl",
"ino",
"ipp",
"tcc",
"tpp"
],
"firstLineMatch": "-\\*-\\s*([Mm]ode: )?C\\+\\+;?\\s*-\\*-",
"firstLineMatch": "(?i)-\\*-[^*]*(Mode:\\s*)?C\\+\\+(\\s*;.*?)?\\s*-\\*-",
"name": "C++",
"patterns": [
{
@@ -28,7 +29,7 @@
"include": "source.c"
},
{
"match": "\\b(friend|explicit|virtual)\\b",
"match": "\\b(friend|explicit|virtual|override|final|noexcept)\\b",
"name": "storage.modifier.cpp"
},
{
@@ -65,15 +66,15 @@
"name": "keyword.operator.cast.cpp"
},
{
"match": "\\b(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq)\\b",
"match": "\\b(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\b",
"name": "keyword.operator.cpp"
},
{
"match": "\\b(class|decltype|wchar_t)\\b",
"match": "\\b(class|decltype|wchar_t|char16_t|char32_t)\\b",
"name": "storage.type.cpp"
},
{
"match": "\\b(constexpr|export|mutable|typename)\\b",
"match": "\\b(constexpr|export|mutable|typename|thread_local)\\b",
"name": "storage.modifier.cpp"
},
{
+12 -9
View File
@@ -4,7 +4,7 @@
"c",
"h"
],
"firstLineMatch": "-\\*-\\s*([Mm]ode: )?C;?\\s*-\\*-",
"firstLineMatch": "(?i)-\\*-[^*]*(Mode:\\s*)?C(\\s*;.*?)?\\s*-\\*-",
"name": "C",
"patterns": [
{
@@ -58,7 +58,7 @@
"include": "#strings"
},
{
"begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+ # define\n((?<id>[a-zA-Z_][a-zA-Z0-9_]*)) # macro name\n(?:\n (\\()\n (\n \\s* \\g<id> \\s* # first argument\n ((,) \\s* \\g<id> \\s*)* # additional arguments\n (?:\\.\\.\\.)? # varargs ellipsis?\n )\n (\\))\n)?",
"begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+ # define\n((?<id>[a-zA-Z_$][\\w$]*)) # macro name\n(?:\n (\\()\n (\n \\s* \\g<id> \\s* # first argument\n ((,) \\s* \\g<id> \\s*)* # additional arguments\n (?:\\.\\.\\.)? # varargs ellipsis?\n )\n (\\))\n)?",
"beginCaptures": {
"1": {
"name": "keyword.control.directive.define.c"
@@ -258,7 +258,7 @@
"include": "#parens"
},
{
"match": "\\b(const|override|final|noexcept)\\b",
"match": "\\b(const)\\b",
"name": "storage.modifier.c"
},
{
@@ -273,14 +273,17 @@
"repository": {
"access": {
"captures": {
"1": {
"name": "punctuation.separator.variable-access.c"
},
"2": {
"name": "variable.other.dot-access.c"
"name": "punctuation.separator.dot-access.c"
},
"3": {
"name": "punctuation.separator.pointer-access.c"
},
"4": {
"name": "variable.other.member.c"
}
},
"match": "(\\.)([a-zA-Z_][a-zA-Z_0-9]*)\\b(?!\\s*\\()"
"match": "((\\.)|(->))([a-zA-Z_][a-zA-Z_0-9]*)\\b(?!\\s*\\()"
},
"block": {
"patterns": [
@@ -470,7 +473,7 @@
"numbers": {
"patterns": [
{
"match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b",
"match": "\\b((0(x|X)[0-9a-fA-F]*)|(0(b|B)[01]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b",
"name": "constant.numeric.c"
}
]
@@ -749,7 +749,7 @@
},
{
"c": ".",
"t": "block.c.function.meta.punctuation.separator.variable-access",
"t": "block.c.dot-access.function.meta.punctuation.separator",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -760,7 +760,7 @@
},
{
"c": "x",
"t": "block.c.dot-access.function.meta.other.variable",
"t": "block.c.function.member.meta.other.variable",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.variable rgb(156, 220, 254)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.variable rgb(0, 16, 128)",
+55 -40
View File
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import {window, workspace, DecorationOptions, DecorationRenderOptions, Disposable, Range} from 'vscode';
import {window, workspace, DecorationOptions, DecorationRenderOptions, Disposable, Range, TextDocument, TextEditor} from 'vscode';
let decorationType: DecorationRenderOptions = {
before: {
@@ -28,56 +28,71 @@ export function activateColorDecorations(decoratorProvider: (uri: string) => The
let colorsDecorationType = window.createTextEditorDecorationType(decorationType);
disposables.push(colorsDecorationType);
let activeEditor = window.activeTextEditor;
if (activeEditor) {
triggerUpdateDecorations();
}
let pendingUpdateRequests : { [key:string]:number; } = {};
// we care about all visible editors
window.visibleTextEditors.forEach(editor => {
if (editor.document) {
triggerUpdateDecorations(editor.document);
}
});
// to get visible one has to become active
window.onDidChangeActiveTextEditor(editor => {
activeEditor = editor;
if (editor && supportedLanguages[activeEditor.document.languageId]) {
triggerUpdateDecorations();
if (editor) {
triggerUpdateDecorations(editor.document);
}
}, null, disposables);
workspace.onDidChangeTextDocument(event => {
if (activeEditor && event.document === activeEditor.document && supportedLanguages[activeEditor.document.languageId]) {
triggerUpdateDecorations();
}
}, null, disposables);
workspace.onDidChangeTextDocument(event => triggerUpdateDecorations(event.document), null, disposables);
workspace.onDidOpenTextDocument(triggerUpdateDecorations, null, disposables);
workspace.onDidCloseTextDocument(triggerUpdateDecorations, null, disposables);
let timeout = null;
function triggerUpdateDecorations() {
if (timeout) {
function triggerUpdateDecorations(document: TextDocument) {
let triggerUpdate = supportedLanguages[document.languageId];
let uri = document.uri.toString();
let timeout = pendingUpdateRequests[uri];
if (typeof timeout !== 'undefined') {
clearTimeout(timeout);
triggerUpdate = true; // force update, even if languageId is not supported (anymore)
}
if (triggerUpdate) {
pendingUpdateRequests[uri] = setTimeout(() => {
updateDecorations(uri);
delete pendingUpdateRequests[uri];
}, 500);
}
timeout = setTimeout(updateDecorations, 500);
}
function updateDecorations() {
if (!activeEditor) {
return;
}
let document = activeEditor.document;
if (!supportedLanguages[document.languageId]) {
return;
}
let uri = activeEditor.document.uri.toString();
decoratorProvider(uri).then(ranges => {
let decorations = ranges.map(range => {
let color = document.getText(range);
return <DecorationOptions>{
range: range,
renderOptions: {
before: {
backgroundColor: color
}
}
};
});
activeEditor.setDecorations(colorsDecorationType, decorations);
function updateDecorations(uri: string) {
window.visibleTextEditors.forEach(editor => {
let document = editor.document;
if (document && document.uri.toString() === uri) {
updateDecorationForEditor(editor);
}
});
}
function updateDecorationForEditor(editor: TextEditor) {
let document = editor.document;
if (supportedLanguages[document.languageId]) {
decoratorProvider(document.uri.toString()).then(ranges => {
let decorations = ranges.map(range => {
let color = document.getText(range);
return <DecorationOptions>{
range: range,
renderOptions: {
before: {
backgroundColor: color
}
}
};
});
editor.setDecorations(colorsDecorationType, decorations);
});
} else {
editor.setDecorations(colorsDecorationType, []);
}
}
return Disposable.from(...disposables);
}
+3 -3
View File
@@ -54,7 +54,7 @@ export function activate(context: ExtensionContext) {
context.subscriptions.push(disposable);
languages.setLanguageConfiguration('css', {
wordPattern: /(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,
wordPattern: /(#?-?\d*\.\d\w*%?)|(::?[\w-]*(?=[^,{;]*[,{]))|(([@#.!])?[\w-?]+%?|[@#!.])/g,
comments: {
blockComment: ['/*', '*/']
},
@@ -71,7 +71,7 @@ export function activate(context: ExtensionContext) {
});
languages.setLanguageConfiguration('less', {
wordPattern: /(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-?]+%?)|[@#!.]/g,
wordPattern: /(#?-?\d*\.\d\w*%?)|(::?[\w-]+(?=[^,{;]*[,{]))|(([@#.!])?[\w-?]+%?|[@#!.])/g,
comments: {
blockComment: ['/*', '*/'],
lineComment: '//'
@@ -90,7 +90,7 @@ export function activate(context: ExtensionContext) {
});
languages.setLanguageConfiguration('scss', {
wordPattern: /(#?-?\d*\.\d\w*%?)|([@#$!.:]?[\w-?]+%?)|[@#!.]/g,
wordPattern: /(#?-?\d*\.\d\w*%?)|(::?[\w-]*(?=[^,{;]*[,{]))|(([@$#.!])?[\w-?]+%?|[@#!$.])/g,
comments: {
blockComment: ['/*', '*/'],
lineComment: '//'
+11 -13
View File
@@ -169,22 +169,20 @@ function updateConfiguration() {
}
}
if (jsonConfigurationSettings) {
jsonConfigurationSettings.forEach((schema) => {
if (schema.fileMatch) {
let uri = schema.url;
if (!uri && schema.schema) {
uri = schema.schema.id;
if (!uri) {
uri = 'vscode://schemas/custom/' + encodeURIComponent(schema.fileMatch.join('&'));
}
}
if (Strings.startsWith(uri, '.') && workspaceRoot) {
jsonConfigurationSettings.forEach(schema => {
let uri = schema.url;
if (!uri && schema.schema) {
uri = schema.schema.id;
}
if (!uri && schema.fileMatch) {
uri = 'vscode://schemas/custom/' + encodeURIComponent(schema.fileMatch.join('&'));
}
if (uri) {
if (uri[0] === '.' && workspaceRoot) {
// workspace relative path
uri = URI.file(path.normalize(path.join(workspaceRoot.fsPath, uri))).toString();
}
if (uri) {
languageSettings.schemas.push({ uri, fileMatch: schema.fileMatch, schema: schema.schema });
}
languageSettings.schemas.push({ uri, fileMatch: schema.fileMatch, schema: schema.schema });
}
});
}
+2 -1
View File
@@ -96,7 +96,8 @@
{
"command": "markdown.showPreview",
"key": "shift+ctrl+v",
"mac": "shift+cmd+v"
"mac": "shift+cmd+v",
"when": "!terminalFocus"
},
{
"command": "markdown.showPreviewToSide",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"account": "monacobuild",
"container": "debuggers",
"zip": "957a1eb/node-debug.zip",
"zip": "e25530c/node-debug.zip",
"output": ""
}
@@ -2245,7 +2245,7 @@
},
{
"c": ".",
"t": "block.c.function-with-body.implementation.meta.objc.punctuation.scope.separator.variable-access",
"t": "block.c.dot-access.function-with-body.implementation.meta.objc.punctuation.scope.separator",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
@@ -2256,7 +2256,7 @@
},
{
"c": "gestureRecognizers",
"t": "block.c.dot-access.function-with-body.implementation.meta.objc.other.scope.variable",
"t": "block.c.function-with-body.implementation.member.meta.objc.other.scope.variable",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.variable rgb(156, 220, 254)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.variable rgb(0, 16, 128)",
@@ -275,6 +275,7 @@ class LanguageProvider {
public syntaxDiagnosticsReceived(file: string, diagnostics: Diagnostic[]): void {
this.syntaxDiagnostics[file] = diagnostics;
this.currentDiagnostics.set(Uri.file(file), diagnostics);
}
public semanticDiagnosticsReceived(file: string, diagnostics: Diagnostic[]): void {
+1 -1
View File
@@ -48,7 +48,7 @@ function generatePatchedEnv(env:any, stdInPipeName:string, stdOutPipeName:string
newEnv['STDIN_PIPE_NAME'] = stdInPipeName;
newEnv['STDOUT_PIPE_NAME'] = stdOutPipeName;
newEnv['STDERR_PIPE_NAME'] = stdErrPipeName;
newEnv['ELECTRON_RUN_AS_NODE'] = '1';
newEnv['ATOM_SHELL_INTERNAL_RUN_AS_NODE'] = '1';
return newEnv;
}
@@ -31,7 +31,7 @@ var stdErrPipeName = process.env['STDERR_PIPE_NAME'];
log('STDIN_PIPE_NAME: ' + stdInPipeName);
log('STDOUT_PIPE_NAME: ' + stdOutPipeName);
log('STDERR_PIPE_NAME: ' + stdErrPipeName);
log('ELECTRON_RUN_AS_NODE: ' + process.env['ELECTRON_RUN_AS_NODE']);
log('ATOM_SHELL_INTERNAL_RUN_AS_NODE: ' + process.env['ATOM_SHELL_INTERNAL_RUN_AS_NODE']);
// stdout redirection to named pipe
(function() {
@@ -147,7 +147,7 @@ log('ELECTRON_RUN_AS_NODE: ' + process.env['ELECTRON_RUN_AS_NODE']);
delete process.env['STDIN_PIPE_NAME'];
delete process.env['STDOUT_PIPE_NAME'];
delete process.env['STDERR_PIPE_NAME'];
delete process.env['ELECTRON_RUN_AS_NODE'];
delete process.env['ATOM_SHELL_INTERNAL_RUN_AS_NODE'];
require(program);
@@ -55,13 +55,15 @@ export function create(client: ITypescriptServiceClient, isOpen:(path:string)=>P
}));
function onEditor(editor: vscode.TextEditor): void {
if (!editor || !vscode.languages.match(selector, editor.document)) {
if (!editor
|| !vscode.languages.match(selector, editor.document)
|| !client.asAbsolutePath(editor.document.uri)) {
item.hide();
return;
}
const file = client.asAbsolutePath(editor.document.uri);
isOpen(file).then(value => {
if (!value) {
return;
@@ -1061,48 +1061,6 @@
</dict>
</array>
</dict>
<key>known-type-parameters</key>
<dict>
<key>begin</key>
<string>(&lt;)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.brace.angle.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=$)|(&gt;)</string>
<key>endCaptures</key>
<dict>
<key>2</key>
<dict>
<key>name</key>
<string>meta.brace.angle.tsx</string>
</dict>
</dict>
<key>name</key>
<string>meta.known.type.parameters.ts</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\b(extends)\b</string>
<key>name</key>
<string>keyword.other.ts</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#type</string>
</dict>
</array>
</dict>
<key>literal</key>
<dict>
<key>name</key>
@@ -1431,7 +1389,7 @@
</dict>
<dict>
<key>include</key>
<string>#know-type-parameters</string>
<string>#type-parameters</string>
</dict>
<dict>
<key>include</key>
@@ -1979,7 +1937,7 @@
</dict>
<dict>
<key>include</key>
<string>#known-type-parameters</string>
<string>#type-parameters</string>
</dict>
<dict>
<key>include</key>
@@ -2038,7 +1996,7 @@
<key>type-declaration</key>
<dict>
<key>begin</key>
<string>\b(type)\b\s+([a-zA-Z_$][\w$]*)</string>
<string>\b(type)\b\s+([a-zA-Z_$][\w$]*)\s*</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
@@ -2060,7 +2018,7 @@
<array>
<dict>
<key>include</key>
<string>#known-type-parameters</string>
<string>#type-parameters</string>
</dict>
<dict>
<key>include</key>
@@ -2171,7 +2129,7 @@
<key>type-parameters</key>
<dict>
<key>begin</key>
<string>([a-zA-Z_$][\w$]*)?\s*(&lt;)(?=[^&lt;]*(&lt;[^&lt;&gt;]*&gt;)*&gt;\s*[(])</string>
<string>([a-zA-Z_$][\w$]*)?(&lt;)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
@@ -0,0 +1,6 @@
let a = Array<number>(); // Highlight ok here
interface egGenericsInArray {
a: Array<number>;
}
let s = "nothing should fail here...";
@@ -0,0 +1,343 @@
[
{
"c": "let",
"t": "expr.meta.storage.tsx.type.var",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.storage.type rgb(86, 156, 214)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.storage.type rgb(0, 0, 255)",
"dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.storage.type rgb(86, 156, 214)",
"light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.storage.type rgb(0, 0, 255)",
"hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.storage.type rgb(86, 156, 214)"
}
},
{
"c": " ",
"t": "expr.meta.tsx.var",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": "a",
"t": "expr.meta.tsx.var.var-single-variable.variable",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.variable rgb(156, 220, 254)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.variable rgb(0, 16, 128)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": " = ",
"t": "expr.meta.tsx.var.var-single-variable",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": "Array",
"t": "entity.expr.meta.name.parameters.tsx.type.var.var-single-variable",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.entity.name.type rgb(78, 201, 176)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.entity.name.type rgb(38, 127, 153)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": "<",
"t": "angle.brace.expr.meta.parameters.tsx.type.var.var-single-variable",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": "number",
"t": "expr.meta.parameters.primitive.support.tsx.type.var.var-single-variable",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.support.type rgb(78, 201, 176)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.support.type rgb(38, 127, 153)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": ">",
"t": "expr.meta.parameters.tsx.type.var.var-single-variable",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": "()",
"t": "brace.expr.meta.paren.tsx.var.var-single-variable",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": "; ",
"t": "",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": "// Highlight ok here",
"t": "comment.line.tsx",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.comment rgb(96, 139, 78)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.comment rgb(0, 128, 0)",
"dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.comment rgb(96, 139, 78)",
"light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.comment rgb(0, 128, 0)",
"hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.comment rgb(124, 166, 104)"
}
},
{
"c": "interface",
"t": "declaration.meta.object.storage.tsx.type",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.storage.type rgb(86, 156, 214)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.storage.type rgb(0, 0, 255)",
"dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.storage.type rgb(86, 156, 214)",
"light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.storage.type rgb(0, 0, 255)",
"hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.storage.type rgb(86, 156, 214)"
}
},
{
"c": " ",
"t": "declaration.meta.object.tsx",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": "egGenericsInArray",
"t": "class.declaration.entity.meta.name.object.tsx",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.entity.name.class rgb(78, 201, 176)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.entity.name.class rgb(38, 127, 153)",
"dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.entity.name.class rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": " ",
"t": "declaration.meta.object.tsx",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": "{",
"t": "body.brace.curly.declaration.meta.object.tsx",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": " ",
"t": "body.declaration.field.meta.object.tsx",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": "a",
"t": "body.declaration.field.meta.object.tsx.variable",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.variable rgb(156, 220, 254)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.variable rgb(0, 16, 128)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": ": ",
"t": "body.declaration.field.meta.object.tsx",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": "Array",
"t": "body.declaration.entity.field.meta.name.object.parameters.tsx.type",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.entity.name.type rgb(78, 201, 176)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.entity.name.type rgb(38, 127, 153)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": "<",
"t": "angle.body.brace.declaration.field.meta.object.parameters.tsx.type",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": "number",
"t": "body.declaration.field.meta.object.parameters.primitive.support.tsx.type",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.support.type rgb(78, 201, 176)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.support.type rgb(38, 127, 153)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": ">",
"t": "body.declaration.field.meta.object.parameters.tsx.type",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": ";",
"t": "body.declaration.meta.object.tsx",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": "}",
"t": "body.brace.curly.declaration.meta.object.tsx",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": "let",
"t": "expr.meta.storage.tsx.type.var",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.storage.type rgb(86, 156, 214)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.storage.type rgb(0, 0, 255)",
"dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.storage.type rgb(86, 156, 214)",
"light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.storage.type rgb(0, 0, 255)",
"hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.storage.type rgb(86, 156, 214)"
}
},
{
"c": " ",
"t": "expr.meta.tsx.var",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": "s",
"t": "expr.meta.tsx.var.var-single-variable.variable",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.variable rgb(156, 220, 254)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.variable rgb(0, 16, 128)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": " = ",
"t": "expr.meta.tsx.var.var-single-variable",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
},
{
"c": "\"nothing should fail here...\"",
"t": "double.expr.meta.string.tsx.var.var-single-variable",
"r": {
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.string rgb(206, 145, 120)",
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.string rgb(163, 21, 21)",
"dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.string rgb(206, 145, 120)",
"light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.string rgb(163, 21, 21)",
"hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.string rgb(206, 145, 120)"
}
},
{
"c": ";",
"t": "",
"r": {
"dark_plus": ".vs-dark .token rgb(212, 212, 212)",
"light_plus": ".vs .token rgb(0, 0, 0)",
"dark_vs": ".vs-dark .token rgb(212, 212, 212)",
"light_vs": ".vs .token rgb(0, 0, 0)",
"hc_black": ".hc-black .token rgb(255, 255, 255)"
}
}
]
+1
View File
@@ -1,6 +1,7 @@
// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file
// ${relativeFile}: the current opened file relative to cwd
// ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension
+61 -81
View File
@@ -3,72 +3,53 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
// Increase max listeners for event emitters
require('events').EventEmitter.defaultMaxListeners = 100;
var gulp = require('gulp');
var json = require('gulp-json-editor');
var buffer = require('gulp-buffer');
var tsb = require('gulp-tsb');
var filter = require('gulp-filter');
var mocha = require('gulp-mocha');
var es = require('event-stream');
var watch = require('./build/lib/watch');
var nls = require('./build/lib/nls');
var util = require('./build/lib/util');
var reporter = require('./build/lib/reporter')();
var remote = require('gulp-remote-src');
var zip = require('gulp-vinyl-zip');
var path = require('path');
var bom = require('gulp-bom');
var sourcemaps = require('gulp-sourcemaps');
var _ = require('underscore');
var assign = require('object-assign');
var quiet = !!process.env['VSCODE_BUILD_QUIET'];
var monacodts = require('./build/monaco/api');
var fs = require('fs');
const gulp = require('gulp');
const json = require('gulp-json-editor');
const buffer = require('gulp-buffer');
const tsb = require('gulp-tsb');
const filter = require('gulp-filter');
const mocha = require('gulp-mocha');
const es = require('event-stream');
const watch = require('./build/lib/watch');
const nls = require('./build/lib/nls');
const util = require('./build/lib/util');
const reporter = require('./build/lib/reporter')();
const remote = require('gulp-remote-src');
const zip = require('gulp-vinyl-zip');
const path = require('path');
const bom = require('gulp-bom');
const sourcemaps = require('gulp-sourcemaps');
const _ = require('underscore');
const assign = require('object-assign');
const monacodts = require('./build/monaco/api');
const fs = require('fs');
var rootDir = path.join(__dirname, 'src');
var tsOptions = {
target: 'ES5',
declaration: true,
module: 'amd',
verbose: !quiet,
preserveConstEnums: true,
experimentalDecorators: true,
sourceMap: true,
rootDir: rootDir,
sourceRoot: util.toFileUri(rootDir)
};
function createFastFilter(filterFn) {
var result = es.through(function(data) {
if (filterFn(data)) {
this.emit('data', data);
} else {
result.restore.push(data);
}
});
result.restore = es.through();
return result;
}
const rootDir = path.join(__dirname, 'src');
const options = require('./src/tsconfig.json').compilerOptions;
options.verbose = false;
options.sourceMap = true;
options.rootDir = rootDir;
options.sourceRoot = util.toFileUri(rootDir);
function createCompile(build, emitError) {
var opts = _.clone(tsOptions);
const opts = _.clone(options);
opts.inlineSources = !!build;
opts.noFilesystemLookup = true;
var ts = tsb.create(opts, null, null, quiet ? null : function (err) {
reporter(err.toString());
});
const ts = tsb.create(opts, null, null, err => reporter(err.toString()));
return function (token) {
var utf8Filter = createFastFilter(function(data) { return /(\/|\\)test(\/|\\).*utf8/.test(data.path); });
var tsFilter = createFastFilter(function(data) { return /\.ts$/.test(data.path); });
var noDeclarationsFilter = createFastFilter(function(data) { return !(/\.d\.ts$/.test(data.path)); });
const utf8Filter = util.filter(data => /(\/|\\)test(\/|\\).*utf8/.test(data.path));
const tsFilter = util.filter(data => /\.ts$/.test(data.path));
const noDeclarationsFilter = util.filter(data => !(/\.d\.ts$/.test(data.path)));
var input = es.through();
var output = input
const input = es.through();
const output = input
.pipe(utf8Filter)
.pipe(bom())
.pipe(utf8Filter.restore)
@@ -81,20 +62,20 @@ function createCompile(build, emitError) {
.pipe(sourcemaps.write('.', {
addComment: false,
includeContent: !!build,
sourceRoot: tsOptions.sourceRoot
sourceRoot: options.sourceRoot
}))
.pipe(tsFilter.restore)
.pipe(quiet ? es.through() : reporter.end(emitError));
.pipe(reporter.end(emitError));
return es.duplex(input, output);
};
}
function compileTask(out, build) {
var compile = createCompile(build, true);
const compile = createCompile(build, true);
return function () {
var src = es.merge(
const src = es.merge(
gulp.src('src/**', { base: 'src' }),
gulp.src('node_modules/typescript/lib/lib.d.ts')
);
@@ -107,14 +88,14 @@ function compileTask(out, build) {
}
function watchTask(out, build) {
var compile = createCompile(build);
const compile = createCompile(build);
return function () {
var src = es.merge(
const src = es.merge(
gulp.src('src/**', { base: 'src' }),
gulp.src('node_modules/typescript/lib/lib.d.ts')
);
var watchSrc = watch('src/**', { base: 'src' });
const watchSrc = watch('src/**', { base: 'src' });
return watchSrc
.pipe(util.incremental(compile, src, true))
@@ -124,10 +105,9 @@ function watchTask(out, build) {
}
function monacodtsTask(out, isWatch) {
let timer = -1;
var timer = -1;
var runSoon = function(howSoon) {
const runSoon = function(howSoon) {
if (timer !== -1) {
clearTimeout(timer);
timer = -1;
@@ -138,7 +118,7 @@ function monacodtsTask(out, isWatch) {
}, howSoon);
};
var runNow = function() {
const runNow = function() {
if (timer !== -1) {
clearTimeout(timer);
timer = -1;
@@ -147,7 +127,7 @@ function monacodtsTask(out, isWatch) {
// monacodts.complainErrors();
// return;
// }
var result = monacodts.run(out);
const result = monacodts.run(out);
if (!result.isTheSame) {
if (isWatch) {
fs.writeFileSync(result.filePath, result.content);
@@ -157,11 +137,11 @@ function monacodtsTask(out, isWatch) {
}
};
var resultStream;
let resultStream;
if (isWatch) {
var filesToWatchMap = {};
const filesToWatchMap = {};
monacodts.getFilesToWatch(out).forEach(function(filePath) {
filesToWatchMap[path.normalize(filePath)] = true;
});
@@ -171,7 +151,7 @@ function monacodtsTask(out, isWatch) {
}));
resultStream = es.through(function(data) {
var filePath = path.normalize(data.path);
const filePath = path.normalize(data.path);
if (filesToWatchMap[filePath]) {
runSoon(5000);
}
@@ -180,7 +160,7 @@ function monacodtsTask(out, isWatch) {
} else {
resultStream = es.through(null, function(end) {
resultStream = es.through(null, function() {
runNow();
this.emit('end');
});
@@ -220,24 +200,24 @@ gulp.task('test', function () {
});
gulp.task('mixin', function () {
var repo = process.env['VSCODE_MIXIN_REPO'];
const repo = process.env['VSCODE_MIXIN_REPO'];
if (!repo) {
console.log('Missing VSCODE_MIXIN_REPO, skipping mixin');
return;
}
var quality = process.env['VSCODE_QUALITY'];
const quality = process.env['VSCODE_QUALITY'];
if (!quality) {
console.log('Missing VSCODE_QUALITY, skipping mixin');
return;
}
var url = 'https://github.com/' + repo + '/archive/master.zip';
var opts = { base: '' };
var username = process.env['VSCODE_MIXIN_USERNAME'];
var password = process.env['VSCODE_MIXIN_PASSWORD'];
const url = 'https://github.com/' + repo + '/archive/master.zip';
const opts = { base: '' };
const username = process.env['VSCODE_MIXIN_USERNAME'];
const password = process.env['VSCODE_MIXIN_PASSWORD'];
if (username || password) {
opts.auth = { user: username || '', pass: password || '' };
@@ -245,22 +225,22 @@ gulp.task('mixin', function () {
console.log('Mixing in sources from \'' + url + '\':');
var all = remote(url, opts)
let all = remote(url, opts)
.pipe(zip.src())
.pipe(filter(function (f) { return !f.isDirectory(); }))
.pipe(util.rebase(1));
if (quality) {
var build = all.pipe(filter('build/**'));
var productJsonFilter = filter('product.json', { restore: true });
const build = all.pipe(filter('build/**'));
const productJsonFilter = filter('product.json', { restore: true });
var mixin = all
const mixin = all
.pipe(filter('quality/' + quality + '/**'))
.pipe(util.rebase(2))
.pipe(productJsonFilter)
.pipe(buffer())
.pipe(json(function (patch) {
var original = require('./product.json');
const original = require('./product.json');
return assign(original, patch);
}))
.pipe(productJsonFilter.restore);
@@ -7,7 +7,7 @@
"channelName": "TypeScript",
"noServerFound": "路径 {0} 未指向有效的 tsserver 安装。将禁用 TypeScript 语言功能。",
"serverCouldNotBeStarted": "无法启动 TypeScript 语言服务器。错误消息为: {0}",
"serverDied": "在过去 5 分钟内,TypeScript 语言服务意外中止 5 次。请考虑启用 bug 报告。",
"serverDiedAfterStart": "TypeScript 语言服务在其启动后已中止 5 次。服务不会重启。请启用 bug 报告。",
"serverDied": "在过去 5 分钟内,TypeScript 语言服务意外中止 5 次。请考虑启用 bug 报告。",
"serverDiedAfterStart": "TypeScript 语言服务在其启动后已中止 5 次。不会重启该服务。请启用 bug 报告。",
"versionNumber.custom": "自定义"
}
@@ -18,6 +18,7 @@
"javascript.validate.enable": "启用/禁用 JavaScript 验证",
"typescript.reloadProjects.title": "重新加载 TypeScript 项目",
"typescript.tsdk.desc": "指定包含要使用的 tsserver 和 lib*.d.ts 文件的文件夹路径。",
"typescript.tsserver.experimentalAutoBuild": "启用实验性自动生成。要求安装 1.9 dev 或 2.x tsserver 版本并在更改后重启 VS Code。",
"typescript.tsserver.trace": "启用对发送到 TS 服务器的消息进行跟踪",
"typescript.useCodeSnippetsOnMethodSuggest.dec": "完成函数的参数签名。",
"typescript.validate.enable": "启用/禁用 TypeScript 验证"
@@ -35,6 +35,9 @@
"miExit": "退出(&&X)",
"miFind": "查找(&&F)",
"miFindInFiles": "在文件中查找(&&I)",
"miFocusFirstGroup": "左侧组(&&L)",
"miFocusSecondGroup": "侧面组(&&S)",
"miFocusThirdGroup": "右侧组(&&R)",
"miForward": "前进(&&F)",
"miGotoDefinition": "转到定义(&&D)...",
"miGotoFile": "转到文件(&&F)...",
@@ -43,11 +46,13 @@
"miInstallingUpdate": "正在安装更新...",
"miLastCheckedAt": "上次检查时间 {0}",
"miLicense": "查看许可证(&&V)",
"miMarker": "错误和警告(&&E)...",
"miMarker": "问题(&&P)",
"miMoveSidebar": "移动侧边栏(&&M)",
"miNavigateHistory": "导航历史记录(&&N)",
"miNewFile": "新建文件(&&N)",
"miNewWindow": "新建窗口(&&N)",
"miNextEditor": "下一个编辑器(&&N)",
"miNextEditorInGroup": "组中下一个使用过的编辑器(&&N)",
"miNextGroup": "下一个组(&&N)",
"miOpen": "打开(&&O)...",
"miOpenFile": "打开文件(&&O)...",
"miOpenFolder": "打开文件夹(&&F)...",
@@ -58,11 +63,14 @@
"miOpenWorkspaceSettings": "工作区设置(&&W)",
"miPaste": "粘贴(&&P)",
"miPreferences": "首选项(&&P)",
"miPreviousEditor": "上一个编辑器(&&P)",
"miPreviousEditorInGroup": "组中上一个使用过的编辑器(&&P)",
"miPreviousGroup": "上一个组(&&P)",
"miPrivacyStatement": "隐私声明(&&P)",
"miQuit": "退出 {0}",
"miRedo": "恢复(&&R)",
"miReleaseNotes": "发行说明(&&R)",
"miReopenClosedFile": "&&重新打开已关闭的文件",
"miReopenClosedEditor": "重新打开已关闭的编辑器(&&R)",
"miReplace": "替换(&&R)",
"miReportIssues": "报告问题(&&I)",
"miRestartToUpdate": "重启以更新...",
@@ -73,14 +81,18 @@
"miSelectAll": "全选(&&S)",
"miSelectTheme": "颜色主题(&&C)",
"miSplitEditor": "拆分编辑器(&&E)",
"miToggleDebugConsole": "切换调试控制台(&&B)",
"miSwitchEditor": "切换编辑器(&&E)",
"miSwitchGroup": "切换组(&&G)",
"miToggleDebugConsole": "调试控制台(&&B)",
"miToggleDevTools": "切换开发人员工具(&&T)",
"miToggleFullScreen": "切换全屏(&&F)",
"miToggleIntegratedTerminal": "集成终端(&&I)",
"miToggleMenuBar": "切换菜单栏(&&B)",
"miToggleOutput": "切换输出(&&O)",
"miToggleOutput": "输出(&&O)",
"miTogglePanel": "切换面板(&&P)",
"miToggleRenderWhitespace": "切换呈现空格(&&R)",
"miToggleSidebar": "切换侧边栏(&&T)",
"miToggleStatusbar": "切换状态栏(&&T)",
"miToggleWordWrap": "切换自动换行(&&W)",
"miTwitter": "在 Twitter 上加入我们(&&J)",
"miUndo": "撤消(&&U)",
@@ -91,5 +103,6 @@
"miViewSearch": "搜索(&&S)",
"miZoomIn": "放大(&&Z)",
"miZoomOut": "缩小(&&U)",
"miZoomReset": "重置缩放(&&R)",
"okButton": "确定"
}
@@ -9,7 +9,6 @@
"cursorBlinking": "控制光标闪烁动画,接受的值为'blink'、'visible' 和 'hidden'",
"cursorStyle": "控制光标样式,接受的值为 'block' 和 'line'",
"detectIndentation": "当打开文件时,将基于文件内容检测 \"editor.tabSize\" 和 \"editor.insertSpaces\"。",
"dismissPeekOnEsc": "按 ESC 时将关闭速览编辑器",
"editorConfigurationTitle": "编辑器配置",
"folding": "控制编辑器是否启用代码折叠功能",
"fontFamily": "控制字体系列。",
@@ -25,6 +24,7 @@
"lineNumbers": "控制行号的可见性",
"mouseWheelScrollSensitivity": "要对鼠标滚轮滚动事件的 \"deltaX\" 和 \"deltaY\" 使用的乘数 ",
"overviewRulerLanes": "控制可在概述标尺同一位置显示的效果数量",
"parameterHints": "启用参数提示",
"quickSuggestions": "控制键入时是否应显示快速建议",
"quickSuggestionsDelay": "控制延迟多少毫秒后将显示快速建议",
"referenceInfos": "控制编辑器是否显示支持它的模式的参考信息",
@@ -35,6 +35,7 @@
"selectionClipboard": "控制是否支持 Linux 主剪贴板。",
"selectionHighlight": "控制编辑器是否应突出显示选项的近似匹配",
"sideBySide": "控制 Diff 编辑器以并排或内联形式显示差异",
"stablePeek": "即使在双击编辑器内容或按 Esc 键时,也要保持速览编辑器的打开状态。",
"suggestOnTriggerCharacters": "控制键入触发器字符时是否应自动显示建议",
"tabSize": "一个制表符等于的空格数。",
"tabSize.errorMessage": "应为 \"number\"。注意,值\"auto\"已由 \"editor.detectIndentation\" 设置替换。",
@@ -11,6 +11,8 @@
"foldLevel3Action.label": "折叠级别 3",
"foldLevel4Action.label": "折叠级别 4",
"foldLevel5Action.label": "折叠级别 5",
"foldRecursivelyAction.label": "以递归方式折叠",
"unFoldRecursivelyAction.label": "以递归方式展开",
"unfoldAction.label": "展开",
"unfoldAllAction.label": "全部展开"
}
@@ -7,5 +7,7 @@
"markerAction.next.label": "转到下一个错误或警告",
"markerAction.previous.label": "转到上一个错误或警告",
"quickfix.multiple.label": "建议的修正:",
"quickfix.single.label": "建议的修正:"
"quickfix.single.label": "建议的修正:",
"title.w_source": "({0}/{1}) [{2}]",
"title.wo_source": "({0}/{1})"
}
@@ -4,9 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"labelLoading": "正在加载...",
"meta.titleReference": " {0} 个引用",
"noResults": "无结果",
"references.action.label": "查找所有引用",
"references.action.name": "显示引用"
"references.action.name": "查找所有引用"
}
@@ -9,5 +9,6 @@
"peekView.alternateTitle": "引用",
"referenceCount": "{0} 个引用",
"referencesCount": "{0} 个引用",
"referencesFailre": "解析文件失败。",
"treeAriaLabel": "引用"
}
@@ -4,11 +4,13 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"invalid.injectTo": "\"contributes.{0}.injectTo\" 中的值无效。必须为语言范围名称数组。提供的值: {1}",
"invalid.language": "“contributes.{0}.language”中存在未知的语言。提供的值: {1}",
"invalid.path.0": "“contributes.{0}.path”中应为字符串。提供的值: {1}",
"invalid.path.1": "“contributes.{0}.path”({1})应包含在扩展的文件夹({2})内。这可能会使扩展不可移植。",
"invalid.scopeName": "“contributes.{0}.scopeName”中应为字符串。提供的值: {1}",
"vscode.extension.contributes.grammars": "用于 textmate tokenizer。",
"vscode.extension.contributes.grammars.injectTo": "此语法注入到的语言范围名称列表。",
"vscode.extension.contributes.grammars.language": "此语法参与的语言标识符。",
"vscode.extension.contributes.grammars.path": "tmLanguage 文件的路径。该路径是相对于扩展文件夹,通常以 \"./syntaxes/\" 开头。",
"vscode.extension.contributes.grammars.scopeName": "tmLanguage 文件所用的 textmate 范围名称。"
@@ -10,7 +10,7 @@
"format.indentInnerHtml": "缩进 <head> 和 <body> 部分。",
"format.maxPreserveNewLines": "要保留在一个区块中的换行符的最大数量。对于无限制使用 \"null\"。",
"format.preserveNewLines": "是否要保留元素前面的现有换行符。仅适用于元素前,不适用于标记内或文本。",
"format.unformatted": "标记列表,以逗号分隔,不应重设格式。\"null\" 默认为所有内联标记。",
"format.unformatted": "以逗号分隔的标记列表不应重设格式。\"null\" 默认为所有列于 https://www.w3.org/TR/html5/dom.html#phrasing-content 的标记。",
"format.wrapLineLength": "每行最大字符数(0 = 禁用)。",
"htmlConfigurationTitle": "HTML 配置"
}
@@ -15,7 +15,8 @@
"newWindow": "新建窗口",
"noFolderOpened": "此实例中没有要关闭的已打开文件夹。",
"openRecent": "打开最近的文件",
"openRecentPlaceHolder": "选择要打开的路径",
"openRecentPlaceHolder": "选择要打开的路径(在新窗口中按住 Ctrl 键打开)",
"openRecentPlaceHolderMac": "选择路径(在新窗口中按住 Cmd 键打开)",
"reloadWindow": "重新加载窗口",
"toggleDevTools": "切换开发人员工具",
"toggleFullScreen": "切换全屏",
@@ -8,7 +8,8 @@
"file": "文件",
"openFilesInNewWindow": "启用后,将在新窗口中打开文件,而不是重复使用现有实例。",
"reopenFolders": "控制重启后重新打开文件夹的方式。选择“none”表示永不重新打开文件夹,选择“one”表示重新打开最后使用的一个文件夹,或选择“all”表示打开上次会话的所有文件夹。",
"updateChannel": "配置从中接收更新的更新频道。更改后需要重启。",
"restoreFullscreen": "如果窗口已退出全屏模式,控制其是否应还原为全屏模式。",
"updateChannel": "配置是否从更新通道接收自动更新。更改后需要重启。",
"updateConfigurationTitle": "更新配置",
"view": "查看",
"windowConfigurationTitle": "窗口配置",
@@ -10,6 +10,7 @@
"debugCategory": "调试",
"debugEvaluate": "调试: 评估",
"debugPanel": "调试控制台",
"launchConfigDoesNotExist": "启动配置“{0}”不存在。",
"runToCursor": "调试: 运行到光标",
"showDebugHover": "调试: 显示悬停",
"toggleBreakpointAction": "调试: 切换断点",
@@ -6,10 +6,12 @@
{
"DebugTaskNotFound": "找不到 preLaunchTask“{0}”。",
"NewLaunchConfig": "请设置应用程序的启动配置文件。",
"breakpointAdded": "已添加断点,行 {0}, 文件 {1}",
"breakpointRemoved": "已删除断点,行 {0},文件 {1}",
"debugAdapterCrash": "调试适配器进程已意外终止",
"debugAnyway": "仍进行调试",
"debugSourceNotAvailable": "源 {0} 不可用。",
"debugTypeMissing": "launch.json 中的所选配置缺少属性 \"type\"。",
"debugTypeMissing": "所选的启动配置缺少属性 \"type\"。",
"debugTypeNotSupported": "配置的类型“{0}”不受支持。",
"debuggingContinued": "已继续调试。",
"debuggingPaused": "已暂停调试,原因 {0}{1} {2}",
@@ -4,10 +4,13 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"debugLinuxConfiguration": "特定于 Linux 的启动配置属性。",
"debugName": "配置名称;在启动配置下拉菜单中显示。",
"debugOSXConfiguration": "特定于 OS X 的启动配置属性。",
"debugPrelaunchTask": "调试会话开始前要运行的任务。",
"debugRequest": "请求配置类型。可以是“启动”或“附加”。",
"debugType": "配置类型。",
"debugWindowsConfiguration": "特定于 Windows 的启动配置属性。",
"internalConsoleOptions": "内部调试控制台的控制行为。",
"relativePathsNotConverted": "相对路径不再自动转换为绝对路径。请考虑使用 ${workspaceRoot} 作为前缀。"
}
@@ -10,6 +10,7 @@
"app.launch.json.version": "此文件格式的版本。",
"debugNoType": "不可省略调试适配器“类型”,其类型必须是“字符串”。",
"duplicateDebuggerType": "调试类型“{0}”已注册,且具有属性“{1}”,正在忽略属性“{1}”。",
"interactiveVariableNotFound": "适配器 {0} 不提供启动配置中指定的变量 {1}。",
"selectDebug": "选择环境",
"vscode.extension.contributes.debuggers": "用于调试适配器。",
"vscode.extension.contributes.debuggers.args": "要传递给适配器的可选参数。",
@@ -26,6 +27,7 @@
"vscode.extension.contributes.debuggers.runtime": "可选运行时,以防程序属性不可执行,但需要运行时。",
"vscode.extension.contributes.debuggers.runtimeArgs": "可选运行时参数。",
"vscode.extension.contributes.debuggers.type": "此调试适配器的唯一标识符。",
"vscode.extension.contributes.debuggers.variables": "将 \"launch.json\" 中的交互式变量(例如 ${action.pickProcess})映射到命令中。",
"vscode.extension.contributes.debuggers.windows": "Windows 特定的设置。",
"vscode.extension.contributes.debuggers.windows.runtime": "用于 Windows 的运行时。"
}
@@ -8,6 +8,8 @@
"globalConsoleActionWin": "打开新命令提示符",
"scopedConsoleActionMacLinux": "在终端中打开",
"scopedConsoleActionWin": "在命令提示符中打开",
"terminal.external.linuxExec": "自定义要在 Linux 上运行的终端。",
"terminal.external.osxExec": "自定义要在 OS X 上运行的终端应用程序。",
"terminal.external.windowsExec": "自定义要在 Windows 上运行的终端。",
"terminalConfigurationTitle": "外部终端配置"
}
@@ -4,16 +4,16 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"close": "关闭",
"deleteSure": "是否确定要卸载“{0}”?",
"installExtension": "安装扩展",
"notFound": "安装扩展“{0}”。",
"enableAction": "启用",
"installAction": "安装",
"installing": "正在安装",
"restart": "若要启用此扩展,需要重启此 VS Code 窗口。\n\n是否继续?",
"restartNow": "立即重启",
"restartNow2": "立即重启",
"showExtensionRecommendations": "显示扩展建议",
"showInstalledExtensions": "显示已安装扩展",
"showOutdatedExtensions": "显示过时扩展",
"success-installed": "已成功安装“{0}”。请重启以启用它。",
"success-uninstalled": "已成功卸载“{0}”。请重启以停用它。 ",
"uninstall": "卸载扩展"
"toggleExtensionsViewlet": "显示扩展",
"uninstall": "卸载",
"updateAction": "更新"
}
@@ -5,6 +5,7 @@
// Do not edit this file. It is machine generated.
{
"extensions": "扩展",
"outdatedExtensions": "{0} 个过时的扩展",
"reloadNow": "立即重启",
"success": "已成功安装扩展,请重启以启用它们。",
"successSingle": "已成功安装 {0} 。请重启以启用它。"
@@ -4,13 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"addToWorkingFiles": "将活动文件添加到工作文件",
"closeAllFiles": "关闭所有文件",
"closeAllLabel": "关闭所有文件",
"closeFile": "关闭文件",
"closeLabel": "关闭文件",
"closeOtherFiles": "关闭其他文件",
"closeOtherLabel": "关闭其他文件",
"collapseExplorerFolders": "在资源管理器中折叠文件夹",
"compareFiles": "比较文件",
"compareSource": "选择以进行比较",
"compareWith": "与“{0}”比较",
@@ -31,7 +25,7 @@
"fileNameExistsError": "此位置已存在文件或文件夹 **{0}**。请选择其他名称。",
"filePathTooLongError": "名称 **{0}** 导致路径太长。请选择更短的名称。",
"focusFilesExplorer": "关注文件资源浏览器",
"focusWorkingFiles": "关注工作文件",
"focusOpenEditors": "专注于“打开的编辑器”视图",
"globalCompareFile": "比较活动文件与...",
"importFiles": "导入文件",
"invalidFileNameError": "名称 **{0}** 作为文件或文件夹名无效。请选择其他名称。",
@@ -39,25 +33,21 @@
"newFile": "新建文件",
"newFolder": "新建文件夹",
"newUntitledFile": "新的无标题文件",
"noFileOpen": "当前没有要关闭的已打开文件。",
"noWorkingFiles": "当前没有工作文件。",
"openFileToAdd": "首先打开文件以将其添加到工作文件。",
"openFileToCompare": "首先打开文件以将其与另外一个文件比较。",
"openFileToShow": "先打开一个文件以在浏览器中显示它",
"openFolderFirst": "先打开一个文件夹,以在其中创建文件或文件夹。",
"openNextWorkingFile": "打开下一个工作文件",
"openPreviousWorkingFile": "打开上一个工作文件",
"openToSide": "打开到侧边",
"pasteFile": "粘贴",
"permDelete": "永久删除",
"refresh": "刷新",
"refreshExplorer": "刷新资源管理器",
"rename": "重命名",
"reopenClosedFile": "重新打开已关闭的文件",
"replaceButtonLabel": "替换(&&R)",
"retry": "重试",
"revert": "还原文件",
"save": "保存",
"saveAll": "全部保存",
"saveAllInGroup": "保存组中的全部内容",
"saveAs": "另存为...",
"saveFiles": "保存已更新文件",
"showInExplorer": "在资源管理器中显示活动文件",
@@ -9,7 +9,7 @@
"autoSave": "控制已更新文件的自动保存。接受的值:“{0}”、“{1}”、“{2}”。如果设置为“{3}”,则可在 \"files.autoSaveDelay\" 中配置延迟。",
"autoSaveDelay": "控制延迟(以秒为单位),在该延迟后将自动保存更新后的文件。仅在 \"files.autoSave\" 设置为“{0}”时适用。",
"binaryFileEditor": "二进制文件编辑器",
"dynamicHeight": "控制工作文件部分的高度是否应动态适应元素数量。",
"dynamicHeight": "控制打开的编辑器部分的高度是否应动态适应元素数量。",
"encoding": "读取和编写文件时将使用的默认字符集编码。",
"eol": "默认行尾字符。",
"exclude": "配置 glob 模式以排除文件和文件夹。",
@@ -17,14 +17,11 @@
"explorerConfigurationTitle": "文件资源管理器配置",
"files.exclude.boolean": "匹配文件路径所依据的 glob 模式。设置为 true 或 false 可启用或禁用该模式。",
"files.exclude.when": "对匹配文件的同级文件的其他检查。使用 $(basename) 作为匹配文件名的变量。",
"filesCategory": "文件",
"filesConfigurationTitle": "文件配置",
"maxVisible": "在滚动条出现之前将显示的最大工作文件数目。",
"openWorkingFile": "按名称打开工作文档",
"openEditorsVisible": "在“打开的编辑器”窗格中显示的编辑器数量。将其设置为 0 可隐藏窗格。",
"showExplorerViewlet": "显示资源管理器",
"textFileEditor": "文本文件编辑器",
"trimTrailingWhitespace": "启用后,将在保存文件时剪裁尾随空格。",
"view": "查看",
"watcherExclude": "配置文件路径的 glob 模式以从文件监视排除。更改此设置要求重启。如果在启动时遇到 Code 消耗大量 CPU 时间,则可以排除大型文件夹以减少初始加载。",
"workingFilesPicker": "按名称打开工作文档"
"watcherExclude": "配置文件路径的 glob 模式以从文件监视排除。更改此设置要求重启。如果在启动时遇到 Code 消耗大量 CPU 时间,则可以排除大型文件夹以减少初始加载。"
}
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"acceptLocalChanges": "使用本地更改并覆盖磁盘内容",
"acceptLocalChanges": "覆盖",
"compareChanges": "比较",
"conflictingFileHasChanged": "磁盘上的文件内容已更改,比较编辑器的左侧已刷新。请再次审查和解析。",
"discard": "放弃",
@@ -13,8 +13,8 @@
"readonlySaveError": "无法保存“{0}”: 文件写保护。选择“覆盖”以删除保护。 ",
"resolveSaveConflict": "{0} - 解析保存冲突",
"retry": "重试",
"revertLocalChanges": "放弃本地更改,还原为磁盘上的内容",
"revertLocalChanges": "还原",
"saveConflictDiffLabel": "{0} - 磁盘上 ↔ {1} 中",
"staleSaveError": "无法保存“{0}”: 磁盘上的内容较新。单击 **比较** 以比较你的版本和磁盘上的版本。",
"userGuide": "使用编辑器工具栏中的操作 **撤消** 更改或用更改 **覆盖** 磁盘上的内容"
"userGuide": "选择**还原**以放弃所做的更改或使用**覆盖**以将磁盘上的内容替换为所做的更改"
}
@@ -9,5 +9,8 @@
"openFile": "打开文件",
"openInEditor": "切换到编辑器视图",
"stageSelectedLines": "暂存选定行",
"switchToChangesView": "切换到更改视图"
"switchToChangesView": "切换到更改视图",
"unstageSelectedLines": "取消暂存选定的行",
"workbenchStage": "暂存",
"workbenchUnstage": "取消暂存"
}
@@ -5,13 +5,11 @@
// Do not edit this file. It is machine generated.
{
"authFailed": "在 GIT 远程上进行身份验证失败。",
"branch": "Branch",
"branch2": "Branch",
"checkout": "Checkout",
"cleanChangesLabel": "清理更改(&&C)",
"commit": "Commit",
"commitAll": "全部提交",
"commitAll2": "全部提交",
"commitMessage": "提交消息",
"commitStaged": "提交已暂存的",
"commitStaged2": "提交已暂存的",
"confirmPublishMessage": "是否确定要将“{0}”发布到“{1}”?",
@@ -36,13 +34,9 @@
"openFile": "打开文件",
"publish": "发布",
"publishPickMessage": "选取要将分支“{0}”发布到的远程:",
"pull": "Pull",
"pullWithRebase": "拉取(变基)",
"push": "Push",
"refresh": "刷新",
"stageAllChanges": "全部暂存",
"stageChanges": "暂存",
"sync": "同步",
"synchronizing": "正在同步...",
"undoAllChanges": "全部清理",
"undoChanges": "清理",
@@ -7,6 +7,7 @@
"alreadyCheckedOut": "分支 {0} 已是当前分支",
"branchAriaLabel": "{0}GIT 分支",
"checkoutBranch": "{0} 处的分支",
"checkoutRemoteBranch": "{0} 处的远程分支",
"checkoutTag": "{0} 处的 Tag",
"createBranch": "创建分支 {0}",
"noBranches": "无其他分支",
@@ -8,17 +8,23 @@
"cancel": "取消",
"cantOpen": "无法打开此 git 资源。",
"cantOpenResource": "无法打开此 git 资源。",
"changesFromIndex": "{0} - 对索引的更改",
"changesFromTree": "{0} - 对 {1} 的更改",
"changesFromIndex": "{0}(索引)",
"changesFromIndexDesc": "{0} - 对索引的更改",
"changesFromTree": "{0} ({1})",
"changesFromTreeDesc": "{0} - 对 {1} 的更改",
"checkNativeConsole": "运行 GIT 操作存在问题。请审阅输出或使用控制台检查你的存储库的状态。",
"configureUsernameEmail": "请配置 GIT 用户名和电子邮件。",
"download": "下载",
"gitIndexChanges": "{0} - 对索引的更改",
"gitIndexChangesRenamed": "{0} - 已重命名 - 索引更改",
"gitMergeChanges": "{0} - 合并更改",
"gitIndexChanges": "{0} (索引) ↔ {1}",
"gitIndexChangesDesc": "{0} - 索引更改",
"gitIndexChangesRenamed": "{0} ← {1}",
"gitIndexChangesRenamedDesc": "{0} - 已重命名 - 对索引的更改",
"gitMergeChanges": "{0} (合并) ↔ {1}",
"gitMergeChangesDesc": "{0} - 合并更改",
"neverShowAgain": "不再显示",
"showOutput": "显示输出",
"unmergedChanges": "提交更改前,你应首先解决未合并的更改。",
"updateGit": "你似乎已安装 git {0}。在 git >=2.0.0 情况下代码工作最佳。",
"workingTreeChanges": "{0} - 对工作树的更改"
"workingTreeChanges": "{0} (标头) ↔ {1}",
"workingTreeChangesDesc": "{0} - 对工作树的更改"
}
@@ -9,6 +9,8 @@
"gitCommands": "GIT 命令",
"gitConfigurationTitle": "GIT 配置",
"gitEnabled": "是否启用了 GIT",
"gitLargeRepos": "始终允许大型存储库由 Code 托管。",
"gitLongCommit": "是否应警告提交长段消息。",
"gitPath": "可执行 GIT 的路径",
"gitPendingChangesBadge": "{0} 个挂起的更改",
"gitProgressBadge": "正在运行 GIT 状态",
@@ -6,6 +6,7 @@
{
"commitMessage": "消息(按 {0} 提交)",
"commitMessageAriaLabel": "GIT: 键入提交信息并按 {0} 以提交",
"longCommit": "建议保持提交的第一行在 50 个字符以内。可以随时使用更多行显示额外信息。",
"needMessage": "请提供提交消息。您可以始终按下“{0}”以提交更改。如果存在任何暂存的更改,将仅提交这些更改;否则,提交所有更改。",
"nothingToCommit": "在有一些更改要提交时,键入提交信息,并按下“{0}”以提交更改。如果存在任何暂存的更改,将仅提交这些更改;否则,提交所有更改。",
"showOutput": "显示 GIT 输出",
@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"": "{0}: {1}",
"QuickCommandsAction.label": "显示编辑器命令",
"actionNotEnabled": "在当前上下文中没有启用命令“{0}”。",
"canNotRun": "无法从此处运行命令“{0}”。",
@@ -4,41 +4,26 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"ClearSearchResultsAction.label": "清理搜索结果",
"CollapseAllAction.label": "折叠",
"ConfigureGlobalExclusionsAction.label": "打开设置",
"RefreshAction.label": "刷新",
"RemoveAction.label": "删除",
"SelectOrRemoveAction.removeLabel": "删除",
"SelectOrRemoveAction.selectLabel": "选择",
"ariaSearchResultsStatus": "搜索 {1} 文件中返回的 {0} 个结果",
"defaultLabel": "输入",
"fileMatchAriaLabel": "文件夹 {2} 的文件 {1} 中有 {0} 个匹配,搜索结果",
"findInFolder": "在文件夹中查找",
"findPlaceHolder": "按 Enter 进行搜索,按 Esc 取消",
"globLabel": "{1} 时为 {0}",
"global.searchScope.folders": "通过设置排除的文件",
"label.Search": "搜索: 键入搜索术语,然后按 Enter 进行搜索或按 Escape 取消",
"label.excludes": "搜索排除模式",
"label.global.excludes": "配置的搜索排除模式",
"label.includes": "搜索包含模式",
"moreSearch": "切换搜索详细信息",
"noMatches": "无匹配",
"noResultsExcludes": "除“{0}”外,未找到任何结果 - ",
"noResultsFound": "找不到结果。查看设置中配置的排除项 - ",
"noResultsIncludes": "“{0}”中未找到任何结果 - ",
"noResultsIncludesExcludes": "在“{0}”中找不到结果(“{1}”除外) - ",
"openSettings.message": "打开设置",
"patternDescription": "使用 Glob 模式",
"patternHelpInclude": "要匹配的模式。例如,****/*.js** 与所有 JavaScript 文件匹配,或 **myFolder/**** 与包含所有子级的文件夹匹配。\n\n**Reference**:\n***** 匹配 0 个或更多字符\n**?** 匹配 1 个字符\n****** 匹配零个或更多目录\n**[a-z]** 匹配一系列字符\n**{a,b}** 匹配任何一种模式)",
"regexp.validationFailure": "表达式与所有内容相匹配",
"replaceAll.confirm.button": "替换",
"replaceAll.confirmation.message": "是否替换出现在 {1} 文件中的 {0}?",
"replaceAll.confirmation.title": "全部替换",
"replaceAll.message": "已替换出现在 {1} 文件中的 {0}。",
"rerunSearch.message": "再次搜索",
"rerunSearchInAll.message": "在所有文件中再次搜索",
"searchCanceled": "在找到结果前取消了搜索 - ",
"searchMatch": "已找到 {0} 个匹配项",
"searchMatches": "已找到 {0} 个匹配项",
"searchMaxResultsWarning": "结果集仅包含所有匹配项的子集。请使你的搜索更加具体,减少结果。",
"searchResultAria": "{0},搜索结果",
"searchScope.excludes": "要排除的文件",
"searchScope.includes": "要包含的文件",
"treeAriaLabel": "搜索结果"
@@ -5,7 +5,10 @@
// Do not edit this file. It is machine generated.
{
"close": "关闭",
"insiderBuilds": "会员版本将成为日常版本!",
"license": "读取许可证",
"licenseChanged": "我们的许可条款已更改,请检查它们。",
"neverShowAgain": "不再显示",
"readmore": "阅读更多内容",
"releaseNotes": "欢迎使用 {0} v{1}! 是否要阅读发布说明?"
}
@@ -5,7 +5,7 @@
// Do not edit this file. It is machine generated.
{
"devExtensionWindowTitle": "[扩展开发主机] - {0}",
"prefixDecoration": "{0} {1}",
"prefixDecoration": " {0}",
"prefixTitle": "{0} - {1}",
"prefixWorkspaceTitle": "{0} - {1} - {2}",
"prefixWorkspaceTitleMac": "{0} - {1}",
@@ -7,7 +7,7 @@
"channelName": "TypeScript",
"noServerFound": "路徑 {0} 未指向有效的 tsserver 安裝。將停用 TypeScript 語言功能。",
"serverCouldNotBeStarted": "無法啟動 TypeScript 語言伺服器。錯誤訊息為: {0}",
"serverDied": "Typescript 語言服務在過去 5 分鐘內意外中止 5 次。請考慮開啟問題報告。",
"serverDiedAfterStart": "Typescript 語言服務在啟動後立即中止 5 次。服務將不會重新啟動。請開啟問題報告。",
"serverDied": "TypeScript 語言服務在過去 5 分鐘內意外中止 5 次。請考慮開啟問題報告。",
"serverDiedAfterStart": "TypeScript 語言服務在啟動後立即中止 5 次。服務將不會重新啟動。請開啟問題報告。",
"versionNumber.custom": "自訂"
}
@@ -18,6 +18,7 @@
"javascript.validate.enable": "啟用 / 停用 JavaScript 驗證",
"typescript.reloadProjects.title": "重新載入 TypeScript 專案",
"typescript.tsdk.desc": "指定資料夾路徑,其中包含要使用的 tsserver 和 lib*.d.ts 檔案。",
"typescript.tsserver.experimentalAutoBuild": "啟用實驗性自動建置。需要 1.9 dev 或 2.x tsserver 版本,且在變更後必須重新啟動 VS Code。",
"typescript.tsserver.trace": "允許追蹤傳送到 TS 伺服器的訊息",
"typescript.useCodeSnippetsOnMethodSuggest.dec": "使用其參數簽章完成函式。",
"typescript.validate.enable": "啟用 / 停用 TypeScript 驗證"
@@ -35,6 +35,9 @@
"miExit": "結束(&&X)",
"miFind": "尋找(&&F)",
"miFindInFiles": "在檔案中尋找(&&I)",
"miFocusFirstGroup": "左側群組(&&L)",
"miFocusSecondGroup": "側邊群組(&&S)",
"miFocusThirdGroup": "右側群組(&&R)",
"miForward": "轉寄(&&F)",
"miGotoDefinition": "移至定義(&&D)",
"miGotoFile": "移至檔案(&&F)...",
@@ -43,11 +46,13 @@
"miInstallingUpdate": "正在安裝更新...",
"miLastCheckedAt": "上次檢查時間為 {0}",
"miLicense": "檢視授權(&&V)",
"miMarker": "錯誤與警告(&&E)...",
"miMarker": "問題(&&P)",
"miMoveSidebar": "移動提要欄位(&&M)",
"miNavigateHistory": "巡覽歷程記錄(&&N)",
"miNewFile": "新增檔案(&&N)",
"miNewWindow": "開新視窗(&&N)",
"miNextEditor": "下一個編輯器(&&N)",
"miNextEditorInGroup": "群組中下一個已使用的編輯器(&&N)",
"miNextGroup": "下一個群組(&&N)",
"miOpen": "開啟(&&O)...",
"miOpenFile": "開啟檔案(&&O)...",
"miOpenFolder": "開啟資料夾(&&F)...",
@@ -58,11 +63,14 @@
"miOpenWorkspaceSettings": "工作區設定(&&W)",
"miPaste": "貼上(&&P)",
"miPreferences": "喜好設定(&&P)",
"miPreviousEditor": "上一個編輯器(&&P)",
"miPreviousEditorInGroup": "群組中上一個已使用的編輯器(&&P)",
"miPreviousGroup": "上一個群組(&&P)",
"miPrivacyStatement": "隱私權聲明(&&P)",
"miQuit": "結束 {0}",
"miRedo": "取消復原(&&R)",
"miReleaseNotes": "版本資訊(&&R)",
"miReopenClosedFile": "重新開啟已關閉的檔案(&&R)",
"miReopenClosedEditor": "重新開啟已關閉的編輯器(&&R)",
"miReplace": "取代(&&R)",
"miReportIssues": "回報問題(&&I)",
"miRestartToUpdate": "重新啟動以更新...",
@@ -73,14 +81,18 @@
"miSelectAll": "全選(&&S)",
"miSelectTheme": "色彩佈景主題(&&C)",
"miSplitEditor": "分割編輯器(&&E)",
"miToggleDebugConsole": "切換偵錯主控台(&&B)",
"miSwitchEditor": "切換編輯器(&&E)",
"miSwitchGroup": "切換群組(&&G)",
"miToggleDebugConsole": "偵錯主控台(&&B)",
"miToggleDevTools": "切換開發人員工具(&&T)",
"miToggleFullScreen": "切換全螢幕(&&F)",
"miToggleIntegratedTerminal": "整合式終端機(&&I)",
"miToggleMenuBar": "切換功能表列(&&B)",
"miToggleOutput": "切換輸出(&&O)",
"miToggleOutput": "輸出(&&O)",
"miTogglePanel": "切換面板(&&P)",
"miToggleRenderWhitespace": "切換轉譯空白字元(&&R)",
"miToggleSidebar": "切換提要欄位(&&T)",
"miToggleStatusbar": "切換狀態列(&&T)",
"miToggleWordWrap": "切換自動換行(&&W)",
"miTwitter": "加入我們的 Twitter(&&J)",
"miUndo": "復原(&&U)",
@@ -91,5 +103,6 @@
"miViewSearch": "搜尋(&&S)",
"miZoomIn": "放大(&&Z)",
"miZoomOut": "縮小(&&U)",
"miZoomReset": "重設縮放(&&R)",
"okButton": "確定"
}
@@ -12,5 +12,5 @@
"successInstall": "已成功安裝擴充功能 '{0}' v{1}!",
"successUninstall": "已成功將擴充功能 '{0}' 解除安裝!",
"uninstalling": "正在將 {0} 解除安裝...",
"useId": "請確定您使用完整的擴充功能識別碼,例如: {0}"
"useId": "請確定您使用完整的擴充功能識別碼,例如 {0}"
}
@@ -9,7 +9,6 @@
"cursorBlinking": "控制游標閃爍動畫,接受的值為 'blink'、'visible' 和 'hidden'",
"cursorStyle": "控制游標樣式,接受的值為 'block' 和 'line'",
"detectIndentation": "開啟檔案時,會依據檔案內容來偵測 `editor.tabSize` 及 `editor.insertSpaces`。",
"dismissPeekOnEsc": "按下 ESC 時關閉預覽編輯器",
"editorConfigurationTitle": "編輯器組態",
"folding": "控制編輯器是否已啟用程式碼摺疊功能",
"fontFamily": "控制字型家族。",
@@ -25,6 +24,7 @@
"lineNumbers": "控制是否顯示行號",
"mouseWheelScrollSensitivity": "滑鼠滾輪捲動事件的 'deltaX' 與 'deltaY' 所使用的乘數",
"overviewRulerLanes": "控制可在概觀尺規中相同位置顯示的裝飾項目數",
"parameterHints": "啟用參數提示",
"quickSuggestions": "控制輸入時是否應顯示快速建議",
"quickSuggestionsDelay": "控制延遲顯示快速建議的毫秒數",
"referenceInfos": "控制編輯器是否會顯示支援編輯器的模式之參考資訊",
@@ -35,6 +35,7 @@
"selectionClipboard": "控制是否應支援 Linux 主要剪貼簿。",
"selectionHighlight": "控制編輯器是否應反白顯示與選取範圍相似的符合項",
"sideBySide": "控制 Diff 編輯器要並排或內嵌顯示差異",
"stablePeek": "讓預覽編輯器在使用者按兩下其內容或點擊 Escape 時保持開啟。",
"suggestOnTriggerCharacters": "控制輸入觸發字元時,是否應自動顯示建議",
"tabSize": "與 Tab 相等的空格數量。",
"tabSize.errorMessage": "必須是 'number'。請注意,值 \"auto\" 已由 `editor.detectIndentation` 設定取代。",
@@ -11,6 +11,8 @@
"foldLevel3Action.label": "摺疊層級 3",
"foldLevel4Action.label": "摺疊層級 4",
"foldLevel5Action.label": "摺疊層級 5",
"foldRecursivelyAction.label": "以遞迴方式摺疊",
"unFoldRecursivelyAction.label": "以遞迴方式展開",
"unfoldAction.label": "展開",
"unfoldAllAction.label": "全部展開"
}
@@ -7,5 +7,7 @@
"markerAction.next.label": "移至下一個錯誤或警告",
"markerAction.previous.label": "移至上一個錯誤或警告",
"quickfix.multiple.label": "建議的修正程式: ",
"quickfix.single.label": "建議的修正程式: "
"quickfix.single.label": "建議的修正程式: ",
"title.w_source": "({0}/{1}) [{2}]",
"title.wo_source": "({0}/{1})"
}
@@ -4,9 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"labelLoading": "正在載入...",
"meta.titleReference": " - {0} 個參考",
"noResults": "沒有結果",
"references.action.label": "尋找所有參考",
"references.action.name": "顯示參考"
"references.action.name": "尋找所有參考"
}
@@ -8,5 +8,6 @@
"peekView.alternateTitle": "參考",
"referenceCount": "{0} 個參考",
"referencesCount": "{0} 個參考",
"referencesFailre": "無法解析檔案。",
"treeAriaLabel": "參考"
}
@@ -4,11 +4,13 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"invalid.injectTo": "`contributes.{0}.injectTo` 中的值無效。必須是語言範圍名稱的陣列。提供的值: {1}",
"invalid.language": "`contributes.{0}.language` 中的不明語言。提供的值: {1}",
"invalid.path.0": "`contributes.{0}.path` 中的預期字串。提供的值: {1}",
"invalid.path.1": "要包含在擴充功能資料夾 ({2}) 中的預期 `contributes.{0}.path` ({1})。這可能會使擴充功能無法移植。",
"invalid.scopeName": "`contributes.{0}.scopeName` 中的預期字串。提供的值: {1}",
"vscode.extension.contributes.grammars": "提供 textmate 權杖化工具。",
"vscode.extension.contributes.grammars.injectTo": "要插入此文法的語言範圍名稱清單。",
"vscode.extension.contributes.grammars.language": "要予以提供此語法的語言識別碼。",
"vscode.extension.contributes.grammars.path": "tmLanguage 檔案的路徑。此路徑是擴充功能資料夾的相對路徑,而且一般會以 './syntaxes/' 開頭。",
"vscode.extension.contributes.grammars.scopeName": "tmLanguage 檔案所使用的 textmate 範圍名稱。"
@@ -10,7 +10,7 @@
"format.indentInnerHtml": "縮排 <head> 及 <body> 區段。",
"format.maxPreserveNewLines": "一個區塊要保留的最大分行符號數。使用 'null' 表示無限制。",
"format.preserveNewLines": "是否應保留項目前方現有的分行符號。僅適用於項目前方,而不適用於標記內或文字。",
"format.unformatted": "不應重新格式化的標記清單,須以逗號分隔。'null' 預設值為所有內嵌標記。",
"format.unformatted": "不應重新格式化的逗號分隔標記清單。'null' 預設為 https://www.w3.org/TR/html5/dom.html#phrasing-content 中列出的所有標記。",
"format.wrapLineLength": "每行的字元數上限 (0 = 停用)。",
"htmlConfigurationTitle": "HTML 設定"
}
@@ -15,7 +15,8 @@
"newWindow": "開新視窗",
"noFolderOpened": "此執行個體中目前沒有開啟的資料夾可以關閉。",
"openRecent": "開啟最近的檔案",
"openRecentPlaceHolder": "選取要開啟的路徑",
"openRecentPlaceHolder": "選取要開啟的路徑 (按住 Ctrl 鍵以在新視窗開啟)",
"openRecentPlaceHolderMac": "選取路徑 (按住 Cmd 鍵以在新視窗開啟)",
"reloadWindow": "重新載入視窗",
"toggleDevTools": "切換開發人員工具",
"toggleFullScreen": "切換全螢幕",
@@ -8,7 +8,8 @@
"file": "檔案",
"openFilesInNewWindow": "啟用時,會在新視窗中開啟檔案,而不是重複使用現有的執行個體。",
"reopenFolders": "控制重新啟動後重新開啟資料夾的方式。選取 [none] 永不重新開啟資料夾,選取 [one] 重新開啟最近一個使用的資料夾,或選取 [all] 重新開啟上一個工作階段的所有資料夾。",
"updateChannel": "設定要從中接收更新的更新頻道。變更後需要重新啟動。",
"restoreFullscreen": "控制當視窗在全螢幕模式下結束後,下次是否仍以全螢幕模式開啟。",
"updateChannel": "設定是否要從更新頻道接收自動更新。變更後需要重新啟動。",
"updateConfigurationTitle": "更新組態",
"view": "檢視",
"windowConfigurationTitle": "視窗組態",
@@ -8,8 +8,8 @@
"conditionalBreakpointEditorAction": "偵錯: 條件式中斷點",
"debug": "偵錯",
"debugCategory": "偵錯",
"debugConsole": "偵錯主控台",
"debugEvaluate": "偵錯: 評估",
"launchConfigDoesNotExist": "啟動設定 '{0}' 不存在。",
"runToCursor": "偵錯: 執行至游標處",
"showDebugHover": "偵錯: 動態顯示",
"toggleBreakpointAction": "偵錯: 切換中斷點",
@@ -6,10 +6,12 @@
{
"DebugTaskNotFound": "找不到 preLaunchTask '{0}'。",
"NewLaunchConfig": "請為您的應用程式設定啟動組態檔。",
"breakpointAdded": "已新增中斷點,行 {0},檔案 {1}",
"breakpointRemoved": "已移除中斷點,行 {0},檔案 {1}",
"debugAdapterCrash": "偵錯配接器處理序已意外終止",
"debugAnyway": "仍要偵錯",
"debugSourceNotAvailable": "來源 {0} 無法使用。",
"debugTypeMissing": "在 launch.json 中遺漏選取組態的屬性 'type'。",
"debugTypeMissing": "遺漏所選啟動設定的屬性 'type'。",
"debugTypeNotSupported": "不支援設定的偵錯類型 '{0}'。",
"debuggingContinued": "偵錯已繼續。",
"debuggingPaused": "偵錯已暫停,原因 {0}{1} {2}",
@@ -4,10 +4,13 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"debugLinuxConfiguration": "Linux 特定的啟動設定屬性。",
"debugName": "組態的名稱; 出現在啟動組態下拉式功能表中。",
"debugOSXConfiguration": "OS X 特定的啟動設定屬性。",
"debugPrelaunchTask": "偵錯工作階段啟動前要執行的工作。",
"debugRequest": "要求組態的類型。可以是 [啟動] 或 [附加]。",
"debugType": "組態的類型。",
"debugWindowsConfiguration": "Windows 特定的啟動設定屬性。",
"internalConsoleOptions": "內部偵錯主控台的控制項行為。",
"relativePathsNotConverted": "相對路徑將不再自動轉換成絕對路徑。請考慮使用 ${workspaceRoot} 作為前置詞。"
}
@@ -10,6 +10,7 @@
"app.launch.json.version": "此檔案格式的版本。",
"debugNoType": "偵錯配接器 'type' 不能省略且必須屬於 'string' 類型。",
"duplicateDebuggerType": "偵錯類型 '{0}' 已註冊並具有屬性 '{1}',即將略過屬性 '{1}'。",
"interactiveVariableNotFound": "配接器 {0} 未參與在啟動設定中指定的變數 {1}。",
"selectDebug": "選取環境",
"vscode.extension.contributes.debuggers": "提供偵錯配接器。",
"vscode.extension.contributes.debuggers.args": "要傳遞至配接器的選擇性引數。",
@@ -26,6 +27,7 @@
"vscode.extension.contributes.debuggers.runtime": "程式屬性不是可執行檔但需要執行階段時的選擇性執行階段。",
"vscode.extension.contributes.debuggers.runtimeArgs": "選擇性執行階段引數。",
"vscode.extension.contributes.debuggers.type": "此偵錯配接器的唯一識別碼。",
"vscode.extension.contributes.debuggers.variables": "從 `launch.json` 中的互動式變數 (例如 ${action.pickProcess}) 對應到命令。",
"vscode.extension.contributes.debuggers.windows": "Windows 特定設定。",
"vscode.extension.contributes.debuggers.windows.runtime": "用於 Windows 的執行階段。"
}
@@ -8,6 +8,8 @@
"globalConsoleActionWin": "開啟新的命令提示字元",
"scopedConsoleActionMacLinux": "在終端機中開啟",
"scopedConsoleActionWin": "在命令提示字元中開啟",
"terminal.external.linuxExec": "自訂要在 Linux 上執行的終端機。",
"terminal.external.osxExec": "自訂要在 OS X 上執行的終端機應用程式。",
"terminal.external.windowsExec": "自訂要在 Windows 上執行的終端機。",
"terminalConfigurationTitle": "外部終端機組態"
}
@@ -4,16 +4,16 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"close": "關閉",
"deleteSure": "確定要解除安裝 '{0}' 嗎?",
"installExtension": "安裝擴充功能",
"notFound": "擴充功能 '{0}' 未安裝",
"enableAction": "啟用",
"installAction": "安裝",
"installing": "正在安裝",
"restart": "為了啟用此擴充功能,必須重新啟動此 VS Code 視窗。\n\n要繼續嗎?",
"restartNow": "立即重新啟動",
"restartNow2": "立即重新啟動",
"showExtensionRecommendations": "顯示擴充功能建議",
"showInstalledExtensions": "顯示安裝的擴充功能",
"showOutdatedExtensions": "顯示過期的擴充功能",
"success-installed": "已成功安裝 '{0}'。請重新啟動加以啟用。",
"success-uninstalled": "已成功解除安裝 '{0}'。請重新啟動加以停用。",
"uninstall": "解除安裝擴充功能"
"toggleExtensionsViewlet": "顯示擴充功能",
"uninstall": "解除安裝",
"updateAction": "更新"
}
@@ -5,6 +5,7 @@
// Do not edit this file. It is machine generated.
{
"extensions": "延伸模組",
"outdatedExtensions": "{0} 過期的擴充功能",
"reloadNow": "立即重新啟動",
"success": "已成功安裝擴充功能。請重新啟動加以啟用。",
"successSingle": "已成功安裝 {0}。請重新啟動加以啟用。"
@@ -4,13 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"addToWorkingFiles": "將使用中的檔案加入工作檔案中",
"closeAllFiles": "關閉所有檔案",
"closeAllLabel": "關閉所有檔案",
"closeFile": "關閉檔案",
"closeLabel": "關閉檔案",
"closeOtherFiles": "關閉其他檔案",
"closeOtherLabel": "關閉其他檔案",
"collapseExplorerFolders": "摺疊 Explorer 中的資料夾",
"compareFiles": "比較檔案",
"compareSource": "選取用以比較",
"compareWith": "與 '{0}' 比較",
@@ -31,7 +25,7 @@
"fileNameExistsError": "這個位置已存在檔案或資料夾 **{0}**。請選擇不同的名稱。",
"filePathTooLongError": "名稱 **{0}** 導致路徑太長。請選擇較短的名稱。",
"focusFilesExplorer": "將焦點設在檔案總管上",
"focusWorkingFiles": "將焦點放在工作檔案上",
"focusOpenEditors": "聚焦在 [開啟編輯器] 檢視",
"globalCompareFile": "使用中檔案的比較對象...",
"importFiles": "匯入檔案",
"invalidFileNameError": "名稱 **{0}** 不能作為檔案或資料夾名稱。請選擇不同的名稱。",
@@ -39,25 +33,21 @@
"newFile": "新增檔案",
"newFolder": "新增資料夾",
"newUntitledFile": "新增無標題檔案",
"noFileOpen": "目前沒有開啟的檔案可以關閉。",
"noWorkingFiles": "目前沒有工作檔案。",
"openFileToAdd": "先開啟檔案以將其加入工作檔案中",
"openFileToCompare": "先開啟檔案以與其他檔案進行比較",
"openFileToShow": "先開啟檔案,以在總管中加以顯示",
"openFolderFirst": "先開啟資料夾,以在其中建立檔案或資料夾。",
"openNextWorkingFile": "開啟下一個工作檔案",
"openPreviousWorkingFile": "開啟上一個工作檔案",
"openToSide": "開至側邊",
"pasteFile": "貼上",
"permDelete": "永久刪除",
"refresh": "重新整理",
"refreshExplorer": "重新整理 Explorer",
"rename": "重新命名",
"reopenClosedFile": "重新開啟已關閉的檔案",
"replaceButtonLabel": "取代(&&R)",
"retry": "重試",
"revert": "還原檔案",
"save": "儲存",
"saveAll": "全部儲存",
"saveAllInGroup": "全部儲存在群組中",
"saveAs": "另存新檔...",
"saveFiles": "儲存已變更的檔案",
"showInExplorer": "在總管中顯示使用中的檔案",
@@ -9,7 +9,7 @@
"autoSave": "控制已變更檔案的自動儲存功能。接受的值: \"{0}\"、\"{1}\"、\"{2}\"。如果設定為 \"{3}\",您可以在 \"files.autoSaveDelay\" 中設定延遲時間。",
"autoSaveDelay": "控制經過這段延遲時間後會自動儲存已變更檔案的毫秒數。僅適用於 \"files.autoSave\" 設定為 \"{0}\" 時。",
"binaryFileEditor": "二進位檔案編輯器",
"dynamicHeight": "控制工作檔案區段的高度是否應依項目數動態調整。",
"dynamicHeight": "控制 [開啟編輯器] 區段的高度是否應依元素數目動態調整。",
"encoding": "讀取與寫入檔案時要使用的預設字元集編碼。",
"eol": "預設行尾字元。",
"exclude": "設定 Glob 模式可包含檔案及資料夾。",
@@ -17,14 +17,11 @@
"explorerConfigurationTitle": "檔案總管組態",
"files.exclude.boolean": "要符合檔案路徑的 Glob 模式。設為 True 或 False 可啟用或停用模式。",
"files.exclude.when": "在相符檔案同層級上額外的檢查。請使用 $(basename) 作為相符檔案名稱的變數。",
"filesCategory": "檔案",
"filesConfigurationTitle": "檔案組態",
"maxVisible": "在捲軸出現前可顯示的工作檔案數目上限。",
"openWorkingFile": "開啟工作檔案 (依名稱)",
"openEditorsVisible": "[開啟編輯器] 窗格中顯示的編輯器數目。將其設定為 0 以隱藏窗格。",
"showExplorerViewlet": "顯示檔案總管",
"textFileEditor": "文字檔編輯器",
"trimTrailingWhitespace": "若啟用,將在您儲存檔案時修剪尾端空白。",
"view": "檢視",
"watcherExclude": "將檔案路徑的 Glob 模式設定為從檔案監控排除。需要重新啟動才能變更此設定。當您發現 Code 在啟動時使用大量 CPU 時間時,可以排除較大的資料夾以降低初始負載。",
"workingFilesPicker": "開啟工作檔案 (依名稱)"
"watcherExclude": "將檔案路徑的 Glob 模式設定為從檔案監控排除。需要重新啟動才能變更此設定。當您發現 Code 在啟動時使用大量 CPU 時間時,可以排除較大的資料夾以降低初始負載。"
}
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"acceptLocalChanges": "使用本機變更並覆寫磁碟內容",
"acceptLocalChanges": "覆寫",
"compareChanges": "比較",
"conflictingFileHasChanged": "磁碟上的檔案內容已變更,而且已重新整理比較編輯器左側。請重新檢閱並加以解決。",
"discard": "捨棄",
@@ -13,8 +13,8 @@
"readonlySaveError": "無法儲存 '{0}': 檔案有防寫保護。請選取 [覆寫] 以移除保護。",
"resolveSaveConflict": "{0} - 解決儲存衝突",
"retry": "重試",
"revertLocalChanges": "捨棄本機變更並還原成磁碟上的內容",
"revertLocalChanges": "還原",
"saveConflictDiffLabel": "{0} - 磁碟上 ↔ {1} 中",
"staleSaveError": "無法儲存 '{0}': 磁碟上的內容較新。請按一下 [比較],比較您的版本與磁碟上的版本。",
"userGuide": "使用編輯器工具列中的動作來「復原」您的變更,或以您的變更「覆寫」磁碟上的內容"
"userGuide": "請選取 [還原] 捨棄您的變更;或選取 [覆寫],以您的變更取代磁碟上的內容"
}
@@ -9,5 +9,8 @@
"openFile": "開啟檔案",
"openInEditor": "切換至編輯器檢視",
"stageSelectedLines": "將選取的行分段",
"switchToChangesView": "切換至變更檢視"
"switchToChangesView": "切換至變更檢視",
"unstageSelectedLines": "取消分段選取的資料行",
"workbenchStage": "分段",
"workbenchUnstage": "取消分段"
}
@@ -5,13 +5,11 @@
// Do not edit this file. It is machine generated.
{
"authFailed": "Git 遠端的驗證失敗。",
"branch": "Branch",
"branch2": "Branch",
"checkout": "Checkout",
"cleanChangesLabel": "清除變更(&&C)",
"commit": "Commit",
"commitAll": "全部認可",
"commitAll2": "全部認可",
"commitMessage": "認可訊息",
"commitStaged": "認可已分段",
"commitStaged2": "認可已分段",
"confirmPublishMessage": "確定要將 '{0}' 發行至 '{1}' 嗎?",
@@ -36,13 +34,9 @@
"openFile": "開啟檔案",
"publish": "發行",
"publishPickMessage": "挑選要發行分支 '{0}' 的目標遠端:",
"pull": "Pull",
"pullWithRebase": "提取 (重訂基底)",
"push": "Push",
"refresh": "重新整理",
"stageAllChanges": "全部分段",
"stageChanges": "分段",
"sync": "同步處理",
"synchronizing": "正在同步處理...",
"undoAllChanges": "全部清除",
"undoChanges": "清除",
@@ -7,6 +7,7 @@
"alreadyCheckedOut": "分支 {0} 已是目前的分支",
"branchAriaLabel": "{0}Git 分支",
"checkoutBranch": "位於 {0} 的分支",
"checkoutRemoteBranch": "位於 {0} 的遠端分支",
"checkoutTag": "位於 {0} 的標記",
"createBranch": "建立分支 {0}",
"noBranches": "沒有其他分支",
@@ -8,17 +8,23 @@
"cancel": "取消",
"cantOpen": "無法開啟這個 Git 資源。",
"cantOpenResource": "無法開啟這個 Git 資源。",
"changesFromIndex": "{0} - 索引上的變更",
"changesFromTree": "{0} - {1} 上的變更",
"changesFromIndex": "{0} (索引)",
"changesFromIndexDesc": "{0} - 索引上的變更",
"changesFromTree": "{0} ({1})",
"changesFromTreeDesc": "{0} - {1} 上的變更",
"checkNativeConsole": "執行 Git 作業時發生問題。請檢閱輸出或使用主控台來查看儲存機制的狀態。",
"configureUsernameEmail": "請設定您的 Git 使用者名稱及電子郵件。",
"download": "下載",
"gitIndexChanges": "{0} - 索引上的變更",
"gitIndexChangesRenamed": "{0} - 已重新命名 - 索引的變更",
"gitMergeChanges": "{0} - 合併變更",
"gitIndexChanges": "{0} (索引) ↔ {1}",
"gitIndexChangesDesc": "{0} - 索引的變更",
"gitIndexChangesRenamed": "{0} ← {1}",
"gitIndexChangesRenamedDesc": "{0} - 已重新命名 - 索引上的變更",
"gitMergeChanges": "{0} (合併) ↔ {1}",
"gitMergeChangesDesc": "{0} - 合併變更",
"neverShowAgain": "不要再顯示",
"showOutput": "顯示輸出",
"unmergedChanges": "您在認可變更前應先解決未合併的變更。",
"updateGit": "您似乎已經安裝 GIT {0}。Code 搭配 GIT >=2.0.0 的成效最佳。",
"workingTreeChanges": "{0} - 工作樹狀目錄上的變更"
"workingTreeChanges": "{0} (HEAD) ↔ {1}",
"workingTreeChangesDesc": "{0} - 工作樹狀上的變更"
}
@@ -9,6 +9,8 @@
"gitCommands": "Git 命令",
"gitConfigurationTitle": "Git 組態",
"gitEnabled": "已啟用 Git",
"gitLargeRepos": "一律允許 Code 管理大型儲存機制。",
"gitLongCommit": "是否對長認可訊息發出警告。",
"gitPath": "Git 可執行檔的路徑",
"gitPendingChangesBadge": "{0} 個暫止的變更",
"gitProgressBadge": "正在執行 Git 狀態",
@@ -6,6 +6,7 @@
{
"commitMessage": "訊息 (按 {0} 認可)",
"commitMessageAriaLabel": "Git: 輸入認可訊息並按 {0} 認可",
"longCommit": "建議讓認可訊息的第一行文字少於 50 個字元。但您可在額外的資訊中使用多行文字。",
"needMessage": "請提供認可訊息。您可以隨時按下 **[{0}]** 來認可變更。如有任何已分段的變更,將只有那些分段的變更會獲得認可,否則,所有變更都會獲得認可。",
"nothingToCommit": "一旦有些變更要進行認可,請在認可訊息中輸入,或者按下 **[{0}]** 來認可變更。如有任何已分段的變更,將只有那些分段的變更會獲得認可,否則,所有變更都會獲得認可。",
"showOutput": "顯示 Git 輸出",
@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"": "{0}: {1}",
"QuickCommandsAction.label": "顯示編輯器命令",
"actionNotEnabled": "目前內容中未啟用命令 '{0}'。",
"canNotRun": "無法從這裡執行命令 '{0}'。",
@@ -4,41 +4,26 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"ClearSearchResultsAction.label": "清除搜尋結果",
"CollapseAllAction.label": "摺疊",
"ConfigureGlobalExclusionsAction.label": "開啟設定",
"RefreshAction.label": "重新整理",
"RemoveAction.label": "移除",
"SelectOrRemoveAction.removeLabel": "移除",
"SelectOrRemoveAction.selectLabel": "選取",
"ariaSearchResultsStatus": "搜尋傳回 {1} 個檔案中的 {0} 個結果",
"defaultLabel": "輸入",
"fileMatchAriaLabel": "資料夾 {2} 檔案 {1} 中的 {0} 個相符的記錄,搜尋結果",
"findInFolder": "在資料夾中尋找",
"findPlaceHolder": "按 Enter 鍵搜尋或按 Esc 鍵取消",
"globLabel": "當 {1} 時為 {0}",
"global.searchScope.folders": "透過設定所排除的檔案",
"label.Search": "搜尋: 輸入搜尋字詞,然後按 Enter 鍵搜尋或按 Esc 鍵取消",
"label.excludes": "搜尋排除模式",
"label.global.excludes": "設定的搜尋排除模式",
"label.includes": "搜尋包含模式",
"moreSearch": "切換搜尋詳細資料",
"noMatches": "沒有相符項目",
"noResultsExcludes": "找不到排除 '{0}' 的結果 - ",
"noResultsFound": "找不到結果。請檢閱所設定排除的設定 - ",
"noResultsIncludes": "在 '{0}' 中找不到結果 - ",
"noResultsIncludesExcludes": "在 '{0}' 中找不到排除 '{1}' 的結果 - ",
"openSettings.message": "開啟設定",
"patternDescription": "使用 Glob 模式",
"patternHelpInclude": "要比對的模式。例如 ****/*.js** 可比對所有 JavaScript 檔案,或 **myFolder/**** 可比對資料夾和所有子系。\n\n**參考**:\n***** 比對 0 或多個字元\n**?** 比對 1 個字元\n****** 比對 0 或多個目錄\n**[a-z]** 比對某個範圍的字元\n**{a,b}** 比對任何模式)",
"regexp.validationFailure": "運算式符合所有項目",
"replaceAll.confirm.button": "取代",
"replaceAll.confirmation.message": "要將 {1} 個檔案中的 {0} 個相符項目取代為 '{2}' 嗎?",
"replaceAll.confirmation.title": "全部取代",
"replaceAll.message": "已將取代 {1} 個檔案中的 {0} 個相符項目取代為 {2}。",
"rerunSearch.message": "再次搜尋",
"rerunSearchInAll.message": "在所有檔案中再次搜尋",
"searchCanceled": "在可能找到任何結果之前已取消搜尋 - ",
"searchMatch": "找到 {0} 個符合項",
"searchMatches": "找到 {0} 個符合項",
"searchMaxResultsWarning": "結果集只包含所有符合項的子集。請提供更具體的搜尋條件以縮小結果範圍。",
"searchResultAria": "{0},搜尋結果",
"searchScope.excludes": "要排除的檔案",
"searchScope.includes": "要包含的檔案",
"treeAriaLabel": "搜尋結果"
@@ -5,7 +5,10 @@
// Do not edit this file. It is machine generated.
{
"close": "關閉",
"insiderBuilds": "測試人員組建將成為每日組建!",
"license": "閱讀授權",
"licenseChanged": "授權條款已有所變更,請仔細閱讀。",
"neverShowAgain": "不要再顯示",
"readmore": "閱讀其他資訊",
"releaseNotes": "歡迎使用 {0} v{1}! 您要閱讀版本資訊嗎?"
}
@@ -5,7 +5,7 @@
// Do not edit this file. It is machine generated.
{
"devExtensionWindowTitle": "[擴充功能開發主機] - {0}",
"prefixDecoration": "{0} {1}",
"prefixDecoration": " {0}",
"prefixTitle": "{0} - {1}",
"prefixWorkspaceTitle": "{0} - {1} - {2}",
"prefixWorkspaceTitleMac": "{0} - {1}",
+1 -1
View File
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"configuration.title": "PHP-Konfigurationsoptionen",
"configuration.title": "PHP",
"configuration.validate.enable": "Gibt an, ob PHP-Überprüfung aktiviert ist.",
"configuration.validate.executablePath": "Zeigt auf die ausführbare PHP-Datei.",
"configuration.validate.run": "Gibt an, ob der Linter beim Speichern oder bei der Eingabe ausgeführt wird."
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"configuration.typescript": "TypeScript-Konfiguration",
"configuration.typescript": "TypeScript",
"format.insertSpaceAfterCommaDelimiter": "Definiert die Verarbeitung von Leerzeichen nach einem Kommatrennzeichen.",
"format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": "Definiert die Verarbeitung von Leerzeichen nach einem Funktionsschlüsselwort für anonyme Funktionen.",
"format.insertSpaceAfterKeywordsInControlFlowStatements": "Definiert die Verarbeitung von Leerzeichen nach Schlüsselwörtern in einer Flusssteuerungsanweisung.",
@@ -18,6 +18,7 @@
"javascript.validate.enable": "JavaScript-Überprüfung aktivieren/deaktivieren",
"typescript.reloadProjects.title": "TypeScript-Projekt erneut laden",
"typescript.tsdk.desc": "Gibt den Ordnerpfad mit den zu verwendenden tsserver- und lib*.d.ts-Dateien an.",
"typescript.tsserver.experimentalAutoBuild": "Ermöglicht experimentelle automatische Buildvorgänge. Erfordert Version 1.9 dev oder 2.x tsserver sowie einen Neustart von VS Code nach der Änderung.",
"typescript.tsserver.trace": "Aktiviert die Nachverfolgung von an den TS-Server gesendeten Nachrichten.",
"typescript.useCodeSnippetsOnMethodSuggest.dec": "Vervollständigen Sie Funktionen mit deren Parametersignatur.",
"typescript.validate.enable": "TypeScript-Überprüfung aktivieren/deaktivieren"
@@ -35,6 +35,9 @@
"miExit": "&&Beenden",
"miFind": "&&Suchen",
"miFindInFiles": "&&In Dateien suchen",
"miFocusFirstGroup": "&&Linke Gruppe",
"miFocusSecondGroup": "&&Seitliche Gruppe",
"miFocusThirdGroup": "&&Rechte Gruppe",
"miForward": "&&Weiterleiten",
"miGotoDefinition": "Gehe &&zu Definition",
"miGotoFile": "Gehe zu &&Datei...",
@@ -43,11 +46,13 @@
"miInstallingUpdate": "Update wird installiert...",
"miLastCheckedAt": "Zuletzt überprüft am {0}",
"miLicense": "&&Lizenz anzeigen",
"miMarker": "&&Fehler und Warnungen...",
"miMarker": "&&Probleme",
"miMoveSidebar": "&&Randleiste verschieben",
"miNavigateHistory": "&&Im Verlauf navigieren",
"miNewFile": "&&Neue Datei",
"miNewWindow": "&&Neues Fenster",
"miNextEditor": "&&Nächster Editor",
"miNextEditorInGroup": "&&Nächster verwendeter Editor in der Gruppe",
"miNextGroup": "&&Nächste Gruppe",
"miOpen": "&&Öffnen...",
"miOpenFile": "&&Datei öffnen...",
"miOpenFolder": "&&Ordner öffnen...",
@@ -58,12 +63,16 @@
"miOpenWorkspaceSettings": "&&Arbeitsbereichseinstellungen",
"miPaste": "&&Einfügen",
"miPreferences": "&&Einstellungen",
"miPreviousEditor": "&&Vorheriger Editor",
"miPreviousEditorInGroup": "&&Zuvor verwendeter Editor in der Gruppe",
"miPreviousGroup": "&&Vorherige Gruppe",
"miPrivacyStatement": "&&Datenschutzerklärung",
"miQuit": "{0} beenden",
"miRedo": "&&Wiederholen",
"miReleaseNotes": "&&Anmerkungen zu dieser Version",
"miReopenClosedFile": "&&Geschlossene Datei erneut öffnen",
"miReopenClosedEditor": "&&Geschlossenen Editor erneut öffnen",
"miReplace": "&&Ersetzen",
"miReplaceInFiles": "&&In Dateien ersetzen",
"miReportIssues": "&&Probleme melden",
"miRestartToUpdate": "Für Update neu starten...",
"miRevert": "D&&atei wiederherstellen",
@@ -73,23 +82,30 @@
"miSelectAll": "&&Alles auswählen",
"miSelectTheme": "&&Farbdesign",
"miSplitEditor": "&&Editor teilen",
"miToggleDebugConsole": "De&&bugkonsole umschalten",
"miSwitchEditor": "&&Editor wechseln",
"miSwitchGroup": "&&Gruppe wechseln",
"miToggleDebugConsole": "De&&bugkonsole",
"miToggleDevTools": "&&Entwicklungstools umschalten",
"miToggleFullScreen": "&&Vollbild umschalten",
"miToggleIntegratedTerminal": "&&Integriertes Terminal",
"miToggleMenuBar": "Men&&üleiste umschalten",
"miToggleOutput": "&&Ausgabe umschalten",
"miToggleOutput": "&&Ausgabe",
"miTogglePanel": "&&Bereich umschalten",
"miToggleRenderControlCharacters": "&&Steuerzeichen umschalten",
"miToggleRenderWhitespace": "&&Rendern von Leerzeichen umschalten",
"miToggleSidebar": "&&Randleiste umschalten",
"miToggleStatusbar": "&&Statusleiste umschalten",
"miToggleWordWrap": "&&Zeilenumbruch umschalten",
"miTwitter": "&&Twitter",
"miUndo": "&&Rückgängig",
"miUserVoice": "&&Features anfordern",
"miViewDebug": "&&Debuggen",
"miViewExplorer": "&&Explorer",
"miViewExtensions": "E&&xtensions",
"miViewGit": "&&Git",
"miViewSearch": "&&Suchen",
"miZoomIn": "&&Vergrößern",
"miZoomOut": "Ver&&kleinern",
"miZoomReset": "&&Zoom zurücksetzen",
"okButton": "OK"
}
@@ -9,8 +9,7 @@
"cursorBlinking": "Steuert das Blinken der Cursoranimation. Gültige Werte sind \"blink\", \"visible\" und \"hidden\".",
"cursorStyle": "Steuert den Cursorstil. Gültige Werte sind \"block\" und \"line\".",
"detectIndentation": "Beim Öffnen einer Datei werden \"editor.tabSize\" und \"editor.insertSpaces\" basierend auf den Dateiinhalten erkannt.",
"dismissPeekOnEsc": "Vorschau-Editor beim Drücken von ESC schließen",
"editorConfigurationTitle": "Editor-Konfiguration",
"editorConfigurationTitle": "Editor",
"folding": "Steuert, ob für den Editor Codefaltung aktiviert ist.",
"fontFamily": "Steuert die Schriftfamilie.",
"fontLigatures": "Aktiviert Schriftartligaturen.",
@@ -25,9 +24,12 @@
"lineNumbers": "Steuert die Sichtbarkeit der Zeilennummern.",
"mouseWheelScrollSensitivity": "Ein Multiplikator, der für die Mausrad-Bildlaufereignisse \"deltaX\" und \"deltaY\" verwendet werden soll.",
"overviewRulerLanes": "Steuert die Anzahl von Dekorationen, die an derselben Position im Übersichtslineal angezeigt werden.",
"parameterHints": "Aktiviert Parameterhinweise.",
"quickSuggestions": "Steuert, ob Schnellvorschläge während der Eingabe angezeigt werden.",
"quickSuggestionsDelay": "Steuert die Verzögerung in ms für die Anzeige der Schnellvorschläge.",
"referenceInfos": "Steuert, ob der Editor Verweisinformationen zu den Modi anzeigt, die dies unterstützen.",
"renderControlCharacters": "Steuert, ob der Editor Steuerzeichen rendern soll.",
"renderIndentGuides": "Steuert, ob der Editor Einzugsführungslinien rendern soll.",
"renderWhitespace": "Steuert, ob der Editor Leerzeichen rendert.",
"roundedSelection": "Steuert, ob die Auswahl runde Ecken aufweist.",
"rulers": "Spalten, an denen vertikale Lineale angezeigt werden sollen",
@@ -35,6 +37,7 @@
"selectionClipboard": "Steuert, ob die primäre Linux-Zwischenablage unterstützt werden soll.",
"selectionHighlight": "Steuert, ob der Editor der Auswahl ähnelnde Übereinstimmungen hervorheben soll.",
"sideBySide": "Steuert, ob der Diff-Editor das Diff nebeneinander oder inline anzeigt.",
"stablePeek": "Vorschau-Editoren geöffnet lassen, auch wenn auf ihren Inhalt doppelgeklickt oder die ESC-TASTE gedrückt wird.",
"suggestOnTriggerCharacters": "Steuert, ob Vorschläge automatisch bei der Eingabe von Triggerzeichen angezeigt werden.",
"tabSize": "Die Anzahl der Leerzeichen, denen ein Tabstopp entspricht.",
"tabSize.errorMessage": "\"number\" wurde erwartet. Beachten Sie, dass der Wert \"auto\" durch die Einstellung \"editor.detectIndentation\" ersetzt wurde.",

Some files were not shown because too many files have changed in this diff Show More