diff --git a/templates/gap-analysis/gap-analysis-github.js b/templates/gap-analysis/gap-analysis-github.js new file mode 100644 index 0000000..4780c84 --- /dev/null +++ b/templates/gap-analysis/gap-analysis-github.js @@ -0,0 +1,367 @@ +var owner = 'w3c' + +var sections = {} +var debug = true + +var issues = [] +var maxpages = 6 + +var totals=0 +var counter=maxpages + +async function getAllData (repo, doc) { + let arr = [] + //for (let p=1; p < maxpages+1; p++) arr.push(fetch('https://api.github.com/repos/w3c/'+repo+'/issues?per_page=500&page='+p)) + for (let p=1; p < maxpages+1; p++) arr.push(fetch('https://api.github.com/repos/w3c/'+repo+'/issues?labels=gap&per_page=100&page='+p)) + + return await Promise.all(arr) + .then( + function (responses) { + return Promise.all(responses.map( + function(res) { + if (! res.ok) throw Error("GitHub API error " + res.status + " on " + res.url) + return res.json() + } + )) + } + ) + .then(function(data) { + issues = issues.concat(data[0]) + totals = issues.length + if (debug) console.log("Issue length", issues.length) + + // group issues by label, adding to the labels array + for (var i=0; i\n' + out += '

#'+theData[i].number+' '+theData[i].title+'

\n' + out += `` + + + + out += '

' + + var body = theData[i].body + + // make GH img markup point to local image + function convertFromImg(str, p1, p2, s) { + var imgContainer = document.createElement( 'img' ) + imgContainer.innerHTML = str+'>' + var src = imgContainer.firstChild.src + var width = imgContainer.firstChild.width + var alt = imgContainer.firstChild.alt + var path = src.split('/') + var filename = path[path.length-1] + + var out = `${ alt }]+)/g + body = body.replace(test, convertFromImg) + + // make GH images into img element + function convertToImg(str, p1, p2, s) { + path = p2.split('/') + p2 = 'images/'+path[path.length-1] + console.log('p2',p2) + return ''+p1+'' + } + var test = /!\[([^\]]+)\]\(([^\)]+)\)/g + body = body.replace(test, convertToImg) + + // create html links + function convert(str, p1, p2, s) { + return ''+p1+'' + } + var test = /\[([^\]]+)\]\(([^\)]+)\)/g + body = body.replace(test, convert) + + // create convert code segments links + function convertcode(str, p1, s) { + p1 = p1.replace(//g,'>') + return ''+p1+'' + } + test = /`([^`]+)`/g + body = body.replace(test, convertcode) + + // create convert bold segments links + function convertbold(str, p1, s) { + p1 = p1.replace(/\*\*/g,'') + p1 = p1.replace(/\*\*/g,'') + return ''+p1+'' + } + test = /\*\*([^\*]+)\*\*/g + body = body.replace(test, convertbold) + + // replace ### headings with markup + function convertheading(str, p1, s) { + //console.log("str",str) + //console.log("p1",p1) + p1 = p1.replace(/\#\#\#/,'') + return '

'+p1+'
' + } + test = /###([^\n]+?)\n/g + body = body.replace(test, convertheading) + + // create convert italic segments links + //function convertitalic(str, p1, s) { + // p1 = p1.replace(/_/g,'') + // p1 = p1.replace(/_/g,'') + // return ''+p1+'' + // } + //test = /_([^\_]+)_/g + //body = body.replace(test, convertitalic) + + // convert unordered lists to markup + function convertlists(str, initial, startMarkup, endMarkup) { + var lines = body.split('\n') + inList = false + for (let l=0;l' + else if (lines[l].startsWith(initial)) { + inList = true + lines[l] = startMarkup+'
  • '+lines[l].substring(1)+'
  • ' + } + else if (! lines[l].startsWith(initial) && inList) { + inList = false + lines[l] = endMarkup+lines[l] + } + else { + inList = false + } + } + return lines.join('\n') + } + + body = convertlists(body, '-', '') + body = body.replace(/\n\d+\./g, '\n§') + body = convertlists(body, '§', '
      ', '
    ') + + // convert quoted text to blockquote + function convertquotes(str, initial) { + var lines = body.split('\n') + inList = false + for (let l=0;l' + else if (lines[l].startsWith(initial)) { + inList = true + lines[l] = '
    '+lines[l].substring(1)+'
    ' + } + else if (! lines[l].startsWith(initial) && inList) { + inList = false + lines[l] = '
    '+lines[l] + } + else inList = false + } + return lines.join('\n') + } + + body = convertquotes(body, '>') + + // remove blank p markup + test = /

    <\/p>/g + body = body.replace(test,'') + + // split into paragraphs + out += body.replace(/\r\n\r\n/g,'

    ') + out += '

    \n' + out += '\n' + } + } + + if (document.getElementById('insert-'+sectionId)) document.getElementById('insert-'+sectionId).innerHTML = out + else (console.log(`⏵⏵⏵ ERROR in buildSection: can't find section with id insert-${ sectionId }`)) + + // figure out priority for section + var priority = document.getElementById(sectionId).className + if (labelSet.has('p:basic')) priority = 'basic' + else if (labelSet.has('p:advanced')) priority = 'advanced' + else if (labelSet.has('p:broken')) priority = 'broken' + else if (labelSet.has('p:ok')) priority = 'ok' + if (priority !== '') document.getElementById(sectionId).className = priority + window.summary[sectionId] = priority + } + + + + + + + +window.summary = {} + +function setUpSummary () { + + summary.vertical_text = document.getElementById('vertical_text').className + summary.bidi_text = document.getElementById('bidi_text').className + + summary.charset = document.getElementById('charset').className + summary.fonts = document.getElementById('fonts').className + summary.font_style = document.getElementById('font_style').className + summary.glyphs = document.getElementById('glyphs').className + summary.cursive = document.getElementById('cursive').className + summary.transforms = document.getElementById('transforms').className + summary.baselines = document.getElementById('baselines').className + summary.segmentation = document.getElementById('segmentation').className + summary.punctuation_etc = document.getElementById('punctuation_etc').className + summary.text_decoration = document.getElementById('text_decoration').className + summary.quotations = document.getElementById('quotations').className + summary.inline_notes = document.getElementById('inline_notes').className + summary.data_formats = document.getElementById('data_formats').className + + summary.line_breaking = document.getElementById('line_breaking').className + summary.hyphenation = document.getElementById('hyphenation').className + summary.justification = document.getElementById('justification').className + summary.spacing = document.getElementById('spacing').className + summary.lists = document.getElementById('lists').className + summary.initials = document.getElementById('initials').className + + summary.page_layout = document.getElementById('page_layout').className + summary.footnotes_etc = document.getElementById('footnotes_etc').className + summary.headers_footers = document.getElementById('headers_footers').className + summary.interaction = document.getElementById('interaction').className + + if (debug) console.log(summary) + } + + + + +function printSummary (tentative) { +// creates the summary at the bottom of the page that is copy/pasted into the language matrix data +// tentative is false for work in progress in a group, true for pages done by individuals + + var out = '' + for (let i=0;i XXX Gap Analysis - + + @@ -39,20 +40,22 @@ preProcess: [ () => { addPrompts() }, - async () => { await getAllData('repo_name', 'doc:label_name') } + async () => { await getAllData('repo_namexxx', 'doc:xxx') } ], - postProcess: [ - function importStyleSheet() { - [...document.querySelectorAll("link[rel='stylesheet'][data-import]")].forEach(l => { - const style = document.createElement("style"); - fetch(l.href).then(r => r.text()).then(t => { - style.textContent = t; - l.replaceWith(style); - }); - }); - } - ], + postProcess: [ + async function importStyleSheet() { + const elems = document.querySelectorAll(`link[rel='stylesheet'][data-import]`) + await Promise.all( + [...elems].map(async link => { + const text = await fetch(link.href).then(r => r.text()) + const style = document.createElement("style") + style.textContent = text + link.replaceWith(style) + }) + ) + } + ], @@ -60,81 +63,114 @@ // it is used to generate the javascript needed for the matrix langs: ['XXX'], gapDocPath: 'https://www.w3.org/TR/xxx-gap', - - - // URI of the patent status for this WG, for Rec-track documents - // !!!! IMPORTANT !!!! - // This is important for Rec-track documents, do not copy a patent URI from a random - // document unless you know what you're doing. If in doubt ask your friendly neighbourhood - // Team Contact. - wgPatentURI: "https://www.w3.org/2004/01/pp-impl/32113/status", - // !!!! IMPORTANT !!!! MAKE THE ABOVE BLINK IN YOUR HEAD }; - - + -
    -

    This document describes and prioritises gaps for the support of XXX on the Web and in eBooks. In particular, it is concerned with text layout. It checks that needed features are supported in W3C specifications, in particular HTML and CSS and those relating to digital publications. It also checks whether the features have been implemented in browsers and ereaders. This is a preliminary analysis.

    -
    +
    +

    This document describes and prioritises gaps for the support of XXX on the Web and in eBooks. In particular, it is concerned with text layout. It checks that needed features are supported in W3C specifications, in particular HTML and CSS and those relating to digital publications. It also checks whether the features have been implemented in browsers and ereaders. This is a preliminary analysis.

    +
    + -
    -

    This document describes and prioritises gaps for the support of Hungarian on the Web and in eBooks. In particular, it is concerned with text layout. It checks that needed features are supported in W3C specifications, in particular HTML and CSS and those relating to digital publications. It also checks whether the features have been implemented in browsers and ereaders. - +

    +

    This document describes and prioritises gaps for the support of XXX on the Web and in eBooks. In particular, it is concerned with text layout. It checks that needed features are supported in W3C specifications, in particular HTML and CSS and those relating to digital publications. It also checks whether the features have been implemented in browsers and ereaders. + It is linked to from the language matrix that tracks Web support for many languages.

    This document is an individual contribution, and is not currently a work item in any group, however, you can contact the Internationalization Working Group for more information. We welcome contributions to this and/or other documents.

    -
    -

    Introduction

    -

    The W3C needs to make sure that the needs of scripts and languages around the world are built in to technologies such as HTML, CSS, SVG, etc. so that Web pages and eBooks can look and behave as people expect around the world.

    - -

    This page documents difficulties people encounter when trying to use the xxx language with the xxx script on the Web.

    + + + + +
    +

    Introduction

    + +

    The W3C needs to make sure that the needs of scripts and languages around the world are built in to technologies such as HTML, CSS, SVG, etc. so that Web pages and eBooks can look and behave as people expect around the world.

    + +

    This page documents difficulties people encounter when trying to use the xxx language with the xxx script on the Web.

    +

    Having identified an issue, it investigates the current status with regards to web specifications and implementations by user agents (browsers, e-readers, etc.), and attempts to prioritise the severity of the issue for web users.

    -

    A summary of this report and others can be found as part of the language matrix.

    - -
    -

    Work flow

    -

    This version of the document is a preliminary analysis

    - -

    Gap analysis work usually starts with a preliminary analysis, conducted quickly by one or a small group of experts. Then a more detailed analysis is carried out, involving a wider range of experts. The detailed analysis may involve the development of tests, in order to illustrate issues and track results for browsers. The next phase is ongoing maintenance. It is expected that the resulting document will not be frozen: as gaps are fixed, this should be noted in the document. It is also possible that new gaps are noticed or arise, and they can be added to this document when that happens.

    - - -
    - -
    -

    Prioritization

    -

    This document not only describes gaps, it also attempts to prioritise them in terms of the impact on the local user. The prioritisation is indicated by colour.

    - -

    Key:

    -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    - -

    It is important to note that these colours do not indicate to what extent a particular feature is broken. They indicate the impact of a broken or missing feature on the content author or end user.

    -

    Basic styling is the level that would be generally accepted as sufficient for most Web pages. Advanced level support would include additional features one might expect to include in ebooks or other advanced typographic formats. There may be features of a script or language that are not supported on the Web, but that are not generally regarded as necessary (usually archaic or obscure features). In this case, the feature can be described here, but the status should be marked as OK.

    -

    The decision as to what priority level is assigned to a described gap is down to the experts doing the gap analysis. It may not always be straightforward to decide. If a given section in this document refers to more than one feature that is broken, each with different impacts on Web users, the priority for the section should be the lowest denominator.

    -

    A cell can be scored as OK if the feature in question is specified in an appropriate specification, and is supported by user agents. A specification that is in CR or later and has two implementations in 'major' browsers will count. This means that the feature may not be supported in all browsers yet. (At some point in the future we may try to distinguish, visually, whether support is available in a specification but still pending in major browsers or applications.)

    -
    -
    - - - +

    A summary of this report and others can be found as part of the language matrix.

    + + + + + + + + + + + +
    +

    Work flow

    + +

    This version of the document is a preliminary analysis

    + +

    Gap analysis work usually starts with a preliminary analysis, conducted quickly by one or a small group of experts. Then a more detailed analysis is carried out, involving a wider range of experts. The detailed analysis may involve the development of tests, in order to illustrate issues and track results for browsers. The next phase is ongoing maintenance. It is expected that the resulting document will not be frozen: as gaps are fixed, this should be noted in the document. It is also possible that new gaps are noticed or arise, and they can be added to this document when that happens.

    + + +
    + + + + + +
    +

    Prioritization

    + +

    This document not only describes gaps, it also attempts to prioritise them in terms of the impact on the local user. The prioritisation is indicated by colour.

    + +

    Key:

    +
      +
    • +
    • +
    • +
    • +
    • +
    • +
    + +

    It is important to note that these colours do not indicate to what extent a particular feature is broken. They indicate the impact of a broken or missing feature on the content author or end user.

    + +

    Basic styling is the level that would be generally accepted as sufficient for most Web pages. Advanced level support would include additional features one might expect to include in ebooks or other advanced typographic formats. There may be features of a script or language that are not supported on the Web, but that are not generally regarded as necessary (usually archaic or obscure features). In this case, the feature can be described here, but the status should be marked as OK.

    + +

    The decision as to what priority level is assigned to a described gap is down to the experts doing the gap analysis. It may not always be straightforward to decide. If a given section in this document refers to more than one feature that is broken, each with different impacts on Web users, the priority for the section should be the lowest denominator.

    + +

    A cell can be scored as OK if the feature in question is specified in an appropriate specification, and is supported by user agents. A specification that is in CR or later and has two implementations in 'major' browsers will count. This means that the feature may not be supported in all browsers yet. (At some point in the future we may try to distinguish, visually, whether support is available in a specification but still pending in major browsers or applications.)

    +
    +
    + + + + + + +

    Text direction

    +

    See also General page layout & progression for features such as column layout, page turning direction, etc. that are affected by text direction.

    + +

    Vertical text

    @@ -145,6 +181,7 @@

    Vertical text

    +

    Bidirectional text

    @@ -157,22 +194,25 @@

    Bidirectional text

    -
    -

    Characters and phrases

    - - - -
    -

    Characters & encoding

    -

    -
    -
    + + + + + + + + + + + +
    +

    Glyph shaping & positioning

    -

    Fonts

    +

    Fonts & font styles

    @@ -181,18 +221,14 @@

    Fonts

    -
    -

    Font styles, weight, etc

    -

    -
    -
    +
    -

    Glyph shaping and positioning

    +

    Context-based shaping and positioning

    @@ -201,6 +237,27 @@

    Glyph shaping and positioning

    + + + + + + +
    +

    Letterform slopes, weights, & italics

    +

    + + +
    +
    + + + + + + + +

    Cursive text

    @@ -211,24 +268,53 @@

    Cursive text

    -
    -

    Baselines, line-height, etc

    -

    -
    -
    -

    Transforming characters

    +

    Case & other character transforms

    +
    + + + + + + + + + + + + + + + + + + +
    +

    Typographic units

    + + +
    +

    Characters & encoding

    +

    + +
    +
    + + + + + @@ -240,49 +326,53 @@

    Grapheme/word segmentation & selection

    - +
    + + + + + + + + + + + + + + +
    +

    Punctuation & inline features

    +
    -

    Punctuation & other inline features

    +

    Phrase & section boundaries

    - - - -
    -

    Text decoration

    -

    -
    -
    + + +
    -

    Quotations

    +

    Quotations & citations

    - - -
    -
    - +
    +
    -
    -

    Text spacing

    -

    -
    -
    @@ -297,6 +387,25 @@

    Inline notes & annotations

    + + + + +
    +

    Text decoration & other inline features

    +

    + + +
    +
    + + + + + + + +

    Data formats & numbers

    @@ -307,13 +416,18 @@

    Data formats & numbers

    + + + + + +

    +
    @@ -322,10 +436,19 @@

    Other inline features

    + + + + + + + + +
    -

    Lines and Paragraphs

    +

    Line and paragraph layout

    + -

    Line breaking

    @@ -338,6 +461,11 @@

    Line breaking

    + + + + +

    Hyphenation

    @@ -348,6 +476,11 @@

    Hyphenation

    + + + + +

    Text alignment & justification

    @@ -358,6 +491,44 @@

    Text alignment & justification

    + + + + + + + +
    +

    Text spacing

    +

    + + + +
    +
    + + + + + + + + +
    +

    Baselines, line-height, etc

    +

    + + +
    +
    + + + + + + + +

    Lists, counters, etc.

    @@ -368,6 +539,11 @@

    Lists, counters, etc.

    + + + + +

    Styling initials

    @@ -378,12 +554,17 @@

    Styling initials

    + + + + +
    @@ -394,6 +575,17 @@

    Other paragraph features

    + + + + + + + + + + +

    Page & book layout

    @@ -407,6 +599,11 @@

    General page layout & progression

    + + + + +

    Footnotes, endnotes, etc.

    @@ -417,6 +614,11 @@

    Footnotes, endnotes, etc.

    + + + + +

    Page headers, footers, etc.

    @@ -428,6 +630,11 @@

    Page headers, footers, etc.

    + + + + +

    Forms & user interaction

    @@ -438,12 +645,17 @@

    Forms & user interaction

    + + + + + +

    +
    @@ -451,53 +663,57 @@

    Other page layout & pagination features

    + + + + + + + + + + +

    Other

    + +
    -

    Culture-specific features

    -

    Sometimes a script or language does things that are not common outside of its sphere of influence. This is a loose bag of additional items that weren't previously mentioned. This section may also be relevant for observations related to locale formats (such as number, date, currency, format support).

    +

    Culture-specific features

    +

    Sometimes a script or language does things that are not common outside of its sphere of influence. This is a loose bag of additional items that weren't previously mentioned. This section may also be relevant for observations related to locale formats (such as number, date, currency, format support).

    -
    +
    + + + + +
    -

    What else?

    -

    There are many other CSS modules which may need review for script-specific requirements, not to mention the SVG, HTML, Speech, MathML and other specifications. What else is likely to cause problems for worldwide deployment of the Web, and what requirements need to be addressed to make the Web function well locally?

    +

    What else?

    +

    There are many other CSS modules which may need review for script-specific requirements, not to mention the SVG, HTML, Speech, MathML and other specifications. What else is likely to cause problems for worldwide deployment of the Web, and what requirements need to be addressed to make the Web function well locally?

    -
    -
    +
    -
    -Show summary + +
    +Show summary
    
     
    - - - - diff --git a/templates/gap-analysis/prompts.js b/templates/gap-analysis/prompts.js index 7a11002..80a1acd 100755 --- a/templates/gap-analysis/prompts.js +++ b/templates/gap-analysis/prompts.js @@ -28,6 +28,10 @@ contentPrompts = { "quotations": 'Are there any issues when dealing with quotations marks, especially when nested? Should block quotes be indented or handled specially? See available information or check for currently needed data.', +"emphasis": 'How are emphasis and highlighting achieved? If lines or marks are drawn alongside, over or through the text, do they need to be a special distance from the text itself? Is it important to skip characters when underlining, etc? How do things change for vertically set text?', + +"abbrev": 'What characters or other methods are used to indicate abbreviation, ellipsis & repetition?', + "inline_notes": 'The ruby spec currently specifies an initial subset of requirements for fine-tuning the typography of phonetic and semantic annotations of East Asian text, including furigana, pinyin and zhuyin fuhao systems. Is is adequate for what it sets out to do? What other controls will be needed in the future? What about other types of inline annotation, such as warichu? (For referent-type notes such as footnotes, see below.) See available information or check for currently needed data.', "data_formats": 'If the script has its own set of number digits, are there any issues in how they are used? Does the script or language use special format patterns that are problematic (eg. 12,34,000 in India)? What about date/time formats and selection - and are non-Gregorian calendars needed? Do percent signs and other symbols associated with number work correctly, and do numbers need special decorations, (like in Ethiopic or Syriac)? How about the management of personal names, addresses, etc. in web pages: are there issues? See available information or check for currently needed data.', @@ -48,6 +52,8 @@ contentPrompts = { "page_layout": 'How are the main text area and ancilliary areas positioned and defined? Are there any special requirements here, such as dimensions in characters for the Japanese kihon hanmen? The book cover for scripts that are read right-to-left scripts is on the right of the spine, rather than the left. Is that provided for? When content can flow vertically and to the left or right, how do you specify the location of objects, text, etc. relative to the flow? For example, keywords \'left\' and \'right\' are likely to need to be reversed for pages written in English and page written in Arabic. Do tables and grid layouts work as expected? How do columns work in vertical text? Can you mix block of vertical and horizontal text correctly? Does text scroll in the expected direction? Other topics that belong here include any local requirements for things such as printer marks, tables of contents and indexes. See available information or check for currently needed data.', +"grids_tables": 'Does the script have special requirements for character grids or tables?', + "footnotes_etc": 'Does your script have special requirements for footnotes, endnotes or other necessary annotations of this kind in the way needed for your culture? (There is a section above for purely inline annotations, such as ruby or warichu. This section is more about annotation systems that separate the reference marks and the content of the notes.) See available information or check for currently needed data.', "headers_footers": 'Are there special conventions for page numbering, or the way that running headers and the like are handled? See available information or check for currently needed data.', diff --git a/templates/lreq_doc/local.css b/templates/lreq_doc/local.css index bc7538c..314a4fd 100644 --- a/templates/lreq_doc/local.css +++ b/templates/lreq_doc/local.css @@ -106,7 +106,9 @@ dl.reslinks { margin-block-end: 3em; } - +.nobullet { + list-style-type: none; + }