Skip to content

Commit 3b9c10d

Browse files
committed
Evolution
1 parent 0e7af24 commit 3b9c10d

File tree

2 files changed

+46
-46
lines changed

2 files changed

+46
-46
lines changed

assets/javascripts/swift-evolution.js

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -55,69 +55,69 @@ const State = Object.freeze({
5555
*/
5656
const states = {
5757
[State.awaitingReview]: {
58-
name: 'Awaiting Review',
59-
shortName: 'Awaiting Review',
58+
name: '等待审核',
59+
shortName: '等待审核',
6060
className: 'awaiting-review',
6161
count: 0
6262
},
6363
[State.scheduledForReview]: {
64-
name: 'Scheduled for Review',
65-
shortName: 'Scheduled',
64+
name: '已排期审核',
65+
shortName: '已排期',
6666
className: 'scheduled-for-review',
6767
count: 0
6868
},
6969
[State.activeReview]: {
70-
name: 'Active Review',
71-
shortName: 'Active Review',
72-
statusPrefix: 'In ',
70+
name: '正在审核',
71+
shortName: '审核中',
72+
statusPrefix: '正在',
7373
className: 'active-review',
7474
count: 0
7575
},
7676
[State.returnedForRevision]: {
77-
name: 'Returned for Revision',
78-
shortName: 'Returned',
77+
name: '需要修改',
78+
shortName: '需修改',
7979
className: 'returned-for-revision',
8080
count: 0
8181
},
8282
[State.withdrawn]: {
83-
name: 'Withdrawn',
84-
shortName: 'Withdrawn',
83+
name: '已撤回',
84+
shortName: '已撤回',
8585
className: 'withdrawn',
8686
count: 0
8787
},
8888
[State.accepted]: {
89-
name: 'Accepted',
90-
shortName: 'Accepted',
89+
name: '已接受',
90+
shortName: '已接受',
9191
className: 'accepted',
9292
count: 0
9393
},
9494
[State.acceptedWithRevisions]: {
95-
name: 'Accepted with revisions',
96-
shortName: 'Accepted',
95+
name: '修改后接受',
96+
shortName: '已接受',
9797
className: 'accepted-with-revisions',
9898
count: 0
9999
},
100100
[State.rejected]: {
101-
name: 'Rejected',
102-
shortName: 'Rejected',
101+
name: '已拒绝',
102+
shortName: '已拒绝',
103103
className: 'rejected',
104104
count: 0
105105
},
106106
[State.implemented]: {
107-
name: 'Implemented',
108-
shortName: 'Implemented',
107+
name: '已实现',
108+
shortName: '已实现',
109109
className: 'implemented',
110110
count: 0
111111
},
112112
[State.previewing]: {
113-
name: 'Previewing',
114-
shortName: 'Previewing',
113+
name: '预览中',
114+
shortName: '预览中',
115115
className: 'previewing',
116116
count: 0
117117
},
118118
[State.error]: {
119-
name: 'Error',
120-
shortName: 'Error',
119+
name: '错误',
120+
shortName: '错误',
121121
className: 'error',
122122
count: 0
123123
}
@@ -159,10 +159,10 @@ function init() {
159159
})
160160

161161
req.addEventListener('error', function (e) {
162-
document.querySelector('#proposals-count-number').innerText = 'Proposal data failed to load.'
162+
document.querySelector('#proposals-count-number').innerText = '提案数据无法加载'
163163
})
164164

165-
document.querySelector('#proposals-count-number').innerHTML = 'Loading…'
165+
document.querySelector('#proposals-count-number').innerHTML = '加载中……'
166166
req.open('get', EVOLUTION_METADATA_URL)
167167
req.send()
168168
}
@@ -379,7 +379,7 @@ function renderProposals() {
379379
function renderAuthors(authors) {
380380
return html('div', { className: 'authors proposal-detail' }, [
381381
html('div', { className: 'proposal-detail-label' },
382-
authors.length > 1 ? 'Authors: ' : 'Author: '
382+
authors.length > 1 ? '作者: ' : '作者: '
383383
),
384384
html('div', { className: 'proposal-detail-value' },
385385
personNodesForPersonArray(authors))
@@ -390,7 +390,7 @@ function renderAuthors(authors) {
390390
function renderReviewManagers(reviewManagers) {
391391
return html('div', { className: 'review-managers proposal-detail' }, [
392392
html('div', { className: 'proposal-detail-label' },
393-
reviewManagers.length > 1 ? 'Review Managers: ' : 'Review Manager: '
393+
reviewManagers.length > 1 ? '审核管理员: ' : '审核管理员: '
394394
),
395395
html('div', { className: 'proposal-detail-value' },
396396
personNodesForPersonArray(reviewManagers))
@@ -441,7 +441,7 @@ function renderImplementation(implementations) {
441441

442442
implNodes = _joinNodes(implNodes, ', ')
443443

444-
var label = 'Implementation: '
444+
var label = '实现:'
445445

446446
return html('div', { className: 'proposal-detail' }, [
447447
html('div', { className: 'proposal-detail-label' }, [label]),
@@ -455,7 +455,7 @@ function renderImplementation(implementations) {
455455
function renderUpcomingFeatureFlag(upcomingFeatureFlag) {
456456
return html('div', { className: 'proposal-detail' }, [
457457
html('div', { className: 'proposal-detail-label' }, [
458-
'Upcoming Feature Flag: '
458+
'即将推出的功能标记:'
459459
]),
460460
html('div', { className: 'proposal-detail-value' }, [
461461
upcomingFeatureFlag
@@ -467,11 +467,11 @@ function renderUpcomingFeatureFlag(upcomingFeatureFlag) {
467467
function renderPreview() {
468468
return html('div', { className: 'proposal-detail' }, [
469469
html('div', { className: 'proposal-detail-label' }, [
470-
'Preview: '
470+
'预览: '
471471
]),
472472
html('div', { className: 'proposal-detail-value' }, [
473473
html('a', { href: 'https://github.com/apple/swift-standard-library-preview', target: '_blank' },
474-
'Standard Library Preview'
474+
'标准库预览'
475475
)
476476
])
477477
])
@@ -481,7 +481,7 @@ function renderPreview() {
481481
function renderVersion(version) {
482482
return html('div', { className: 'proposal-detail' }, [
483483
html('div', { className: 'proposal-detail-label' }, [
484-
'Implemented In: '
484+
'实现版本: '
485485
]),
486486
html('div', { className: 'proposal-detail-value' }, [
487487
'Swift ' + version
@@ -490,10 +490,10 @@ function renderVersion(version) {
490490
}
491491

492492
/** For some proposal states like `.activeReview`, it helps to see the status in the same details list. */
493-
function renderStatus (status) {
493+
function renderStatus(status) {
494494
return html('div', { className: 'proposal-detail' }, [
495495
html('div', { className: 'proposal-detail-label' }, [
496-
'Status: '
496+
'状态: '
497497
]),
498498
html('div', { className: 'proposal-detail-value' }, [
499499
states[status.state].name
@@ -505,8 +505,8 @@ function renderStatus (status) {
505505
* Review periods are ISO-8601-style 'YYYY-MM-DD' dates.
506506
*/
507507
function renderReviewPeriod (status) {
508-
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July',
509-
'August', 'September', 'October', 'November', 'December'
508+
var months = ['一月', '二月', '三月', '四月', '五月', '六月', '七月',
509+
'八月', '九月', '十月', '十一月', '十二月'
510510
]
511511

512512
var start = new Date(status.start)
@@ -1121,12 +1121,12 @@ function updateStatusFilterToggleText(filterCount) {
11211121
if (filterCount === 0) {
11221122
var panel = document.querySelector('.expandable')
11231123
if (panel.classList.contains('expanded')) {
1124-
container.innerText = 'Hide Filters'
1124+
container.innerText = '隐藏筛选'
11251125
} else {
1126-
container.innerText = 'Show Filters'
1126+
container.innerText = '显示筛选'
11271127
}
11281128
} else {
1129-
container.innerText = filterCount + ' Filter' + ((filterCount !== 1) ? 's' : '')
1129+
container.innerText = filterCount + '个筛选'
11301130
}
11311131
}
11321132

@@ -1138,15 +1138,15 @@ function updateStatusFilterToggleText(filterCount) {
11381138
function updateProposalsCount (count) {
11391139
// Calculate and set value of proposal count span
11401140
var numberField = document.querySelector('#proposals-count-number')
1141-
var baseString = (count.toString() + ' proposal' + (count !== 1 ? 's' : ''))
1141+
var baseString = (count.toString() + '个提案')
11421142
numberField.innerHTML = baseString
11431143

11441144
// Calculate and set value of flag filter description span
11451145
var flagFilterDescription = document.querySelector('#flag-filter-description')
11461146
if (upcomingFeatureFlagFilterEnabled) {
11471147
var anchorTag = '<a href="' + UFF_INFO_URL + '">'
1148-
var uffText = 'upcoming feature flag' + (count !== 1 ? 's' : '')
1149-
flagFilterDescription.innerHTML = " with "+ (count !== 1 ? '' : 'an ') + anchorTag + uffText + '</a>'
1148+
var uffText = '即将推出的功能标记'
1149+
flagFilterDescription.innerHTML = "带有" + anchorTag + uffText + '</a>'
11501150
} else {
11511151
flagFilterDescription.innerHTML = ""
11521152
}
@@ -1187,14 +1187,14 @@ function descriptionForSelectedStatuses(selectedOptions) {
11871187
let allExceptThreshold = totalCount - ALL_EXCEPT_MAX_COUNT
11881188

11891189
if (selectedCount === 0 || selectedCount === totalCount) {
1190-
return "All Statuses"
1190+
return "所有状态"
11911191
} else if (selectedCount >= allExceptThreshold) {
11921192
let unselectedOptions = allStateOptions.filter(function (option) {
11931193
return selectedOptions.indexOf(option) === -1
11941194
})
1195-
return "All Statuses Except " + listStringForStatuses(unselectedOptions, "and", false)
1195+
return "除了" + listStringForStatuses(unselectedOptions, "", false) + "的所有状态"
11961196
} else {
1197-
return listStringForStatuses(selectedOptions, "or", true)
1197+
return listStringForStatuses(selectedOptions, "", true)
11981198
}
11991199
}
12001200

swift-evolution/_dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<section class="evolution-dashboard">
22
<div class="search-bar">
3-
<input id="search-filter" class="filter" title="Search proposals" placeholder="Search" type="search" />
3+
<input id="search-filter" class="filter" title="搜索提案" placeholder="搜索" type="search" />
44

55
<div class="filter-container">
66
<span role="button" id="status-filter-button" class="filter-button" aria-label="Toggle status filtering options" aria-pressed="false" tabindex="0" title="Toggle proposal status filter">

0 commit comments

Comments
 (0)