mirror of
https://github.com/Microsoft/vscode
synced 2024-09-15 00:15:06 +00:00
Reverted back to iconv-lite dependancy until discovery why iconv module breaks the build.
This commit is contained in:
parent
51dd9749a4
commit
fd27a89df5
|
@ -13,7 +13,7 @@ var xml2js = require("xml2js");
|
|||
var glob = require("glob");
|
||||
var http = require("http");
|
||||
var util = require('gulp-util');
|
||||
var Iconv = require('iconv').Iconv;
|
||||
var iconv = require('iconv-lite');
|
||||
function log(message) {
|
||||
var rest = [];
|
||||
for (var _i = 1; _i < arguments.length; _i++) {
|
||||
|
@ -1019,10 +1019,9 @@ function createIslFile(base, originalFilePath, messages, language) {
|
|||
var tag = iso639_3_to_2[language];
|
||||
var basename = path.basename(originalFilePath);
|
||||
var filePath = path.join(base, path.dirname(originalFilePath), basename) + "." + tag + ".isl";
|
||||
var iconv = new Iconv('UTF-8', encodings[language]);
|
||||
return new File({
|
||||
path: filePath,
|
||||
contents: iconv.convert(new Buffer(content.join('\r\n'), 'utf8'))
|
||||
contents: iconv.encode(new Buffer(content.join('\r\n'), 'utf8'), encodings[language])
|
||||
});
|
||||
}
|
||||
function encodeEntities(value) {
|
||||
|
|
|
@ -15,7 +15,7 @@ import * as glob from 'glob';
|
|||
import * as http from 'http';
|
||||
|
||||
var util = require('gulp-util');
|
||||
var Iconv = require('iconv').Iconv;
|
||||
var iconv = require('iconv-lite');
|
||||
|
||||
function log(message: any, ...rest: any[]): void {
|
||||
util.log(util.colors.green('[i18n]'), message, ...rest);
|
||||
|
@ -1134,11 +1134,10 @@ function createIslFile(base: string, originalFilePath: string, messages: Map<str
|
|||
const tag = iso639_3_to_2[language];
|
||||
const basename = path.basename(originalFilePath);
|
||||
const filePath = `${path.join(base, path.dirname(originalFilePath), basename)}.${tag}.isl`;
|
||||
const iconv = new Iconv('UTF-8', encodings[language]);
|
||||
|
||||
return new File({
|
||||
path: filePath,
|
||||
contents: iconv.convert(new Buffer(content.join('\r\n'), 'utf8'))
|
||||
contents: iconv.encode(new Buffer(content.join('\r\n'), 'utf8'), encodings[language])
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
"version": "1.0.0",
|
||||
"devDependencies": {
|
||||
"@types/xml2js": "^0.0.33",
|
||||
"iconv": "^2.2.3",
|
||||
"xml2js": "^0.4.17"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue