Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
4bd5ff8c
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4bd5ff8c
编写于
7月 19, 2016
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
reduce logging output during build
上级
09b00121
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
33 addition
and
15 deletion
+33
-15
.travis.yml
.travis.yml
+3
-0
appveyor.yml
appveyor.yml
+1
-0
build/gulpfile.common.js
build/gulpfile.common.js
+3
-1
build/lib/i18n.js
build/lib/i18n.js
+11
-6
build/lib/i18n.ts
build/lib/i18n.ts
+15
-8
未找到文件。
.travis.yml
浏览文件 @
4bd5ff8c
...
...
@@ -5,6 +5,9 @@ os:
-
linux
-
osx
env
:
-
VSCODE_BUILD_VERBOSE=true
addons
:
apt
:
sources
:
...
...
appveyor.yml
浏览文件 @
4bd5ff8c
environment
:
ATOM_SHELL_INTERNAL_RUN_AS_NODE
:
1
VSCODE_BUILD_VERBOSE
:
true
install
:
-
ps
:
Install-Product node 5.10.1 x64
...
...
build/gulpfile.common.js
浏览文件 @
4bd5ff8c
...
...
@@ -143,7 +143,9 @@ exports.optimizeTask = function(opts) {
var
filteredResources
=
[];
filteredResources
=
filteredResources
.
concat
(
resources
);
result
.
cssInlinedResources
.
forEach
(
function
(
resource
)
{
log
(
'
optimizer
'
,
'
excluding inlined:
'
+
resource
);
if
(
process
.
env
[
'
VSCODE_BUILD_VERBOSE
'
])
{
log
(
'
optimizer
'
,
'
excluding inlined:
'
+
resource
);
}
filteredResources
.
push
(
'
!
'
+
resource
);
});
gulp
.
src
(
filteredResources
,
{
base
:
'
out-build
'
}).
pipe
(
resourcesStream
);
...
...
build/lib/i18n.js
浏览文件 @
4bd5ff8c
...
...
@@ -14,7 +14,7 @@ function log(message) {
for
(
var
_i
=
1
;
_i
<
arguments
.
length
;
_i
++
)
{
rest
[
_i
-
1
]
=
arguments
[
_i
];
}
util
.
log
.
apply
(
util
,
[
util
.
colors
.
cya
n
(
'
[i18n]
'
),
message
].
concat
(
rest
));
util
.
log
.
apply
(
util
,
[
util
.
colors
.
gree
n
(
'
[i18n]
'
),
message
].
concat
(
rest
));
}
var
LocalizeInfo
;
(
function
(
LocalizeInfo
)
{
...
...
@@ -187,7 +187,9 @@ function processCoreBundleFormat(fileHeader, json, emitter) {
if
(
!
language
.
iso639_2
)
{
return
;
}
log
(
"
Generating nls bundles for:
"
+
language
.
iso639_2
);
if
(
process
.
env
[
'
VSCODE_BUILD_VERBOSE
'
])
{
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
'
);
...
...
@@ -200,7 +202,9 @@ function processCoreBundleFormat(fileHeader, json, emitter) {
messages
=
JSON
.
parse
(
content
);
}
else
{
// log(`No localized messages found for module ${module}. Using default messages.`);
if
(
process
.
env
[
'
VSCODE_BUILD_VERBOSE
'
])
{
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
;
}
...
...
@@ -215,7 +219,9 @@ function processCoreBundleFormat(fileHeader, json, emitter) {
}
var
message
=
messages
[
key
];
if
(
!
message
)
{
log
(
"
No localized message found for key
"
+
key
+
"
in module
"
+
module
+
"
. Using default message.
"
);
if
(
process
.
env
[
'
VSCODE_BUILD_VERBOSE
'
])
{
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
;
}
...
...
@@ -245,10 +251,9 @@ function processCoreBundleFormat(fileHeader, json, emitter) {
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
.
"
);
log
(
key
+
"
has
"
+
value
+
"
untranslated strings
.
"
);
});
vscodeLanguages
.
forEach
(
function
(
language
)
{
var
iso639_2
=
iso639_3_to_2
[
language
];
...
...
build/lib/i18n.ts
浏览文件 @
4bd5ff8c
...
...
@@ -12,8 +12,9 @@ import File = require('vinyl');
import
*
as
Is
from
'
is
'
;
var
util
=
require
(
'
gulp-util
'
);
function
log
(
message
:
any
,
...
rest
:
any
[]):
void
{
util
.
log
(
util
.
colors
.
cya
n
(
'
[i18n]
'
),
message
,
...
rest
);
util
.
log
(
util
.
colors
.
gree
n
(
'
[i18n]
'
),
message
,
...
rest
);
}
interface
Map
<
V
>
{
...
...
@@ -211,7 +212,10 @@ function processCoreBundleFormat(fileHeader:string, json: BundledFormat, emitter
return
;
}
log
(
`Generating nls bundles for:
${
language
.
iso639_2
}
`
);
if
(
process
.
env
[
'
VSCODE_BUILD_VERBOSE
'
])
{
log
(
`Generating nls bundles for:
${
language
.
iso639_2
}
`
);
}
statistics
[
language
.
iso639_2
]
=
0
;
let
localizedModules
:
Map
<
string
[]
>
=
Object
.
create
(
null
);
let
cwd
=
path
.
join
(
languageDirectory
,
language
.
name
,
'
src
'
);
...
...
@@ -223,7 +227,9 @@ function processCoreBundleFormat(fileHeader:string, json: BundledFormat, emitter
let
content
=
stripComments
(
fs
.
readFileSync
(
i18nFile
,
'
utf8
'
));
messages
=
JSON
.
parse
(
content
);
}
else
{
// log(`No localized messages found for module ${module}. Using default messages.`);
if
(
process
.
env
[
'
VSCODE_BUILD_VERBOSE
'
])
{
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
;
}
...
...
@@ -237,7 +243,9 @@ function processCoreBundleFormat(fileHeader:string, json: BundledFormat, emitter
}
let
message
:
string
=
messages
[
key
];
if
(
!
message
)
{
log
(
`No localized message found for key
${
key
}
in module
${
module
}
. Using default message.`
);
if
(
process
.
env
[
'
VSCODE_BUILD_VERBOSE
'
])
{
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
;
}
...
...
@@ -267,10 +275,9 @@ function processCoreBundleFormat(fileHeader:string, json: BundledFormat, emitter
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
(
key
=>
{
let
value
=
statistics
[
key
];
log
(
`
\t
${
value
}
untranslated strings for locale
${
key
}
found
.`
);
log
(
`
${
key
}
has
${
value
}
untranslated strings
.`
);
});
vscodeLanguages
.
forEach
(
language
=>
{
let
iso639_2
=
iso639_3_to_2
[
language
];
...
...
@@ -279,7 +286,7 @@ function processCoreBundleFormat(fileHeader:string, json: BundledFormat, emitter
}
else
{
let
stats
=
statistics
[
iso639_2
];
if
(
Is
.
undef
(
stats
))
{
log
(
`\tNo translations found for language
${
language
}
. Using default language instead.`
)
log
(
`\tNo translations found for language
${
language
}
. Using default language instead.`
)
;
}
}
});
...
...
@@ -293,7 +300,7 @@ export function processNlsFiles(opts:{fileHeader:string;}): ThroughStream {
if
(
file
.
isBuffer
())
{
json
=
JSON
.
parse
(
file
.
contents
.
toString
(
'
utf8
'
));
}
else
{
this
.
emit
(
'
error
'
,
`Failed to read component file:
${
file
.
relative
}
`
)
this
.
emit
(
'
error
'
,
`Failed to read component file:
${
file
.
relative
}
`
)
;
}
if
(
BundledFormat
.
is
(
json
))
{
processCoreBundleFormat
(
opts
.
fileHeader
,
json
,
this
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录