Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
ac301ba0
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,发现更多精彩内容 >>
提交
ac301ba0
编写于
4月 06, 2017
作者:
M
Michel Kaporin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated cultures list to match Transifex. Code tidy up.
上级
394e3d2c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
21 deletion
+22
-21
build/lib/i18n.js
build/lib/i18n.js
+11
-11
build/lib/i18n.ts
build/lib/i18n.ts
+11
-10
未找到文件。
build/lib/i18n.js
浏览文件 @
ac301ba0
...
...
@@ -219,8 +219,8 @@ var vscodeLanguages = [
'
ita
'
];
var
iso639_3_to_2
=
{
'
chs
'
:
'
zh-
cn
'
,
'
cht
'
:
'
zh-
tw
'
,
'
chs
'
:
'
zh-
hans
'
,
'
cht
'
:
'
zh-
hant
'
,
'
csy
'
:
'
cs-cz
'
,
'
deu
'
:
'
de
'
,
'
enu
'
:
'
en
'
,
...
...
@@ -239,8 +239,8 @@ var iso639_3_to_2 = {
'
trk
'
:
'
tr
'
};
var
iso639_2_to_3
=
{
'
zh-
cn
'
:
'
chs
'
,
'
zh-
tw
'
:
'
cht
'
,
'
zh-
hans
'
:
'
chs
'
,
'
zh-
hant
'
:
'
cht
'
,
'
cs-cz
'
:
'
csy
'
,
'
de
'
:
'
deu
'
,
'
en
'
:
'
enu
'
,
...
...
@@ -480,7 +480,7 @@ exports.processNlsFiles = processNlsFiles;
function
prepareXlfFiles
(
projectName
,
extensionName
)
{
return
event_stream_1
.
through
(
function
(
file
)
{
if
(
!
file
.
isBuffer
())
{
log
(
'
Error
'
,
"
Failed to read component file:
"
+
file
.
relative
);
throw
new
Error
(
"
Failed to read component file:
"
+
file
.
relative
);
}
var
extension
=
path
.
extname
(
file
.
path
);
if
(
extension
===
'
.json
'
)
{
...
...
@@ -492,7 +492,7 @@ function prepareXlfFiles(projectName, extensionName) {
importModuleOrPackageJson
(
file
,
json
,
projectName
,
this
,
extensionName
);
}
else
{
log
(
'
Error
'
,
'
JSON format cannot be deduced.
'
);
throw
new
Error
(
"
JSON format cannot be deduced for
"
+
file
.
relative
+
"
.
"
);
}
}
else
if
(
extension
===
'
.isl
'
)
{
...
...
@@ -501,7 +501,7 @@ function prepareXlfFiles(projectName, extensionName) {
});
}
exports
.
prepareXlfFiles
=
prepareXlfFiles
;
var
editorProject
=
'
vscode-editor
'
,
workbenchProject
=
'
vscode-workbench
'
,
setupProject
=
'
vscode-setup
'
;
var
editorProject
=
'
vscode-editor
'
,
workbenchProject
=
'
vscode-workbench
'
,
extensionsProject
=
'
vscode-extensions
'
,
setupProject
=
'
vscode-setup
'
;
/**
* Ensure to update those arrays when new resources are pushed to Transifex.
* Used because Transifex does not have API method to pull all project resources.
...
...
@@ -821,13 +821,13 @@ function updateResource(project, slug, xlfFile, apiHostname, credentials) {
}
function
obtainProjectResources
(
projectName
)
{
var
resources
=
[];
if
(
projectName
===
'
vscode-editor
'
)
{
if
(
projectName
===
editorProject
)
{
resources
=
editorResources
;
}
else
if
(
projectName
===
'
vscode-workbench
'
)
{
else
if
(
projectName
===
workbenchProject
)
{
resources
=
workbenchResources
;
}
else
if
(
projectName
===
'
vscode-extensions
'
)
{
else
if
(
projectName
===
extensionsProject
)
{
var
extensionsToLocalize
=
glob
.
sync
(
'
./extensions/**/*.nls.json
'
).
map
(
function
(
extension
)
{
return
extension
.
split
(
'
/
'
)[
2
];
});
var
resourcesToPull_1
=
[];
extensionsToLocalize
.
forEach
(
function
(
extension
)
{
...
...
@@ -837,7 +837,7 @@ function obtainProjectResources(projectName) {
}
});
}
else
if
(
projectName
===
'
vscode-setup
'
)
{
else
if
(
projectName
===
setupProject
)
{
resources
.
push
({
name
:
'
setup_default
'
,
project
:
setupProject
});
}
return
resources
;
...
...
build/lib/i18n.ts
浏览文件 @
ac301ba0
...
...
@@ -279,8 +279,8 @@ const vscodeLanguages: string[] = [
];
const
iso639_3_to_2
:
Map
<
string
>
=
{
'
chs
'
:
'
zh-
cn
'
,
'
cht
'
:
'
zh-
tw
'
,
'
chs
'
:
'
zh-
hans
'
,
'
cht
'
:
'
zh-
hant
'
,
'
csy
'
:
'
cs-cz
'
,
'
deu
'
:
'
de
'
,
'
enu
'
:
'
en
'
,
...
...
@@ -300,8 +300,8 @@ const iso639_3_to_2: Map<string> = {
};
const
iso639_2_to_3
:
Map
<
string
>
=
{
'
zh-
cn
'
:
'
chs
'
,
'
zh-
tw
'
:
'
cht
'
,
'
zh-
hans
'
:
'
chs
'
,
'
zh-
hant
'
:
'
cht
'
,
'
cs-cz
'
:
'
csy
'
,
'
de
'
:
'
deu
'
,
'
en
'
:
'
enu
'
,
...
...
@@ -548,7 +548,7 @@ export function prepareXlfFiles(projectName?: string, extensionName?: string): T
return
through
(
function
(
file
:
File
)
{
if
(
!
file
.
isBuffer
())
{
log
(
'
Error
'
,
`Failed to read component file:
${
file
.
relative
}
`
);
throw
new
Error
(
`Failed to read component file:
${
file
.
relative
}
`
);
}
const
extension
=
path
.
extname
(
file
.
path
);
...
...
@@ -560,7 +560,7 @@ export function prepareXlfFiles(projectName?: string, extensionName?: string): T
}
else
if
(
PackageJsonFormat
.
is
(
json
)
||
ModuleJsonFormat
.
is
(
json
))
{
importModuleOrPackageJson
(
file
,
json
,
projectName
,
this
,
extensionName
);
}
else
{
log
(
'
Error
'
,
'
JSON format cannot be deduced.
'
);
throw
new
Error
(
`JSON format cannot be deduced for
${
file
.
relative
}
.`
);
}
}
else
if
(
extension
===
'
.isl
'
)
{
importIsl
(
file
,
this
);
...
...
@@ -571,6 +571,7 @@ export function prepareXlfFiles(projectName?: string, extensionName?: string): T
const
editorProject
:
string
=
'
vscode-editor
'
,
workbenchProject
:
string
=
'
vscode-workbench
'
,
extensionsProject
:
string
=
'
vscode-extensions
'
,
setupProject
:
string
=
'
vscode-setup
'
;
/**
...
...
@@ -913,11 +914,11 @@ function updateResource(project: string, slug: string, xlfFile: File, apiHostnam
function
obtainProjectResources
(
projectName
:
string
):
Resource
[]
{
let
resources
:
Resource
[]
=
[];
if
(
projectName
===
'
vscode-editor
'
)
{
if
(
projectName
===
editorProject
)
{
resources
=
editorResources
;
}
else
if
(
projectName
===
'
vscode-workbench
'
)
{
}
else
if
(
projectName
===
workbenchProject
)
{
resources
=
workbenchResources
;
}
else
if
(
projectName
===
'
vscode-extensions
'
)
{
}
else
if
(
projectName
===
extensionsProject
)
{
let
extensionsToLocalize
:
string
[]
=
glob
.
sync
(
'
./extensions/**/*.nls.json
'
).
map
(
extension
=>
extension
.
split
(
'
/
'
)[
2
]);
let
resourcesToPull
:
string
[]
=
[];
...
...
@@ -927,7 +928,7 @@ function obtainProjectResources(projectName: string): Resource[] {
resources
.
push
({
name
:
extension
,
project
:
projectName
});
}
});
}
else
if
(
projectName
===
'
vscode-setup
'
)
{
}
else
if
(
projectName
===
setupProject
)
{
resources
.
push
({
name
:
'
setup_default
'
,
project
:
setupProject
});
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录