Skip to content

Commit

Permalink
All gap-analysis docs, Update javascript to use promises
Browse files Browse the repository at this point in the history
Add link to r12a notes.
Update respec header for a few.
  • Loading branch information
r12a committed Jan 23, 2021
1 parent eb44be7 commit 8eb4918
Show file tree
Hide file tree
Showing 5 changed files with 160 additions and 119 deletions.
49 changes: 30 additions & 19 deletions gap-analysis/beng-gap.html
Expand Up @@ -4,10 +4,10 @@
<meta charset="utf-8">

<title>Bengali Gap Analysis</title>
<script class="remove" src="../../i18n-activity/textlayout/resources/gap-analysis-github.js"> </script>
<script class="remove" src="../../i18n-activity/textlayout/resources/gap-analysis-github.js"></script>
<script class="remove" src="../../i18n-activity/templates/gap-analysis/prompts.js"></script>

<script src="https://www.w3.org/Tools/respec/respec-w3c" async="" class="remove"> </script>
<script class="remove" src="/i18n-activity/templates/gap-analysis/prompts.js"> </script>
<script class="remove">
var respecConfig = {
// specification status (e.g. WD, LCWD, WG-NOTE, etc.). If in doubt use ED.
Expand All @@ -33,17 +33,24 @@
github: "w3c/iip",
group: "i18n",

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);
});
});
}
],
preProcess: [
() => { addPrompts() },
async () => { await getAllData('iip','doc:beng') }
],

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)
})
)
}
],



Expand All @@ -54,7 +61,6 @@
};
</script>

<script class="remove" src="/i18n-activity/templates/gap-analysis/prompts.js"> </script>
<link rel="stylesheet" data-import href="https://w3c.github.io/typography/gap-analysis/gapanalysis.css" type="text/css">
</head>

Expand All @@ -74,7 +80,16 @@ <h2>Introduction</h2>
<p>This page documents difficulties people encounter when trying to use the Assamese, Bangla, and Manipuri languages in the Bengali script on the Web. </p>
<p>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.</p>
<p>A summary of this report and others can be found as part of the <a href="https://w3c.github.io/typography/gap-analysis/language-matrix.html" style="font-size: 140%;">language matrix</a>.</p>



<p>For a description of the Bengali script and its use for the Bangla language see the (non-W3C) page <a href="https://r12a.github.io/scripts/bengali/">Bengali/Bangla</a>, which summarises aspects of the orthography and typographic features, including relevant Unicode characters and their use.</p>







<section id="workflow">
<h3>Work flow</h3>
<p><span style="font-weight:bold; font-size: 140%;">This version of the document is a preliminary analysis</span></p>
Expand Down Expand Up @@ -456,10 +471,6 @@ <h3>What else?</h3>
<summary style="margin-top:4em; cursor: pointer;" onclick="setUpSummary(); printSummary(true)">Show summary</summary>
<pre id="summaryPlaceholder" style="white-space: pre-wrap;"></pre>
</details>
<script class="remove">
addPrompts()
getAllData('iip','doc:beng')
</script>
<script>
if (window.location.href.includes('/TR/')) document.getElementById('summaryStats').style.display = 'none'
</script>
Expand Down
47 changes: 28 additions & 19 deletions gap-analysis/deva-gap.html
Expand Up @@ -5,9 +5,10 @@
<meta charset="utf-8">

<title>Devanagari Gap Analysis</title>
<script class="remove" src="../../i18n-activity/textlayout/resources/gap-analysis-github.js"> </script>
<script class="remove" src="../../i18n-activity/textlayout/resources/gap-analysis-github.js"></script>
<script class="remove" src="../../i18n-activity/templates/gap-analysis/prompts.js"></script>

<script src="https://www.w3.org/Tools/respec/respec-w3c-common" async="" class="remove"> </script>
<script src="https://www.w3.org/Tools/respec/respec-w3c" async="" class="remove"> </script>
<script class="remove">
var respecConfig = {
// specification status (e.g. WD, LCWD, WG-NOTE, etc.). If in doubt use ED.
Expand Down Expand Up @@ -35,17 +36,24 @@
github: "w3c/iip",
group: "i18n",

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);
});
});
}
],
preProcess: [
() => { addPrompts() },
async () => { await getAllData('iip','doc:deva') }
],

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)
})
)
}
],


// langs array lists languages addressed by this document, in order of speaker (highest first)
Expand All @@ -55,7 +63,6 @@
};
</script>

<script class="remove" src="/i18n-activity/templates/gap-analysis/prompts.js"> </script>
<link rel="stylesheet" data-import href="https://w3c.github.io/typography/gap-analysis/gapanalysis.css" type="text/css">
</head>

Expand All @@ -77,7 +84,13 @@ <h2>Introduction</h2>
<p>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.</p>

<p>A summary of this report and others can be found as part of the <a href="https://w3c.github.io/typography/gap-analysis/language-matrix.html" style="font-size: 140%;">language matrix</a>.</p>


<p>For a description of the Devanagari script and its use for the Hindi language see the (non-W3C) page <a href="https://r12a.github.io/scripts/devanagari/">Devanagari/Hindi</a>, which summarises aspects of the orthography and typographic features, including relevant Unicode characters and their use.</p>





