-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathindex.html
490 lines (426 loc) · 20.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Language enablement issue tracker</title>
<meta name="description" content="Lists open type layout issues in i18n Activity github repositories." />
<script>
var f = { }
// AUTHORS should fill in these assignments:
f.directory = 'i18n-wg/repostatus/'+'/'; // the path to this file, not including /International or the file name
f.filename = 'reviews'; // the file name WITHOUT extensions
f.authors = 'Richard Ishida, W3C'; // author(s) and affiliations
f.previousauthors = ''; // as above
f.modifiers = ''; // people making substantive changes, and their affiliation
f.searchString = 'reviews-openissues'; // blog search string - usually the filename without extensions
f.firstPubDate = '2016-03-16'; // date of the first publication of the document (after review)
f.lastSubstUpdate = { date:'2016-07-15', time:'07:18'} // date and time of latest substantive changes to this document
f.status = 'notreviewed'; // should be one of draft, review, published, notreviewed or obsolete
f.path = 'https://w3c.github.io/i18n-drafts/' // what you need to prepend to a URL to get to the /International directory
// AUTHORS AND TRANSLATORS should fill in these assignments:
f.thisVersion = { date:'2016-07-15', time:'07:18'} // date and time of latest edits to this document/translation
f.contributors = ''; // people providing useful contributions or feedback during review or at other times
// also make sure that the lang attribute on the html tag is correct!
// TRANSLATORS should fill in these assignments:
f.translators = 'xxxNAME, ORG'; // translator(s) and their affiliation - a elements allowed, but use double quotes for attributes
f.breadcrumb = 'characters';
f.additionalLinks = ''
</script>
<script src="index-data/translations.js"> </script>
<script src="https://w3c.github.io/i18n-drafts/javascript/doc-structure/article-dt.js"> </script>
<script src="https://w3c.github.io/i18n-drafts/javascript/boilerplate-text/boilerplate-en.js"></script><!--TRANSLATORS must change -en to the subtag for their language!-->
<script src="https://w3c.github.io/i18n-drafts/javascript/doc-structure/sitepage.js"> </script>
<script src="https://w3c.github.io/i18n-drafts/javascript/articletoc-html5.js"></script>
<script src="index-data/label-list.js"></script>
<link rel="stylesheet" href="https://w3c.github.io/i18n-drafts/style/sitepage-2016.css" type="text/css" />
<link rel="stylesheet" href="index-data/local.css" type="text/css" />
<link rel="copyright" href="#copyright"/>
<script>
// Note that the code is designed to pull a maximum of 200 issues - for more, change maxpages
// It will only display issues with labels that correspond to those defined in the labels variable
// this means that if a new label is added, this code needs to be changed
// we could probably fix this by ignoring pending, close and track labels and constituting the list of labels as needed
// but we'd have to be careful to ignore other labels that are added other than spec labels
// Define the repository owner
var owner = 'w3c';
var sections = {}
//var labelsKeys = Object.keys(labels)
//var labelsLength = labelsKeys.length
var debug = false
var issues = []
var maxpages = 5
</script>
</head>
<body>
<header>
<nav id="mainNavigation"></nav>
<script>document.getElementById('mainNavigation').innerHTML = mainNavigation</script>
</header>
<div class="content">
<h1>Language enablement issue tracker</h1>
<section id="sidebarExtras">
<h2 class="notoc">Useful links</h2>
<ul>
<li><a class="print" href="https://github.com/w3c/i18n-activity/issues">Tracker issues on Github</a></li>
<li><a class="print" href="https://w3c.github.io/typography/">Language enablement index</a></li>
<li><a class="print" href="https://w3c.github.io/i18n-activity/reviews/">Review tracker</a></li>
</ul>
<h2 class="notoc">Filter results</h2>
<p>Click to filter items by type:</p>
<ul id="filterList">
<li><a href="#" onclick="filterByLabel('type-info-request')"><span style="padding: 0 .5em;background-color:#D93F0B;"> </span> type-info-request</a></li>
<li><a href="#" onclick="filterByLabel('spec-type-issue')"><span style="padding: 0 .5em;background-color: #006b65;"> </span> spec-type-issue</a></li>
<li><a href="#" onclick="filterByLabel('browser-type-bug')"><span style="padding: 0 .5em;background-color: #0052CC;"> </span> browser-type-bug</a></li>
<li><a href="#" onclick="clearFilters()"><span style="padding: 0 .5em;background-color: white; border: 1px solid #ccc;"> </span> Clear filters</a></li>
</ul>
<p>Click to filter items by layout group:</p>
<ul id="scriptFilters">
<script>
var scriptsOut = ''
for (let item of scriptLabels) scriptsOut += '<li><a href="#" onclick="filterByLabel(\''+item+'\')"><span style="padding: 0 .5em;background-color:#d4c5f9;"> </span> '+labelName[item]+'</a></li>'
document.getElementById('scriptFilters').innerHTML = scriptsOut
</script>
<li><a href="#" onclick="clearFilters()"><span style="padding: 0 .5em;background-color: white; border: 1px solid #ccc;"> </span> Clear filters</a></li>
</ul>
</section>
<section>
<p style="color:red; font-size:120%; line-height: 1.4;">This page is no longer used, and is out of date. This information it contained can be found by visiting the <a href="https://www.w3.org/International/">Internationalization home page</a> and following the links to the various LE (Language Enablement) repositories. The home page for each of those repositories contains links under "Help Wanted!" to questions, and under "Discussions" links to other types of information.</p>
<p>This page tracks issues related to language support on the Web. Issues listed may be requests to a local community for information about the behaviour of their writing system, or requests for improvements to either specs or browser implementations.</p>
<p>These issues are also linked to from the <a href="https://w3c.github.io/typography/">Language enablement index</a>.</p>
<p>The sections and items within those sections are ordered by the last modified date of the items in the <em>tracker</em> repository (not the discussions). The mostly recently changed items appear highest. The link on the left of each line links directly to the issue where the discussion is taking place. The date indicates when the <em>tracker</em> item was modified, and the right-hand column links to that item in <a href="https://github.com/w3c/i18n-activity/issues">the i18n-activity github repo</a>.</p>
<p>You can filter the list in the URL. Add one or two of the filter names in the right-hand column after <code class="kw" translate="no">?filter=</code>. If adding two, separate them with <code class="kw" translate="no">+</code>.</p>
<p id="total">Loading data...</p>
</section>
<section id="rawdata">
</section>
<p><button onclick="dumpList();">Make list</button> <button onclick="dumpByLabel('type-info-request');">List info requests</button> <button onclick="dumpByLabel('spec-type-issue');">List spec issues</button> <button onclick="dumpByLabel('browser-type-bug');">List browser bugs</button> <button onclick="dumpByLabel('close?');">List close</button></p>
<p id="dumparea" style="display:none;"><textarea style="width: 100%; height: 80px;" id="dumpfield"></textarea></p>
<script>
var totals=0
var counter=maxpages
var labelList = []
function getAllData () {
for (var p=1;p<maxpages+1;p++) fetchIssues(p)
var timer = setInterval(function() {
if (counter === 0) {
clearInterval(timer)
if (debug) console.log('In getAllData')
if (debug) console.log('Finished.','Issue length:',issues.length,'Sections:',sections)
// group issues by label, adding to the labels array
if (debug) console.log('Following is a list of i: labels found:')
for (var i=0; i<issues.length; i++) {
if (issues[i].labels) {
for (var l=0;l<issues[i].labels.length;l++) { // for each label in that issue
if (issues[i].labels[l].name.startsWith('i:')) {
sLabelFound = issues[i].labels[l].name.replace(/^i:/,'')
if (sections[sLabelFound]) sections[sLabelFound].push(issues[i])
else {
sections[sLabelFound] = []
sections[sLabelFound].push(issues[i])
labelList.push(sLabelFound)
}
if (debug) console.log(sLabelFound)
}
// for (var l=0;l<issues[i].labels.length;l++) {
// if (labels[issues[i].labels[l].name]) labels[issues[i].labels[l].name].push(issues[i])
}
}
}
if (debug) console.log('Sections:',sections)
if (debug) console.log('List of labels',labelList)
checkDates()
}
else if (debug) console.log(counter)
}, 50)
}
// Grab and present the issue list from GitHub
function fetchIssues(page) {
var request = new XMLHttpRequest();
request.open('get','https://api.github.com/repos/w3c/i18n-activity/issues?per_page=100&page='+page)
request.onload = function () {
var temp = JSON.parse(request.responseText)
for (var i=0;i<temp.length;i++) {
issues.push(temp[i])
}
totals += issues.length
if (debug) console.log('In fetchIssues:')
if (debug) console.log('Issues',issues.length,'Totals',totals,'Page',page,'Counter',counter)
counter--
}
request.send();
}
function checkDates () {
// figure out the most-recent-first order for displaying labels
dates = {}
var instance = 0 // this is used to distinguish issues with the same created_at timestamp
for (label in sections) {
if (sections[label].length > 0) {
// find the newest date
var newest = sections[label][0]['created_at']
for (x=0;x<sections[label].length;x++) {
if (sections[label][x]['created_at'] > newest) newest = sections[label][x]['created_at']
}
dates[newest+instance] = label
instance++
}
}
var keys = Object.keys(dates)
keys.sort().reverse()
// display the labels in that order
for (var i=0;i<keys.length;i++) {
var labelname = dates[keys[i]]
displayRepo(labelname)
}
showGet()
}
// Display repository information
function displayRepo(label) {
// Add a container to put the repository info and issues in
var table, tr, td, a, updated, toc, span
var labelSection = document.createElement('section')
// Add a heading
var labelLink = document.createElement('a')
labelLink.setAttribute('href', '#'+label)
labelLink.innerHTML = sectionNames[label]
var labelHeader = document.createElement('h2')
labelHeader.id = label
labelHeader.appendChild(labelLink);
labelSection.appendChild(labelHeader);
table = document.createElement('table')
// figure out the most-recently-updated order for displaying issues
var idates = {}
var instance = 0 // this is used to distinguish issues with the same created_at timestamp
for (issue in sections[label]) {
idates[sections[label][issue]['created_at']+instance] = sections[label][issue]
instance++
}
var ikeys = Object.keys(idates)
ikeys.sort().reverse()
// display issues in order of most recently updated
for (var i=0;i<ikeys.length;i++) {
var issueData = idates[ikeys[i]]
// get the url of the actual issue, if there is a § marker
var urlpointer = issueData.body.match(/§ [^\r]+/)
if (urlpointer) {
urlpointer = urlpointer[0].replace(/§ /,'').trim()
temp = urlpointer.split(' ')
urlpointer = temp[0]
}
else urlpointer = issueData['html_url']
tr = document.createElement('tr')
/*
td = document.createElement('td')
td.title = 'Issue number'
td.textContent = issueData['number']
tr.appendChild(td)
*/
td = document.createElement('td')
// find type labels
for (var j=0;j<issueData.labels.length;j++) {
if (issueData.labels[j].name == 'type-info-request' || issueData.labels[j].name == 'spec-type-issue' || issueData.labels[j].name == 'browser-type-bug') {
span = document.createElement('span')
span.setAttribute('style', 'background-color:#'+issueData.labels[j].color)
span.title = issueData.labels[j].name
span.className = 'labels'
span.textContent = issueData.labels[j].name+' '
td.appendChild(span)
}
}
// find script labels
for (var j=0;j<issueData.labels.length;j++) {
if (scriptLabels.has(issueData.labels[j].name)) {
//if (issueData.labels[j].name == 'arabic' || issueData.labels[j].name == 'japanese' || issueData.labels[j].name == 'han' || issueData.labels[j].name == 'hangul' || issueData.labels[j].name == 'thai') {
span = document.createElement('span')
span.setAttribute('style', 'background-color:#'+issueData.labels[j].color)
span.title = issueData.labels[j].name
span.className = 'labels'
span.textContent = issueData.labels[j].name+' '
td.appendChild(span)
}
}
// find close labels
for (var j=0;j<issueData.labels.length;j++) {
if (issueData.labels[j].name == 'close?') {
span = document.createElement('span')
span.setAttribute('style', 'background-color:#91fc76')
span.title = issueData.labels[j].name
span.className = 'labels'
span.textContent = issueData.labels[j].name+' '
td.appendChild(span)
}
}
a = document.createElement('a')
//a.href = issueData['html_url']
a.href = urlpointer
a.target = '_blank'
a.textContent = issueData['title']
td.appendChild(a)
tr.appendChild(td)
td = document.createElement('td')
td.className = 'date'
td.title = 'Date last updated'
updated = new Date(issueData['created_at'])
td.textContent = updated.getFullYear()+'-'+updated.getMonth()+'-'+updated.getDate()
td.textContent = convertDate(updated)
tr.appendChild(td)
td = document.createElement('td')
td.title = 'Issue number in the tracker repo'
td.className = 'trackerId'
a = document.createElement('a')
a.href = 'https://github.com/w3c/i18n-activity/issues/'+issueData['number']
a.target = '_blank'
a.textContent = issueData['number']
td.appendChild(a)
tr.appendChild(td)
table.appendChild(tr)
}
labelSection.appendChild(table)
// Add the label header to the DOM
document.getElementById("rawdata").appendChild(labelSection)
// tally the issues on the page
trs = document.querySelectorAll('tr')
document.getElementById('total').textContent = "There are "+trs.length+" issues."
}
function convertDate (date) {
// date is a date object
out = ''
switch (date.getUTCMonth()) {
case 0: out += 'Jan'; break
case 1: out += 'Feb'; break
case 2: out += 'Mar'; break
case 3: out += 'Apr'; break
case 4: out += 'May'; break
case 5: out += 'Jun'; break
case 6: out += 'Jul'; break
case 7: out += 'Aug'; break
case 8: out += 'Sep'; break
case 9: out += 'Oct'; break
case 10: out += 'Nov'; break
case 11: out += 'Dec'; break
}
out += ' '+date.getDate()+', '+date.getFullYear()
return out
}
function dumpList () {
// writes a list of issues to the textarea at the bottom of the page
var sections = document.querySelectorAll('section')
console.log(sections.length)
var out = ''
for (s=3;s<sections.length;s++) {
if (sections[s].querySelector('h2') === null) continue
var h2 = sections[s].querySelector('h2').textContent
var issues = sections[s].querySelectorAll('a')
out += h2+"\n"
for (var i=1;i<issues.length;i++) {
out += '• ' + issues[i].textContent+'\n '+issues[i].href+'\n\n'
}
out += '\n\n'
}
document.getElementById('dumparea').style.display = 'block'
document.getElementById('dumpfield').value = out
document.getElementById('dumpfield').select()
}
function dumpByLabel (label) {
// writes a list of pending issues to the textarea at the bottom of the page
// label: either 'pending' or 'closed'
var sections = document.querySelectorAll('section')
console.log(sections.length)
var out = ''
for (s=3;s<sections.length;s++) {
if (sections[s].querySelector('h2') === null) continue
var h2 = sections[s].querySelector('h2').textContent
var issues = sections[s].querySelectorAll('td')
// if this section doesn't contain pending items move on
var labelFound = false
var spans = sections[s].querySelectorAll('span')
for (k=0;k<spans.length;k++) {
if (spans[k].title === label) {
labelFound = true
}
}
if (! labelFound) continue
out += h2+"\n"
for (var i=1;i<issues.length;i++) {
var spans = issues[i].querySelectorAll('span')
for (j=0;j<spans.length;j++) {
if (spans[j].title === label) {
var a = issues[i].querySelector('a')
out += '• ' + a.textContent+'\n '+a.href+'\n\n'
}
}
}
out += '\n\n'
}
document.getElementById('dumparea').style.display = 'block'
document.getElementById('dumpfield').value = out
document.getElementById('dumpfield').select()
}
function filterByLabel (label) {
// filters page contents to show only those items with label specified
// label: either 'type-info-request' or 'spec-type-issue' or 'browser-type-bug'
var sections = document.querySelectorAll('section')
console.log(sections.length)
// clear all previous filters
//var trs = document.querySelectorAll('tr')
//for (let i=0;i<trs.length;i++) trs[i].classList.remove('hidden')
//for (let s=0;s<sections.length;s++) sections[s].classList.remove('hidden')
//if (label === 'clear') {
// var trsTotal = document.querySelectorAll('tr')
// document.getElementById('total').textContent = "There are "+trsTotal.length+" issues."
// return
// }
for (let s=3;s<sections.length;s++) {
var secLabelFound = false
if (sections[s].querySelector('h2') === null) continue
var issues = sections[s].querySelectorAll('tr')
for (let r=0;r<issues.length;r++) {
labelFound = false
var spans = issues[r].querySelectorAll('span')
for (let s=0;s<spans.length;s++) {
if (spans[s].title === label) {
labelFound = true
secLabelFound = true
}
}
if (! labelFound) issues[r].classList.add('hidden')
}
if (! secLabelFound) sections[s].classList.add('hidden')
}
// tally the issues on the page
trsTotal = document.querySelectorAll('tr')
trs = document.querySelectorAll('tr.hidden')
var filteredIssues = trsTotal.length - trs.length
document.getElementById('total').textContent = "There are "+filteredIssues+" issues."
}
function clearFilters () {
var sections = document.querySelectorAll('section')
var trs = document.querySelectorAll('tr')
for (let i=0;i<trs.length;i++) trs[i].classList.remove('hidden')
for (let s=0;s<sections.length;s++) sections[s].classList.remove('hidden')
var trsTotal = document.querySelectorAll('tr')
document.getElementById('total').textContent = "There are "+trsTotal.length+" issues."
}
function showGet () {
// looks for url parameters, and if there are any applies the filters
// parameters take the form ?filter=name(+name)
var feature = ''
var parameters = location.search.split('&')
parameters[0] = parameters[0].substring(1)
for (var p=0;p<parameters.length;p++) {
var pairs = parameters[p].split('=')
if (pairs[0] == 'filter') { feature = pairs[1] }
}
if (feature != '') {
filterlist = feature.split('+')
filterByLabel(filterlist[0])
if (filterlist.length>1) filterByLabel(filterlist[1])
}
}
</script>
<script>window.onload = getAllData()</script>
<footer id="thefooter"></footer>
<script>document.getElementById('thefooter').innerHTML = g.bottomOfPage</script>
<script>completePage()</script>
</div>
</body>
</html>