<section id="workflow">
<h3>Work flow</h3>
<p><span style="font-weight:bold; font-size: 140%;">This version of the document is a preliminary analysis</span></p>
Expand Down Expand Up @@ -459,10 +472,6 @@ <h3>What else?</h3>
<summary style="margin-top:4em; cursor: pointer;" onclick="setUpSummary(); printSummary(true)">Show summary</summary>
<pre id="summaryPlaceholder" style="white-space: pre-wrap;"></pre>
</details>
<script class="remove">
addPrompts()
getAllData('iip','doc:deva')
</script>
<script>
if (window.location.href.includes('/TR/')) document.getElementById('summaryStats').style.display = 'none'
</script>
Expand Down
46 changes: 28 additions & 18 deletions gap-analysis/gujr-gap.html
Expand Up @@ -5,7 +5,8 @@
<meta charset="utf-8">

<title>Gujarati Gap Analysis</title>
<script class="remove" src="../../i18n-activity/textlayout/resources/gap-analysis-github.js"> </script>
<script class="remove" src="../../i18n-activity/textlayout/resources/gap-analysis-github.js"></script>
<script class="remove" src="../../i18n-activity/templates/gap-analysis/prompts.js"></script>

<script src="https://www.w3.org/Tools/respec/respec-w3c" async="" class="remove"></script>
<script class="remove">
Expand Down Expand Up @@ -35,17 +36,24 @@
github: "w3c/iip",
group: "i18n",

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);
});
});
}
],
preProcess: [
() => { addPrompts() },
async () => { await getAllData('iip','doc:gujr') }
],

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)
})
)
}
],


// langs array lists languages addressed by this document, in order of speaker (highest first)
Expand All @@ -55,7 +63,6 @@
};
</script>

<script class="remove" src="/i18n-activity/templates/gap-analysis/prompts.js"> </script>
<link rel="stylesheet" data-import href="https://w3c.github.io/typography/gap-analysis/gapanalysis.css">
</head>

Expand All @@ -79,7 +86,14 @@ <h2>Introduction</h2>
<p>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.</p>

<p>A summary of this report and others can be found as part of the <a href="https://w3c.github.io/typography/gap-analysis/language-matrix.html" style="font-size: 140%;">language matrix</a>.</p>


<p>For a description of the Gujarati script see the (non-W3C) page <a href="https://r12a.github.io/scripts/gujarati/">Gujarati</a>, which summarises aspects of the orthography and typographic features, including relevant Unicode characters and their use.</p>






<section id="workflow">
<h3>Work flow</h3>
<p><span style="font-weight:bold; font-size: 140%;">This version of the document is a preliminary analysis</span></p>
Expand Down Expand Up @@ -461,10 +475,6 @@ <h3>What else?</h3>
<summary style="margin-top:4em; cursor: pointer;" onclick="setUpSummary(); printSummary(true)">Show summary</summary>
<pre id="summaryPlaceholder" style="white-space: pre-wrap;"></pre>
</details>
<script class="remove">
addPrompts()
getAllData('iip','doc:gujr')
</script>
<script>
if (window.location.href.includes('/TR/')) document.getElementById('summaryStats').style.display = 'none'
</script>
Expand Down
61 changes: 36 additions & 25 deletions gap-analysis/guru-gap.html
Expand Up @@ -5,9 +5,10 @@
<meta charset="utf-8">

<title>Gurmukhi Gap Analysis</title>
<script class="remove" src="../../i18n-activity/textlayout/resources/gap-analysis-github.js"> </script>
<script class="remove" src="../../i18n-activity/textlayout/resources/gap-analysis-github.js"></script>
<script class="remove" src="../../i18n-activity/templates/gap-analysis/prompts.js"></script>

<script src="https://www.w3.org/Tools/respec/respec-w3c-common" async="" class="remove"></script>
<script src="https://www.w3.org/Tools/respec/respec-w3c" async="" class="remove"></script>
<script class="remove">
var respecConfig = {
// specification status (e.g. WD, LCWD, WG-NOTE, etc.). If in doubt use ED.
Expand Down Expand Up @@ -35,17 +36,24 @@
github: "w3c/iip",
group: "i18n",

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);
});
});
}
],
preProcess: [
() => { addPrompts() },
async () => { await getAllData('iip','doc:guru') }
],

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)
})
)
}
],

// langs array lists languages addressed by this document, in order of speaker (highest first)
// it is used to generate the javascript needed for the matrix
Expand Down Expand Up @@ -76,7 +84,16 @@ <h2>Introduction</h2>
<p>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.</p>

<p>A summary of this report and others can be found as part of the <a href="https://w3c.github.io/typography/gap-analysis/language-matrix.html" style="font-size: 140%;">language matrix</a>.</p>



<p>For a description of the Gurmukhi script and its use for the Punjabi language see the (non-W3C) page <a href="https://r12a.github.io/scripts/gurmukhi/">Gurmukhi/Punjabi</a>, which summarises aspects of the orthography and typographic features, including relevant Unicode characters and their use.</p>







<section id="workflow">
<h3>Work flow</h3>
<p><span style="font-weight:bold; font-size: 140%;">This version of the document is a preliminary analysis</span></p>
Expand Down Expand Up @@ -455,19 +472,13 @@ <h3>What else?</h3>



<details>
<summary style="margin-top:4em; cursor: pointer;" onClick="printSummary(true)">Show summary</summary>

<details id="summaryStats">
<summary style="margin-top:4em; cursor: pointer;" onclick="setUpSummary(); printSummary(true)">Show summary</summary>
<pre id="summaryPlaceholder" style="white-space: pre-wrap;"></pre>
</details>




<script class="remove">
setUpSummary()
addPrompts()
getAllData('iip','doc:guru')
printSummary(true)
<script>
if (window.location.href.includes('/TR/')) document.getElementById('summaryStats').style.display = 'none'
</script>


Expand Down

0 comments on commit 8eb4918

Please sign in to comment.